Class RemoteKadminImpl

java.lang.Object
org.apache.kerby.kerberos.kerb.admin.kadmin.remote.RemoteKadminImpl
All Implemented Interfaces:
Kadmin

public class RemoteKadminImpl extends Object implements Kadmin
Server side admin facilities from remote, similar to MIT Kadmin remote mode. It uses GSSAPI and XDR to communicate with remote KDC/kadmind to do the requested operations. In the client side, it simply wraps and sends the request info to the admin kadmind side, and then unwraps the response for the operation result. TO BE IMPLEMENTED.
  • Constructor Details

    • RemoteKadminImpl

      public RemoteKadminImpl(InternalAdminClient innerClient, Subject subject) throws org.apache.kerby.kerberos.kerb.KrbException
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException
  • Method Details

    • getInnerClient

      public InternalAdminClient getInnerClient()
    • getKadminPrincipal

      public String getKadminPrincipal()
      Description copied from interface: Kadmin
      Get the kadmin principal name.
      Specified by:
      getKadminPrincipal in interface Kadmin
      Returns:
      The kadmin principal name.
    • addPrincipal

      public void addPrincipal(String principal) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Add principal to backend.
      Specified by:
      addPrincipal in interface Kadmin
      Parameters:
      principal - The principal to be added into backend
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • addPrincipal

      public void addPrincipal(String principal, org.apache.kerby.KOptions kOptions) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Add principal to backend.
      Specified by:
      addPrincipal in interface Kadmin
      Parameters:
      principal - The principal to be added into backend
      kOptions - The KOptions with principal info
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • addPrincipal

      public void addPrincipal(String principal, String password) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Add principal to backend.
      Specified by:
      addPrincipal in interface Kadmin
      Parameters:
      principal - The principal to be added into backend
      password - The password to create encryption key
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • addPrincipal

      public void addPrincipal(String principal, String password, org.apache.kerby.KOptions kOptions) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Add principal to backend.
      Specified by:
      addPrincipal in interface Kadmin
      Parameters:
      principal - The principal to be added into backend
      password - The password to create encryption key
      kOptions - The KOptions with principal info
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • exportKeytab

      public void exportKeytab(File keytabFile, String principal) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Export all the keys of the specified principal into the specified keytab file.
      Specified by:
      exportKeytab in interface Kadmin
      Parameters:
      keytabFile - The keytab file
      principal - The principal name
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • exportKeytab

      public void exportKeytab(File keytabFile, List<String> principals) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Export all the keys of the specified principals into the specified keytab file.
      Specified by:
      exportKeytab in interface Kadmin
      Parameters:
      keytabFile - The keytab file
      principals - The principal names
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • exportKeytab

      public void exportKeytab(File keytabFile) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Export all identity keys to the specified keytab file.
      Specified by:
      exportKeytab in interface Kadmin
      Parameters:
      keytabFile - The keytab file
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • removeKeytabEntriesOf

      public void removeKeytabEntriesOf(File keytabFile, String principal) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Remove all the keys of the specified principal in the specified keytab file.
      Specified by:
      removeKeytabEntriesOf in interface Kadmin
      Parameters:
      keytabFile - The keytab file
      principal - The principal name
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • removeKeytabEntriesOf

      public void removeKeytabEntriesOf(File keytabFile, String principal, int kvno) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Remove all the keys of the specified principal with specified kvno in the specified keytab file.
      Specified by:
      removeKeytabEntriesOf in interface Kadmin
      Parameters:
      keytabFile - The keytab file
      principal - The principal name
      kvno - The kvno
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • removeOldKeytabEntriesOf

      public void removeOldKeytabEntriesOf(File keytabFile, String principal) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Remove all the old keys of the specified principal in the specified keytab file.
      Specified by:
      removeOldKeytabEntriesOf in interface Kadmin
      Parameters:
      keytabFile - The keytab file
      principal - The principal name
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • deletePrincipal

      public void deletePrincipal(String principal) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Delete the principal in backend.
      Specified by:
      deletePrincipal in interface Kadmin
      Parameters:
      principal - The principal to be deleted from backend
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • modifyPrincipal

      public void modifyPrincipal(String principal, org.apache.kerby.KOptions kOptions) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Modify the principal with KOptions.
      Specified by:
      modifyPrincipal in interface Kadmin
      Parameters:
      principal - The principal to be modified
      kOptions - The KOptions with changed principal info
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • renamePrincipal

      public void renamePrincipal(String oldPrincipalName, String newPrincipalName) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Rename the principal.
      Specified by:
      renamePrincipal in interface Kadmin
      Parameters:
      oldPrincipalName - The original principal name
      newPrincipalName - The new principal name
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • getPrincipals

      public List<String> getPrincipals() throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Get all the principal names from backend.
      Specified by:
      getPrincipals in interface Kadmin
      Returns:
      principal list
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • getPrincipals

      public List<String> getPrincipals(String globString) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Get all the principal names that meets the pattern
      Specified by:
      getPrincipals in interface Kadmin
      Parameters:
      globString - The glob string for matching
      Returns:
      Principal names
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • changePassword

      public void changePassword(String principal, String newPassword) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Change the password of specified principal.
      Specified by:
      changePassword in interface Kadmin
      Parameters:
      principal - The principal to be updated password
      newPassword - The new password
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • updateKeys

      public void updateKeys(String principal) throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Update the random keys of specified principal.
      Specified by:
      updateKeys in interface Kadmin
      Parameters:
      principal - The principal to be updated keys
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • release

      public void release() throws org.apache.kerby.kerberos.kerb.KrbException
      Description copied from interface: Kadmin
      Release any resources associated.
      Specified by:
      release in interface Kadmin
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException - e
    • getPrincipal

      public org.apache.kerby.kerberos.kerb.request.KrbIdentity getPrincipal(String principalName) throws org.apache.kerby.kerberos.kerb.KrbException
      Throws:
      org.apache.kerby.kerberos.kerb.KrbException