-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
(copied to CRM)
When using MONGODB-AWS and authenticating with an AWS session token specified in the connection string (?authSource=$external&authMechanism=MONGODB-AWS&authMechanismProperties=AWS_SESSION_TOKEN:..., I receive the following authentication error:
Unhandled exception. MongoDB.Driver.MongoAuthenticationException: Unable to authenticate using sasl protocol mechanism MONGODB-AWS. ---> MongoDB.Driver.MongoCommandException: Command saslContinue failed: Authentication failed.. at MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1.ProcessReply(ConnectionId connectionId, ReplyMessage`1 reply) at MongoDB.Driver.Core.WireProtocol.CommandUsingQueryMessageWireProtocol`1.Execute(IConnection connection, CancellationToken cancellationToken) at MongoDB.Driver.Core.Authentication.SaslAuthenticator.Authenticate(IConnection connection, ConnectionDescription description, CancellationToken cancellationToken) --- End of inner exception stack trace --- at MongoDB.Driver.Core.Connections.BinaryConnection.OpenHelper(CancellationToken cancellationToken) at MongoDB.Driver.Core.Connections.BinaryConnection.Open(CancellationToken cancellationToken) at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.PooledConnection.Open(CancellationToken cancellationToken) at MongoDB.Driver.Core.ConnectionPools.ExclusiveConnectionPool.AcquiredConnection.Open(CancellationToken cancellationToken) at MongoDB.Driver.Core.Servers.Server.GetChannel(CancellationToken cancellationToken) at MongoDB.Driver.Core.Bindings.ServerChannelSource.GetChannel(CancellationToken cancellationToken) at MongoDB.Driver.Core.Bindings.ChannelSourceHandle.GetChannel(CancellationToken cancellationToken) at MongoDB.Driver.Core.Operations.DropCollectionOperation.Execute(IWriteBinding binding, CancellationToken cancellationToken) at MongoDB.Driver.OperationExecutor.ExecuteWriteOperation[TResult](IWriteBinding binding, IWriteOperation`1 operation, CancellationToken cancellationToken) at MongoDB.Driver.MongoDatabaseImpl.ExecuteWriteOperation[T](IClientSessionHandle session, IWriteOperation`1 operation, CancellationToken cancellationToken) at MongoDB.Driver.MongoDatabaseImpl.DropCollection(IClientSessionHandle session, String name, CancellationToken cancellationToken) at MongoDB.Driver.MongoDatabaseImpl.<>c__DisplayClass29_0.<DropCollection>b__0(IClientSessionHandle session) at MongoDB.Driver.MongoDatabaseImpl.UsingImplicitSession(Action`1 func, CancellationToken cancellationToken) at MongoDB.Driver.MongoDatabaseImpl.DropCollection(String name, CancellationToken cancellationToken) at tour.Program.Main(String[] args) in /home/vagrant/dotnet/tour/csharp/Program.cs:line 20
The same connection string works fine in the following:
- mongo shell (4.4.1)
- pymongo 3.11.0
- Node.js driver 3.6.2
This was tested using C# driver 2.11.2.
- is related to
-
CSHARP-3228 Percent-encoded authSource in mongodb+srv connection string fails for MONGODB-AWS and GSSAPI
- Closed