From ef755943b1d52975a828b5c634c19ecabe236610 Mon Sep 17 00:00:00 2001 From: Mark Benvenuto Date: Thu, 8 Apr 2021 14:34:46 -0400 Subject: SERVER-52364 Enable feature flag for Enable checks for API versioning breakage for security systems --- src/mongo/db/auth/authorization_contract.idl | 5 ++++- src/mongo/db/auth/authorization_session_impl.cpp | 2 +- src/mongo/db/auth/authorization_session_impl.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mongo/db/auth/authorization_contract.idl b/src/mongo/db/auth/authorization_contract.idl index 9d0a63705a3..2afe30b4983 100644 --- a/src/mongo/db/auth/authorization_contract.idl +++ b/src/mongo/db/auth/authorization_contract.idl @@ -30,7 +30,10 @@ global: cpp_namespace: "mongo::feature_flags" feature_flags: + # TODO SERVER-55908 - Remove feature flag featureFlagAuthorizationContract: description: "Control support for authorization contracts for tests" cpp_varname: gFeatureFlagAuthorizationContract - default: false + default: true + version: 5.0 + diff --git a/src/mongo/db/auth/authorization_session_impl.cpp b/src/mongo/db/auth/authorization_session_impl.cpp index 86a125746c9..aabf16d74b2 100644 --- a/src/mongo/db/auth/authorization_session_impl.cpp +++ b/src/mongo/db/auth/authorization_session_impl.cpp @@ -75,7 +75,7 @@ constexpr StringData ADMIN_DBNAME = "admin"_sd; bool checkContracts() { // Only check contracts if the feature is enabled. - // TODO SERVER-52364 - Remove feature flag check + // TODO SERVER-55908 - Remove feature flag check if (!serverGlobalParams.featureCompatibility.isVersionInitialized() || !feature_flags::gFeatureFlagAuthorizationContract.isEnabled( serverGlobalParams.featureCompatibility)) { diff --git a/src/mongo/db/auth/authorization_session_impl.h b/src/mongo/db/auth/authorization_session_impl.h index 19c90b97f74..aa9b1d9bac7 100644 --- a/src/mongo/db/auth/authorization_session_impl.h +++ b/src/mongo/db/auth/authorization_session_impl.h @@ -207,7 +207,7 @@ private: // track it but reach a different decision after the command has been run because the FCV has // changed. We must record our first decision. // - // TODO SERVER-52364 - remove this variable after the feature flag is removed. + // TODO SERVER-55908 - remove this variable after the feature flag is removed. bool _checkContracts; }; } // namespace mongo -- cgit v1.2.1