use of org.wildfly.swarm.management.ManagementFraction in project wildfly-swarm by wildfly-swarm.
the class MonitorSecurityTest method getContainer.
@CreateSwarm
public static Swarm getContainer() throws Exception {
Swarm container = new Swarm();
container.fraction(new JAXRSFraction());
container.fraction(new MonitorFraction().securityRealm("TestRealm"));
container.fraction(new ManagementFraction().securityRealm("TestRealm", (realm) -> {
realm.inMemoryAuthentication((authn) -> {
authn.add(new Properties() {
{
put("admin", "password");
}
}, true);
});
realm.inMemoryAuthorization();
}));
return container;
}
Aggregations