Class KdcServer
java.lang.Object
org.apache.kerby.kerberos.kerb.server.KdcServer
The implemented Kerberos Server API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAllow to debug so have more logs.org.apache.kerby.kerberos.kerb.identity.backend.BackendConfigGet backend config.org.apache.kerby.kerberos.kerb.identity.backend.IdentityBackendGet identity service.Get the KDC config.intGet the KDC port, if it has been set.Get KDC setting from startup options and configs.intGet the KDC Tcp port, if it has been set.intGet the KDC udp port, if it has been set.voidinit()Initialize.voidsetAllowTcp(boolean allowTcp) Set to allow TCP or not.voidsetAllowUdp(boolean allowUdp) Set to allow UDP or not.voidsetInnerKdcImpl(InternalKdcServer innerKdcImpl) Allow to hook customized kdc implementation.voidsetKdcHost(String kdcHost) Set KDC host.voidsetKdcPort(int kdcPort) Set KDC port.voidsetKdcRealm(String realm) Set KDC realm for ticket requestvoidsetKdcTcpPort(int kdcTcpPort) Set KDC tcp port.voidsetKdcUdpPort(int kdcUdpPort) Set KDC udp port.voidsetWorkDir(File workDir) Set runtime folder.voidstart()Start the KDC server.voidstop()Stop the KDC server.
-
Constructor Details
-
KdcServer
public KdcServer(KdcConfig kdcConfig, org.apache.kerby.kerberos.kerb.identity.backend.BackendConfig backendConfig) throws org.apache.kerby.kerberos.kerb.KrbException Constructor passing both kdcConfig and backendConfig.- Parameters:
kdcConfig- The kdc configbackendConfig- The backend config- Throws:
org.apache.kerby.kerberos.kerb.KrbException- e
-
KdcServer
Constructor given confDir where 'kdc.conf' and 'backend.conf' should be available. kdc.conf, that contains kdc server related items. backend.conf, that contains identity backend related items.- Parameters:
confDir- The conf dir- Throws:
org.apache.kerby.kerberos.kerb.KrbException- e
-
KdcServer
public KdcServer()Default constructor.
-
-
Method Details
-
setKdcRealm
Set KDC realm for ticket request- Parameters:
realm- The kdc realm
-
setKdcHost
Set KDC host.- Parameters:
kdcHost- The kdc host
-
setKdcPort
public void setKdcPort(int kdcPort) Set KDC port.- Parameters:
kdcPort- The kdc port
-
getKdcPort
public int getKdcPort()Get the KDC port, if it has been set. -
setKdcTcpPort
public void setKdcTcpPort(int kdcTcpPort) Set KDC tcp port.- Parameters:
kdcTcpPort- The kdc tcp port
-
getKdcTcpPort
public int getKdcTcpPort()Get the KDC Tcp port, if it has been set. -
setAllowUdp
public void setAllowUdp(boolean allowUdp) Set to allow UDP or not.- Parameters:
allowUdp- true if allow udp
-
setAllowTcp
public void setAllowTcp(boolean allowTcp) Set to allow TCP or not.- Parameters:
allowTcp- true if allow tcp
-
setKdcUdpPort
public void setKdcUdpPort(int kdcUdpPort) Set KDC udp port. Only makes sense when allowUdp is set.- Parameters:
kdcUdpPort- The kdc udp port
-
getKdcUdpPort
public int getKdcUdpPort()Get the KDC udp port, if it has been set. -
setWorkDir
Set runtime folder.- Parameters:
workDir- The work dir
-
enableDebug
public void enableDebug()Allow to debug so have more logs. -
setInnerKdcImpl
Allow to hook customized kdc implementation.- Parameters:
innerKdcImpl- The inner kdc implementation
-
getKdcSetting
Get KDC setting from startup options and configs.- Returns:
- setting
-
getKdcConfig
Get the KDC config.- Returns:
- KdcConfig
-
getBackendConfig
public org.apache.kerby.kerberos.kerb.identity.backend.BackendConfig getBackendConfig()Get backend config.- Returns:
- backend configuration
-
getIdentityService
public org.apache.kerby.kerberos.kerb.identity.backend.IdentityBackend getIdentityService()Get identity service.- Returns:
- IdentityService
-
init
public void init() throws org.apache.kerby.kerberos.kerb.KrbExceptionInitialize.- Throws:
org.apache.kerby.kerberos.kerb.KrbException- e.
-
start
public void start() throws org.apache.kerby.kerberos.kerb.KrbExceptionStart the KDC server.- Throws:
org.apache.kerby.kerberos.kerb.KrbException- e.
-
stop
public void stop() throws org.apache.kerby.kerberos.kerb.KrbExceptionStop the KDC server.- Throws:
org.apache.kerby.kerberos.kerb.KrbException- e.
-