org.wso2.carbon.apacheds.impl
Class ApacheKDCServer

java.lang.Object
  extended by org.wso2.carbon.apacheds.impl.ApacheKDCServer
All Implemented Interfaces:
KDCServer

public class ApacheKDCServer
extends Object
implements KDCServer

An implementation of the KDC server. This uses KDC server which comes with ApacheDS.


Field Summary
protected  LdapContext schemaRoot
          the context root for the schema
 
Constructor Summary
ApacheKDCServer()
           
 
Method Summary
protected  Attributes getPrincipalAttributes(String sn, String cn, String uid, String userPassword, String principal)
          Convenience method for creating principals.
 void init(KdcConfiguration configuration, LDAPServer ldapServer)
          Initializes the KDC server.
 boolean isKDCServerStarted()
          Says whether KDC server is started or not.
 void kerberizePartition(PartitionInfo partitionInfo, LDAPServer ldapServer)
          Once we add a new partition to LDAP server we need to make it a kerberos enabled realm.
 void start()
          Starts the KDC server.
 void stop()
          Stops the KDC server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

schemaRoot

protected LdapContext schemaRoot
the context root for the schema

Constructor Detail

ApacheKDCServer

public ApacheKDCServer()
Method Detail

init

public void init(KdcConfiguration configuration,
                 LDAPServer ldapServer)
          throws DirectoryServerException
Description copied from interface: KDCServer
Initializes the KDC server.

Specified by:
init in interface KDCServer
Parameters:
configuration - Configuration of the KDC server. This includes, host name to use, port numbers to use etc ... *
ldapServer - KDC server also needs a user store to authenticate users. This variable represents the LDAP server which stores users.
Throws:
DirectoryServerException - If an error occurred during initialization.

kerberizePartition

public void kerberizePartition(PartitionInfo partitionInfo,
                               LDAPServer ldapServer)
                        throws DirectoryServerException
Description copied from interface: KDCServer
Once we add a new partition to LDAP server we need to make it a kerberos enabled realm. For this we need to add special server principles to newly added partition. Following method will add those new server principles to the given partition.

Specified by:
kerberizePartition in interface KDCServer
Parameters:
partitionInfo - Partition configurations.
ldapServer - The LDAP server instance which we add the partition.
Throws:
DirectoryServerException - If an error occurred during operation.

getPrincipalAttributes

protected Attributes getPrincipalAttributes(String sn,
                                            String cn,
                                            String uid,
                                            String userPassword,
                                            String principal)
Convenience method for creating principals.

Parameters:
cn - the commonName of the person
principal - the kerberos principal name for the person
sn - the surName of the person
uid - the unique identifier for the person
userPassword - the credentials of the person
Returns:
the attributes of the person principal

start

public void start()
           throws DirectoryServerException
Description copied from interface: KDCServer
Starts the KDC server.

Specified by:
start in interface KDCServer
Throws:
DirectoryServerException - If an error occurred during startup.

isKDCServerStarted

public boolean isKDCServerStarted()
Description copied from interface: KDCServer
Says whether KDC server is started or not.

Specified by:
isKDCServerStarted in interface KDCServer
Returns:
true if started else false.

stop

public void stop()
          throws DirectoryServerException
Description copied from interface: KDCServer
Stops the KDC server.

Specified by:
stop in interface KDCServer
Throws:
DirectoryServerException - If an error occurred during server termination.


Copyright © 2015 WSO2. All rights reserved.