Skip to content

Commit

Permalink
Revert "Using SAML subject_key and roles_key in the HTTPSamlAuthentic… (
Browse files Browse the repository at this point in the history
#1012)

* Revert "Using SAML subject_key and roles_key in the HTTPSamlAuthenticator"

This reverts commit a629421.

* Try using another port 8088 for running the webhook test (#999)

(cherry picked from commit 7db5afe)

Co-authored-by: Sujith Vadakkepat <svadakke@amazon.com>
  • Loading branch information
debjanibnrj and sujithvm authored Feb 5, 2021
1 parent 429afde commit 167bb72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,11 +444,11 @@ public void httpsTest() throws Exception {

@Test
public void httpsTestPemDefault() throws Exception {

final int port = 8088;
TestHttpHandler handler = new TestHttpHandler();

server = ServerBootstrap.bootstrap()
.setListenerPort(8084)
.setListenerPort(port)
.setServerInfo("Test/1.1")
.setSslContext(createSSLContext())
.registerHandler("*", handler)
Expand All @@ -458,7 +458,7 @@ public void httpsTestPemDefault() throws Exception {
AuditMessage msg = MockAuditMessageFactory.validAuditMessage();
LoggingSink fallback = new LoggingSink("test", Settings.EMPTY, null, null);

String url = "https://localhost:8084/endpoint";
String url = "https://localhost:" + port + "/endpoint";

// test default with filepath
handler.reset();
Expand Down

0 comments on commit 167bb72

Please sign in to comment.