diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2019-12-04 17:12:10 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-12 19:16:45 +0000 |
commit | 812c8338f496da3f43174330e37f07f0aad442d3 (patch) | |
tree | 80baa88c0eb7aec60fe1d199b27308deae87d49c /src/mongo/db/auth/authentication_session.h | |
parent | 37d1ef0d02582ac95a2adf835a341e0ead12abb3 (diff) | |
download | mongo-812c8338f496da3f43174330e37f07f0aad442d3.tar.gz |
SERVER-44858 Implement speculative sasl auth
create mode 100644 jstests/auth/speculative-auth-replset.js
create mode 100644 jstests/auth/speculative-sasl-start.js
create mode 100644 jstests/ssl/speculative-auth-replset.js
create mode 100644 jstests/ssl/speculative-authenticate.js
create mode 100644 src/mongo/db/auth/sasl_commands.h
create mode 100644 src/mongo/db/s/balancer/core_options_stub.cpp
Diffstat (limited to 'src/mongo/db/auth/authentication_session.h')
-rw-r--r-- | src/mongo/db/auth/authentication_session.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/db/auth/authentication_session.h b/src/mongo/db/auth/authentication_session.h index 5a26c46efd4..ff86ea7ca08 100644 --- a/src/mongo/db/auth/authentication_session.h +++ b/src/mongo/db/auth/authentication_session.h @@ -45,8 +45,8 @@ class AuthenticationSession { AuthenticationSession& operator=(const AuthenticationSession&) = delete; public: - explicit AuthenticationSession(std::unique_ptr<ServerMechanismBase> mech) - : _mech(std::move(mech)) {} + explicit AuthenticationSession(std::unique_ptr<ServerMechanismBase> mech, bool speculative) + : _mech(std::move(mech)), _speculative(speculative) {} /** * Sets the authentication session for the given "client" to "newSession". @@ -72,8 +72,13 @@ public: return _mech->setOptions(options); } + bool isSpeculative() const { + return _speculative; + } + private: std::unique_ptr<ServerMechanismBase> _mech; + bool _speculative{false}; }; } // namespace mongo |