diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2018-04-23 18:02:45 -0400 |
---|---|---|
committer | Spencer Jackson <spencer.jackson@mongodb.com> | 2018-05-04 13:46:09 -0400 |
commit | 67f8f9532c48911cf885b69723ef41774762d275 (patch) | |
tree | 78a137ad54b92ba9e297872a506717e2d70e910f /src/mongo/db/auth/sasl_scram_server_conversation.cpp | |
parent | 8c01d9004fd3d9dcf5cab47a26948651a04a5d4d (diff) | |
download | mongo-67f8f9532c48911cf885b69723ef41774762d275.tar.gz |
SERVER-34626: Remove SCRAM-SHA-1 specific auth checks from SCRAM-SHA-256
Diffstat (limited to 'src/mongo/db/auth/sasl_scram_server_conversation.cpp')
-rw-r--r-- | src/mongo/db/auth/sasl_scram_server_conversation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/auth/sasl_scram_server_conversation.cpp b/src/mongo/db/auth/sasl_scram_server_conversation.cpp index c82bb5965c6..28cbe4537fd 100644 --- a/src/mongo/db/auth/sasl_scram_server_conversation.cpp +++ b/src/mongo/db/auth/sasl_scram_server_conversation.cpp @@ -184,7 +184,8 @@ StatusWith<std::tuple<bool, std::string>> SaslSCRAMServerMechanism<Policy>::_fir // for the internal user. UserName user(ServerMechanismBase::ServerMechanismBase::_principalName, ServerMechanismBase::getAuthenticationDatabase()); - if (!sequenceContains(saslGlobalParams.authenticationMechanisms, "SCRAM-SHA-1") && + if (Policy::getName() == "SCRAM-SHA-1"_sd && + !sequenceContains(saslGlobalParams.authenticationMechanisms, "SCRAM-SHA-1") && user != internalSecurity.user->getName()) { return Status(ErrorCodes::BadValue, "SCRAM-SHA-1 authentication is disabled"); } |