programing

Mariadb 드라이버 Aurora IAM 자격 증명 유형 액세스가 사용자에 대해 거부되었습니다(암호 사용: YES).

minimums 2023. 8. 31. 23:45
반응형

Mariadb 드라이버 Aurora IAM 자격 증명 유형 액세스가 사용자에 대해 거부되었습니다(암호 사용: YES).

Java 11 애플리케이션에서 MariaDB driver 2.7.3 및 Hikari Datasource를 사용하여 AWS Aurora 데이터베이스에 연결합니다.오류 로그 파일에서 "사용자에 대한 액세스 거부"(암호 사용: YES) 오류가 간헐적으로 발생합니다.다음은 애플리케이션에 사용된 JDBC URL입니다.

jdbc:mariadb:aurora://<DB writer cluster endpoint>:port,<DB reader cluster endpoint>:port/<DB name>?credentialType=AWS-IAM&useSSL=true&verifyServerCertificate=true&serverSslCert=rds-combined-ca-bundle.pem&autoReconnect=true&fastConnect=true&tcpNoDelay=true&socketTimeout=0

credentialType=AWS-IAM은 RDS 토큰을 암호로 사용합니다.오류 메시지를 보면 만료된 토큰이 MariaDB 드라이버에 의해 데이터베이스 연결을 얻는 데 사용된 것 같습니다.이것이 MariaDB 드라이버의 버그입니까?애플리케이션 종료 시 추가로 해야 할 일이 있으면 알려주시겠습니까?응용프로그램에서 설정한 속성입니다.

spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.datasource.hikari.minimum-idle=5
spring.datasource.hikari.maximum-pool-size=60
spring.datasource.hikari.idle-timeout=600000
spring.datasource.hikari.connection-timeout=3000
spring.datasource.hikari.validation-timeout=1000
spring.datasource.hikari.login-timeout=2000
spring.datasource.hikari.max-lifetime=180000
spring.datasource.hikari.data-source-properties.cachePrepStmts=true
spring.datasource.hikari.data-source-properties.prepStmtCacheSize=1000
spring.datasource.hikari.data-source-properties.prepStmtCacheSqlLimit=2048
spring.datasource.hikari.data-source-properties.useServerPrepStmts=true

언급URL : https://stackoverflow.com/questions/71686378/mariadb-driver-aurora-iam-credentialtype-access-denied-for-user-using-password

반응형