Skip to content

Commit

Permalink
Fix was.policy for credential factory (frankframework#1914)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanbrakel authored Jun 16, 2021
1 parent 525e045 commit 7ffc55f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ public LoginContext getLoginContext() throws LoginException {
/*
* Dummy principal, to populate subject, to have at least a principal.
*/
private class IbisPrincipal implements Principal{
private class FrankPrincipal implements Principal{
@Override
public String getName() {
return "Ibis";
return "Frank";
}
}

Expand All @@ -209,7 +209,7 @@ protected void getCredentialsFromAlias() {
Set<Object> publicCredentials = new HashSet<>();
Set<Object> privateCredentials = new HashSet<>();

Principal p = new IbisPrincipal();
Principal p = new FrankPrincipal();
principals.add(p);
Subject initialSubject= new Subject(false, principals, publicCredentials, privateCredentials);
String loginConfiguration = AppConstants.getInstance().getProperty("PrincipalMapping", "DefaultPrincipalMapping");
Expand Down
2 changes: 1 addition & 1 deletion ear/src/main/application/META-INF/was.policy
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ permission java.util.PropertyPermission "*", "write";

// required to for CredentialFactory to obtain credentials from JAAS Authentication Entries:
permission javax.security.auth.AuthPermission "createLoginContext.DefaultPrincipalMapping";
permission javax.security.auth.PrivateCredentialPermission "javax.resource.spi.security.PasswordCredential nl.nn.adapterframework.util.CredentialFactory$IbisPrincipal "Ibis"", "read";
permission javax.security.auth.PrivateCredentialPermission "javax.resource.spi.security.PasswordCredential nl.nn.credentialprovider.WebSphereCredentials$FrankPrincipal "Frank"", "read";

// required for Spring AbstractAutowireCapableBeanFactory:
permission java.lang.RuntimePermission "getProtectionDomain";
Expand Down

0 comments on commit 7ffc55f

Please sign in to comment.