summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2021-04-08 14:34:46 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-04-09 15:18:19 +0000
commitef755943b1d52975a828b5c634c19ecabe236610 (patch)
tree168e22ff68e7efd30458e44e1d5bb71672a95a35
parent08f8ea5957cb23a5518b44b6ca9eaba715b848eb (diff)
downloadmongo-ef755943b1d52975a828b5c634c19ecabe236610.tar.gz
SERVER-52364 Enable feature flag for Enable checks for API versioning breakage for security systems
-rw-r--r--src/mongo/db/auth/authorization_contract.idl5
-rw-r--r--src/mongo/db/auth/authorization_session_impl.cpp2
-rw-r--r--src/mongo/db/auth/authorization_session_impl.h2
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