summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/evergreen.yml7
-rw-r--r--src/mongo/db/auth/SConscript2
-rw-r--r--src/mongo/db/auth/authorization_contract.idl36
3 files changed, 45 insertions, 0 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 51b229c62e2..0a6cb4e901d 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -9584,6 +9584,7 @@ buildvariants:
--mongodSetParameters="{
featureFlagToaster: true,
featureFlagSpoon: true,
+ featureFlagAuthorizationContract: true,
featureFlagImprovedAuditing: true,
featureFlagTimeseriesCollection: true,
featureFlagShardingFullDDLSupport: true,
@@ -9688,6 +9689,7 @@ buildvariants:
--mongodSetParameters="{
featureFlagToaster: true,
featureFlagSpoon: true,
+ featureFlagAuthorizationContract: true,
featureFlagImprovedAuditing: true,
featureFlagTimeseriesCollection: true,
featureFlagShardingFullDDLSupport: true,
@@ -10255,6 +10257,7 @@ buildvariants:
--mongodSetParameters="{
featureFlagToaster: true,
featureFlagSpoon: true,
+ featureFlagAuthorizationContract: true,
featureFlagTenantMigrations: true,
featureFlagImprovedAuditing: true,
featureFlagTimeseriesCollection: true,
@@ -11525,6 +11528,7 @@ buildvariants:
--mongodSetParameters="{
featureFlagToaster: true,
featureFlagSpoon: true,
+ featureFlagAuthorizationContract: true,
featureFlagTenantMigrations: true,
featureFlagImprovedAuditing: true,
featureFlagTimeseriesCollection: true,
@@ -12290,6 +12294,7 @@ buildvariants:
--mongodSetParameters="{
featureFlagToaster: true,
featureFlagSpoon: true,
+ featureFlagAuthorizationContract: true,
featureFlagTenantMigrations: true,
featureFlagImprovedAuditing: true,
featureFlagTimeseriesCollection: true,
@@ -12458,6 +12463,7 @@ buildvariants:
--mongodSetParameters="{
featureFlagToaster: true,
featureFlagSpoon: true,
+ featureFlagAuthorizationContract: true,
featureFlagTenantMigrations: true,
featureFlagImprovedAuditing: true,
featureFlagTimeseriesCollection: true,
@@ -12570,6 +12576,7 @@ buildvariants:
--mongodSetParameters="{
featureFlagToaster: true,
featureFlagSpoon: true,
+ featureFlagAuthorizationContract: true,
featureFlagTenantMigrations: true,
featureFlagImprovedAuditing: true,
featureFlagTimeseriesCollection: true,
diff --git a/src/mongo/db/auth/SConscript b/src/mongo/db/auth/SConscript
index b8a784a79d6..236c7755af4 100644
--- a/src/mongo/db/auth/SConscript
+++ b/src/mongo/db/auth/SConscript
@@ -141,6 +141,7 @@ env.Library(
env.Library(
target='auth_impl_internal',
source=[
+ 'authorization_contract.idl',
'authorization_manager_impl.cpp',
'authorization_session_impl.cpp',
'authz_manager_external_state.cpp',
@@ -155,6 +156,7 @@ env.Library(
'$BUILD_DIR/mongo/db/common',
'$BUILD_DIR/mongo/db/global_settings',
'$BUILD_DIR/mongo/db/namespace_string',
+ '$BUILD_DIR/mongo/idl/feature_flag',
'$BUILD_DIR/mongo/util/concurrency/thread_pool',
'$BUILD_DIR/mongo/util/icu',
'$BUILD_DIR/mongo/util/net/ssl_manager',
diff --git a/src/mongo/db/auth/authorization_contract.idl b/src/mongo/db/auth/authorization_contract.idl
new file mode 100644
index 00000000000..9d0a63705a3
--- /dev/null
+++ b/src/mongo/db/auth/authorization_contract.idl
@@ -0,0 +1,36 @@
+# Copyright (C) 2021-present MongoDB, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the Server Side Public License, version 1,
+# as published by MongoDB, Inc.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# Server Side Public License for more details.
+#
+# You should have received a copy of the Server Side Public License
+# along with this program. If not, see
+# <http://www.mongodb.com/licensing/server-side-public-license>.
+#
+# As a special exception, the copyright holders give permission to link the
+# code of portions of this program with the OpenSSL library under certain
+# conditions as described in each individual source file and distribute
+# linked combinations including the program with the OpenSSL library. You
+# must comply with the Server Side Public License in all respects for
+# all of the code used other than as permitted herein. If you modify file(s)
+# with this exception, you may extend this exception to your version of the
+# file(s), but you are not obligated to do so. If you do not wish to do so,
+# delete this exception statement from your version. If you delete this
+# exception statement from all source files in the program, then also delete
+# it in the license file.
+#
+
+global:
+ cpp_namespace: "mongo::feature_flags"
+
+feature_flags:
+ featureFlagAuthorizationContract:
+ description: "Control support for authorization contracts for tests"
+ cpp_varname: gFeatureFlagAuthorizationContract
+ default: false