Help Center/ Relational Database Service/ Troubleshooting/ RDS for PostgreSQL/ Authentication Not Supported When a DB Instance Is Accessed Through an Application
Updated on 2024-12-13 GMT+08:00

Authentication Not Supported When a DB Instance Is Accessed Through an Application

Scenario 1

  • Description

    If an RDS for PostgreSQL instance is connected through a PostgreSQL application and the client does not support the scram-sha-256 authentication method, the following error message is displayed:

    Authentication method not supported (Received: 10)
  • Possible causes

    The client version is too old and incompatible with the encryption algorithm used by the DB instance.

  • Solution
    1. Check the client or client driver (such as the JDBC driver) and update it to the latest version to ensure that the latest authentication method is supported.

      If the latest authentication is still not supported, go to the next step.

    2. Change the value of password_encryption to md5.

      The modification of password_encryption takes effect only after the password is reset.

    3. If the fault persists, modify pg_hba.conf. Check whether the authentication method is set to scram-sha-256. If yes, change it to md5 and try again.

Scenario 2

  • Description

    After data is migrated from an instance of an earlier version to an instance of a later version, the new instance cannot be connected and the following error message is displayed:

    unsupported authentication method requested by the server: 10
  • Possible causes

    The value of password_encryption is md5 on the original instance. After data is migrated to the new instance, the default value of password_encryption becomes scram-sha-256. This value is changed to md5, but the password is not reset after the change, so the password authentication fails.

  • Solution

    Reset the password after the value of password_encryption is changed.

Scenario 3

  • Description

    When an RDS for PostgreSQL instance is connected using a JDBC application, the following error message is displayed in the console error logs because the JDBC version does not support the scram-sha-256 authentication:

    unsupported frontend protocol 1234.5680: server supports 2.0 to 3.0
  • Possible causes

    The JDBC version is too early.

  • Solution

    Download and use a JDBC of the latest version.