Random Message: "BadValue: SCRAM-SHA-256 authentication is disabled"

I’m getting the following random message on my Mongo Atlas “Access History” view:

“FAILED BadValue: SCRAM-SHA-256 authentication is disabled”

This is attached to my application IP hosted at AWS. I basically got this message first and then the successfully message.

  • Instance MongoAtlas - Cluster Tier M40 General
  • Replica Set - 3 nodes
  • Driver mongoose: “^6.5.1”
  • Mongo version as per Atlas view: 5.0.12
  • Mongo String URI: mongodb+srv://xyz:ABCDEFGH@clusterabc.abcde.mongodb.net/my_db

Hi @Thiago_Scodeler - Welcome to the community.

I basically got this message first and then the successfully message.

Just for clarification, are you able to connect successfully but are just curious for the source / reason for the “FAILED BadValue: SCRAM-SHA-256 authentication is disabled” message? If so, does the following post reply help clarify this?

Regards,
Jason

2 Likes

Hi @Jason_Tran thanks for your answer.
Yes, i’m able to connect successfully to the database. The main reason of my question is if this “error” generates any side-effect or bad usage of my database, such as two connections attempts, e.g. first connecting action failing and reconnecting with SHA-1 success.

As per your shared post, this is just a auditing message, correct?

I have the same question, there are double the connections, got here cuz I was troubleshooting a high connections utilization. Shall we configure mongoose to use sha1?

1 Like

Hi Ed and Thiago,

The main reason of my question is if this “error” generates any side-effect or bad usage of my database, such as two connections attempts, e.g. first connecting action failing and reconnecting with SHA-1 success.

I have the same question, there are double the connections, got here cuz I was troubleshooting a high connections utilization. Shall we configure mongoose to use sha1?

I believe this depends on the driver in use, but I will refer the details of the Node.JS driver Authentication Mechanism documentation here just in regards to the connection issue raised.

If the DEFAULT mechanism is used, before the connection is established, the authentication methods are tried in the order specified in the documentation. If all fail, then the connection is refused. However, once authentication is successful, the connection is accepted.

I have the same question, there are double the connections, got here cuz I was troubleshooting a high connections utilization.

@Ed_Durguti Do you have more details regarding the above? I.e. Do you see in your logs that the connection is accepted for both the failure and success for each authMechanism attempted?

Additionally, do you have some more details about the Atlas tier in use?

Regards,
Jason

1 Like

Thank you @Jason_Tran . Based on that information, i’ll force SHA-1 on my string URI connection, right now it is using the DEFAULT order.