From 24c571f4771d18b30b0494831a01dcb60a03dc11 Mon Sep 17 00:00:00 2001 From: ejeffrli Date: Fri, 8 Nov 2024 14:10:57 -0500 Subject: [PATCH] Make username and password case insensitive for jdbc --- .../jdbc/connection/RdsSecretsCredentialProvider.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/athena-jdbc/src/main/java/com/amazonaws/athena/connectors/jdbc/connection/RdsSecretsCredentialProvider.java b/athena-jdbc/src/main/java/com/amazonaws/athena/connectors/jdbc/connection/RdsSecretsCredentialProvider.java index 71fdfda3bf..7f563a50ad 100644 --- a/athena-jdbc/src/main/java/com/amazonaws/athena/connectors/jdbc/connection/RdsSecretsCredentialProvider.java +++ b/athena-jdbc/src/main/java/com/amazonaws/athena/connectors/jdbc/connection/RdsSecretsCredentialProvider.java @@ -48,7 +48,12 @@ public RdsSecretsCredentialProvider(final String secretString) { Map rdsSecrets; try { - rdsSecrets = OBJECT_MAPPER.readValue(secretString, HashMap.class); + Map originalMap = OBJECT_MAPPER.readValue(secretString, HashMap.class); + + rdsSecrets = new HashMap<>(); + for (Map.Entry entry : originalMap.entrySet()) { + rdsSecrets.put(entry.getKey().toLowerCase(), entry.getValue()); + } } catch (IOException ioException) { throw new RuntimeException("Could not deserialize RDS credentials into HashMap", ioException);