use of com.hazelcast.config.security.TlsAuthenticationConfig in project hazelcast by hazelcast.
the class MemberDomConfigProcessor method handleTlsAuthentication.
protected void handleTlsAuthentication(RealmConfig realmConfig, Node node) {
String roleAttribute = getAttribute(node, "roleAttribute");
TlsAuthenticationConfig tlsCfg = new TlsAuthenticationConfig();
fillClusterLoginConfig(tlsCfg, node);
if (roleAttribute != null) {
tlsCfg.setRoleAttribute(roleAttribute);
}
realmConfig.setTlsAuthenticationConfig(tlsCfg);
}
use of com.hazelcast.config.security.TlsAuthenticationConfig in project hazelcast by hazelcast.
the class ConfigXmlGeneratorTest method testTlsAuthenticationConfig.
@Test
public void testTlsAuthenticationConfig() {
Config cfg = new Config();
RealmConfig realmConfig = new RealmConfig().setTlsAuthenticationConfig(new TlsAuthenticationConfig().setRoleAttribute("roleAttribute"));
SecurityConfig expectedConfig = new SecurityConfig().setClientRealmConfig("tlsRealm", realmConfig);
cfg.setSecurityConfig(expectedConfig);
SecurityConfig actualConfig = getNewConfigViaXMLGenerator(cfg).getSecurityConfig();
assertEquals(expectedConfig, actualConfig);
}
Aggregations