summaryrefslogtreecommitdiff
path: root/src/mongo/db/auth/authorization_session_impl.h
diff options
context:
space:
mode:
authorSara Golemon <sara.golemon@mongodb.com>2021-10-13 21:04:55 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-07 00:23:48 +0000
commitd7845457fd30cd1798f70444c2a66d725ab361b4 (patch)
tree335bd948371be032d209a26c564a140b4ea215a4 /src/mongo/db/auth/authorization_session_impl.h
parent4a915072ab5279480305a6023db6671e3f32cfd0 (diff)
downloadmongo-d7845457fd30cd1798f70444c2a66d725ab361b4.tar.gz
SERVER-61615 Parse authenticated user from security token and add to authorization session
Diffstat (limited to 'src/mongo/db/auth/authorization_session_impl.h')
-rw-r--r--src/mongo/db/auth/authorization_session_impl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/auth/authorization_session_impl.h b/src/mongo/db/auth/authorization_session_impl.h
index 71c07ab949a..2ec581af5c2 100644
--- a/src/mongo/db/auth/authorization_session_impl.h
+++ b/src/mongo/db/auth/authorization_session_impl.h
@@ -91,9 +91,14 @@ public:
RoleNameIterator getAuthenticatedRoleNames() override;
+ void logoutSecurityTokenUser(Client* client) override;
void logoutAllDatabases(Client* client, StringData reason) override;
void logoutDatabase(Client* client, StringData dbname, StringData reason) override;
+ AuthenticationMode getAuthenticationMode() const override {
+ return _authenticationMode;
+ }
+
void grantInternalAuthorization(Client* client) override;
void grantInternalAuthorization(OperationContext* opCtx) override;
@@ -161,6 +166,9 @@ protected:
// All Users who have been authenticated on this connection.
UserSet _authenticatedUsers;
+ // What authentication mode we're currently operating in.
+ AuthenticationMode _authenticationMode = AuthenticationMode::kNone;
+
// The roles of the authenticated users. This vector is generated when the authenticated
// users set is changed.
std::vector<RoleName> _authenticatedRoleNames;