Skip to content

Commit

Permalink
[WFLY-9896] Add rule for jta authority authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
tadamski committed Nov 29, 2018
1 parent 4583669 commit 507069d
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -241,9 +241,12 @@ private static AuthenticationContext transformOne(RemotingProfileService.Connect
if (path != null && ! path.isEmpty()) {
rule = rule.matchPath(path);
}
MatchRule ejbRule = rule.matchAbstractType("ejb", "jboss");
MatchRule jtaRule = rule.matchAbstractType("jta", "jboss");
final OptionMap connectOptions = connectionSpec.getConnectOptions();
authenticationConfiguration = RemotingOptions.mergeOptionsIntoAuthenticationConfiguration(connectOptions, authenticationConfiguration);
AuthenticationConfiguration configuration = CLIENT.getAuthenticationConfiguration(destinationUri, context, - 1, "ejb", "jboss");
AuthenticationConfiguration ejbConfiguration = CLIENT.getAuthenticationConfiguration(destinationUri, context, - 1, "ejb", "jboss");
AuthenticationConfiguration jtaConfiguration = CLIENT.getAuthenticationConfiguration(destinationUri, context, - 1, "jta", "jboss");
if (sslContext == null) {
try {
sslContext = CLIENT.getSSLContext(destinationUri, context);
Expand All @@ -252,7 +255,7 @@ private static AuthenticationContext transformOne(RemotingProfileService.Connect
}
}
final SSLContext finalSSLContext = sslContext;
AuthenticationContext mergedAuthenticationContext = context.with(0, rule, configuration.with(authenticationConfiguration));
AuthenticationContext mergedAuthenticationContext = context.with(0, ejbRule, ejbConfiguration.with(authenticationConfiguration)).with(jtaRule, jtaConfiguration.with(authenticationConfiguration));
return mergedAuthenticationContext.withSsl(0, rule, () -> finalSSLContext);
}
}
Expand Down

0 comments on commit 507069d

Please sign in to comment.