Search in sources :

Example 1 with TlsAuthenticationConfig

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);
}
Also used : TlsAuthenticationConfig(com.hazelcast.config.security.TlsAuthenticationConfig)

Example 2 with TlsAuthenticationConfig

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);
}
Also used : RealmConfig(com.hazelcast.config.security.RealmConfig) TlsAuthenticationConfig(com.hazelcast.config.security.TlsAuthenticationConfig) TokenIdentityConfig(com.hazelcast.config.security.TokenIdentityConfig) LdapAuthenticationConfig(com.hazelcast.config.security.LdapAuthenticationConfig) SemaphoreConfig(com.hazelcast.config.cp.SemaphoreConfig) CPSubsystemConfig(com.hazelcast.config.cp.CPSubsystemConfig) SimpleAuthenticationConfig(com.hazelcast.config.security.SimpleAuthenticationConfig) KerberosIdentityConfig(com.hazelcast.config.security.KerberosIdentityConfig) KerberosAuthenticationConfig(com.hazelcast.config.security.KerberosAuthenticationConfig) RealmConfig(com.hazelcast.config.security.RealmConfig) JaasAuthenticationConfig(com.hazelcast.config.security.JaasAuthenticationConfig) JetConfig(com.hazelcast.jet.config.JetConfig) FencedLockConfig(com.hazelcast.config.cp.FencedLockConfig) TlsAuthenticationConfig(com.hazelcast.config.security.TlsAuthenticationConfig) ParallelJVMTest(com.hazelcast.test.annotation.ParallelJVMTest) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

TlsAuthenticationConfig (com.hazelcast.config.security.TlsAuthenticationConfig)2 CPSubsystemConfig (com.hazelcast.config.cp.CPSubsystemConfig)1 FencedLockConfig (com.hazelcast.config.cp.FencedLockConfig)1 SemaphoreConfig (com.hazelcast.config.cp.SemaphoreConfig)1 JaasAuthenticationConfig (com.hazelcast.config.security.JaasAuthenticationConfig)1 KerberosAuthenticationConfig (com.hazelcast.config.security.KerberosAuthenticationConfig)1 KerberosIdentityConfig (com.hazelcast.config.security.KerberosIdentityConfig)1 LdapAuthenticationConfig (com.hazelcast.config.security.LdapAuthenticationConfig)1 RealmConfig (com.hazelcast.config.security.RealmConfig)1 SimpleAuthenticationConfig (com.hazelcast.config.security.SimpleAuthenticationConfig)1 TokenIdentityConfig (com.hazelcast.config.security.TokenIdentityConfig)1 JetConfig (com.hazelcast.jet.config.JetConfig)1 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)1 QuickTest (com.hazelcast.test.annotation.QuickTest)1 Test (org.junit.Test)1