Package com.hazelcast.config.security
Class KerberosIdentityConfig
- java.lang.Object
-
- com.hazelcast.config.security.KerberosIdentityConfig
-
- All Implemented Interfaces:
IdentityConfig
public class KerberosIdentityConfig extends java.lang.Object implements IdentityConfig
This class configures the Kerberos identity. Based on this configuration, service tickets are retrieved from Kerberos KDC (Key Distribution Center).
-
-
Constructor Summary
Constructors Constructor Description KerberosIdentityConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ICredentialsFactory
asCredentialsFactory(java.lang.ClassLoader cl)
Converts current configuration to aICredentialsFactory
instance.IdentityConfig
copy()
Makes a copy (or clone) of the config object.boolean
equals(java.lang.Object obj)
java.lang.String
getKeytabFile()
java.lang.String
getPrincipal()
java.lang.String
getRealm()
java.lang.String
getSecurityRealm()
java.lang.String
getServiceNamePrefix()
java.lang.String
getSpn()
java.lang.Boolean
getUseCanonicalHostname()
int
hashCode()
KerberosIdentityConfig
setKeytabFile(java.lang.String keytabFile)
Allows (together with thesetPrincipal(String)
) simplification of security realm configuration.KerberosIdentityConfig
setPrincipal(java.lang.String principal)
Allows (together with thesetKeytabFile(String)
) simplification of security realm configuration.KerberosIdentityConfig
setRealm(java.lang.String realm)
Defines Kerberos realm name (e.g.KerberosIdentityConfig
setSecurityRealm(java.lang.String securityRealm)
Configures a reference to Security realm name in Hazelcast configuration.KerberosIdentityConfig
setServiceNamePrefix(java.lang.String serviceNamePrefix)
Defines prefix of the Service Principal name.KerberosIdentityConfig
setSpn(java.lang.String spn)
Allows to configure static service principal name (SPN).KerberosIdentityConfig
setUseCanonicalHostname(java.lang.Boolean useCanonicalHostname)
Allows using fully qualified domain name instead of IP address when the SPN is constructed from a prefix and realm name.java.lang.String
toString()
-
-
-
Method Detail
-
getSpn
public java.lang.String getSpn()
-
setSpn
public KerberosIdentityConfig setSpn(java.lang.String spn)
Allows to configure static service principal name (SPN). It's meant for usecases where all members share a single Kerberos identity.
-
getServiceNamePrefix
public java.lang.String getServiceNamePrefix()
-
setServiceNamePrefix
public KerberosIdentityConfig setServiceNamePrefix(java.lang.String serviceNamePrefix)
Defines prefix of the Service Principal name. It's default value is"hz/"
. By default the member's principal name (for which this credentials factory asks the service ticket) is in form "[servicePrefix][memberIpAddress]@[REALM]" (e.g. "hz/192.168.1.1@ACME.COM").
-
getRealm
public java.lang.String getRealm()
-
setRealm
public KerberosIdentityConfig setRealm(java.lang.String realm)
Defines Kerberos realm name (e.g. "ACME.COM").
-
getKeytabFile
public java.lang.String getKeytabFile()
-
setKeytabFile
public KerberosIdentityConfig setKeytabFile(java.lang.String keytabFile)
Allows (together with thesetPrincipal(String)
) simplification of security realm configuration. For basic scenarios you don't need to usesetSecurityRealm(String)
, but you can instead define directly kerberos principal name and keytab file path with credentials for given principal.This configuration is only used when there is no
securityRealm
configured.
-
getPrincipal
public java.lang.String getPrincipal()
-
setPrincipal
public KerberosIdentityConfig setPrincipal(java.lang.String principal)
Allows (together with thesetKeytabFile(String)
) simplification of security realm configuration. For basic scenarios you don't need to usesetSecurityRealm(String)
, but you can instead define directly kerberos principal name and keytab file path with credentials for given principal.This configuration is only used when there is no
securityRealm
configured.
-
getSecurityRealm
public java.lang.String getSecurityRealm()
-
setSecurityRealm
public KerberosIdentityConfig setSecurityRealm(java.lang.String securityRealm)
Configures a reference to Security realm name in Hazelcast configuration. The realm's authentication configuration (when defined) is used to populate the user object with Kerberos credentials (e.g. TGT).
-
getUseCanonicalHostname
public java.lang.Boolean getUseCanonicalHostname()
-
setUseCanonicalHostname
public KerberosIdentityConfig setUseCanonicalHostname(java.lang.Boolean useCanonicalHostname)
Allows using fully qualified domain name instead of IP address when the SPN is constructed from a prefix and realm name. For instance, when settrue
, the SPN"hz/192.168.1.1@ACME.COM"
could become"hz/member1.acme.com@ACME.COM"
(given the reverse DNS lookup for 192.168.1.1 returns the "member1.acme.com" hostname).
-
asCredentialsFactory
public ICredentialsFactory asCredentialsFactory(java.lang.ClassLoader cl)
Description copied from interface:IdentityConfig
Converts current configuration to aICredentialsFactory
instance.- Specified by:
asCredentialsFactory
in interfaceIdentityConfig
- Parameters:
cl
- class loader to be used if the credentials factory class has to be constructed.- Returns:
ICredentialsFactory
instance
-
copy
public IdentityConfig copy()
Description copied from interface:IdentityConfig
Makes a copy (or clone) of the config object.- Specified by:
copy
in interfaceIdentityConfig
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-