Skip to content

Commit

Permalink
Merge pull request #9 from AvanzaBank/tp-325-gs-security-support-fixe…
Browse files Browse the repository at this point in the history
…s-gs14

TP-325: Allow singleton CredentialsProvider during GS tests
  • Loading branch information
kbs4j authored Jul 8, 2020
2 parents 062c52b + c151f50 commit bd0f2d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/avanza/gs/test/PartitionedPu.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ private void enableAuthentication(IntegratedProcessingUnitContainerProvider prov
final Properties contextProperties = provider.getBeanLevelProperties().getContextProperties();
contextProperties.put("com.gs.security.security-manager.class", new SecurityManagerForTests());
// SecurityManagerForTests will accept all credentials, so these can be anything
provider.setCredentialsProvider(new DefaultCredentialsProvider("", ""));
final DefaultCredentialsProvider credentialsProvider = new DefaultCredentialsProvider("", "");
provider.setCredentialsProvider(credentialsProvider);
// Despite its name, this property is read by com.avanza.astrix.gs.ClusteredProxyCacheImpl
System.getProperties().put("com.gs.security.credentials-provider.class", credentialsProvider);

// Override default timeouts that are being used when security is enabled
// during PU startup.
Expand Down

0 comments on commit bd0f2d2

Please sign in to comment.