From ad2b42c6ee76f1d488f110170fcef59eac8f1af5 Mon Sep 17 00:00:00 2001 From: Debjani Banerjee <56744681+debjanibnrj@users.noreply.github.com> Date: Thu, 4 Feb 2021 16:45:27 -0800 Subject: [PATCH] Revert "Using SAML subject_key and roles_key in the HTTPSamlAuthenticator" (#1019) This reverts commit a629421f --- .../amazon/dlic/auth/http/saml/HTTPSamlAuthenticator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/amazon/dlic/auth/http/saml/HTTPSamlAuthenticator.java b/src/main/java/com/amazon/dlic/auth/http/saml/HTTPSamlAuthenticator.java index 6cd933f02e..c07ec8a769 100644 --- a/src/main/java/com/amazon/dlic/auth/http/saml/HTTPSamlAuthenticator.java +++ b/src/main/java/com/amazon/dlic/auth/http/saml/HTTPSamlAuthenticator.java @@ -338,12 +338,12 @@ private Settings createJwtAuthenticatorSettings(Settings settings) { settingsBuilder.put(jwtSettings); - if (jwtSettings.get("roles_key") == null) { - settingsBuilder.put("roles_key", settings.get("roles_key", "roles")); + if (jwtSettings.get("roles_key") == null && settings.get("roles_key") != null) { + settingsBuilder.put("roles_key", "roles"); } if (jwtSettings.get("subject_key") == null) { - settingsBuilder.put("subject_key", settings.get("subject_key", "sub")); + settingsBuilder.put("subject_key", "sub"); } return settingsBuilder.build();