public class LocalKadminImpl extends Object implements LocalKadmin
| Constructor and Description |
|---|
LocalKadminImpl(File confDir)
Construct with prepared conf dir.
|
LocalKadminImpl(KdcConfig kdcConfig,
org.apache.kerby.kerberos.kerb.identity.backend.BackendConfig backendConfig)
Construct with prepared AdminServerConfig and BackendConfig.
|
LocalKadminImpl(KdcSetting kdcSetting,
org.apache.kerby.kerberos.kerb.identity.backend.IdentityBackend backend)
Construct with prepared AdminServerSetting and Backend.
|
LocalKadminImpl(ServerSetting serverSetting) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPrincipal(String principal)
Add principal to backend.
|
void |
addPrincipal(String principal,
org.apache.kerby.KOptions kOptions)
Add principal to backend.
|
void |
addPrincipal(String principal,
String password)
Add principal to backend.
|
void |
addPrincipal(String principal,
String password,
org.apache.kerby.KOptions kOptions)
Add principal to backend.
|
void |
changePassword(String principal,
String newPassword)
Change the password of specified principal.
|
void |
checkBuiltinPrincipals()
Check the built-in principals, will throw KrbException if not exist.
|
void |
createBuiltinPrincipals()
Create build-in principals.
|
void |
deleteBuiltinPrincipals()
Delete build-in principals.
|
void |
deletePrincipal(String principal)
Delete the principal in backend.
|
void |
exportKeytab(File keytabFile)
Export all identity keys to the specified keytab file.
|
void |
exportKeytab(File keytabFile,
List<String> principals)
Export all the keys of the specified principals into the specified keytab
file.
|
void |
exportKeytab(File keytabFile,
String principal)
Export all the keys of the specified principal into the specified keytab
file.
|
org.apache.kerby.kerberos.kerb.identity.backend.BackendConfig |
getBackendConfig()
Get backend config.
|
org.apache.kerby.kerberos.kerb.identity.backend.IdentityBackend |
getIdentityBackend()
Get identity backend.
|
String |
getKadminPrincipal()
Get the kadmin principal name.
|
KdcConfig |
getKdcConfig()
Get kdc config.
|
org.apache.kerby.kerberos.kerb.request.KrbIdentity |
getPrincipal(String principalName)
Get the identity from backend.
|
List<String> |
getPrincipals()
Get all the principal names from backend.
|
List<String> |
getPrincipals(String globString)
Get all the principal names that meets the pattern
|
void |
modifyPrincipal(String principal,
org.apache.kerby.KOptions kOptions)
Modify the principal with KOptions.
|
void |
release()
Release any resources associated.
|
void |
removeKeytabEntriesOf(File keytabFile,
String principal)
Remove all the keys of the specified principal in the specified keytab
file.
|
void |
removeKeytabEntriesOf(File keytabFile,
String principal,
int kvno)
Remove all the keys of the specified principal with specified kvno
in the specified keytab file.
|
void |
removeOldKeytabEntriesOf(File keytabFile,
String principal)
Remove all the old keys of the specified principal
in the specified keytab file.
|
void |
renamePrincipal(String oldPrincipalName,
String newPrincipalName)
Rename the principal.
|
int |
size()
get size of principal
|
void |
updateKeys(String principal)
Update the random keys of specified principal.
|
public LocalKadminImpl(KdcConfig kdcConfig, org.apache.kerby.kerberos.kerb.identity.backend.BackendConfig backendConfig) throws KrbException
kdcConfig - The kdc configbackendConfig - The backend configKrbException - epublic LocalKadminImpl(ServerSetting serverSetting) throws KrbException
KrbExceptionpublic LocalKadminImpl(File confDir) throws KrbException
confDir - The path of conf dirKrbException - epublic LocalKadminImpl(KdcSetting kdcSetting, org.apache.kerby.kerberos.kerb.identity.backend.IdentityBackend backend)
kdcSetting - The kdc settingbackend - The identity backendpublic String getKadminPrincipal()
KadmingetKadminPrincipal in interface Kadminpublic void checkBuiltinPrincipals()
throws KrbException
LocalKadmincheckBuiltinPrincipals in interface LocalKadminKrbException - epublic void createBuiltinPrincipals()
throws KrbException
LocalKadmincreateBuiltinPrincipals in interface LocalKadminKrbException - epublic void deleteBuiltinPrincipals()
throws KrbException
LocalKadmindeleteBuiltinPrincipals in interface LocalKadminKrbException - epublic KdcConfig getKdcConfig()
LocalKadmingetKdcConfig in interface LocalKadminpublic org.apache.kerby.kerberos.kerb.identity.backend.BackendConfig getBackendConfig()
LocalKadmingetBackendConfig in interface LocalKadminpublic org.apache.kerby.kerberos.kerb.identity.backend.IdentityBackend getIdentityBackend()
LocalKadmingetIdentityBackend in interface LocalKadminpublic void addPrincipal(String principal) throws KrbException
KadminaddPrincipal in interface Kadminprincipal - The principal to be added into backendKrbException - epublic void addPrincipal(String principal, org.apache.kerby.KOptions kOptions) throws KrbException
KadminaddPrincipal in interface Kadminprincipal - The principal to be added into backendkOptions - The KOptions with principal infoKrbException - epublic void addPrincipal(String principal, String password) throws KrbException
KadminaddPrincipal in interface Kadminprincipal - The principal to be added into backendpassword - The password to create encryption keyKrbException - epublic void addPrincipal(String principal, String password, org.apache.kerby.KOptions kOptions) throws KrbException
KadminaddPrincipal in interface Kadminprincipal - The principal to be added into backendpassword - The password to create encryption keykOptions - The KOptions with principal infoKrbException - epublic void exportKeytab(File keytabFile, String principal) throws KrbException
KadminexportKeytab in interface KadminkeytabFile - The keytab fileprincipal - The principal nameKrbException - epublic void exportKeytab(File keytabFile, List<String> principals) throws KrbException
KadminexportKeytab in interface KadminkeytabFile - The keytab fileprincipals - The principal namesKrbException - epublic void exportKeytab(File keytabFile) throws KrbException
KadminexportKeytab in interface KadminkeytabFile - The keytab fileKrbException - epublic void removeKeytabEntriesOf(File keytabFile, String principal) throws KrbException
KadminremoveKeytabEntriesOf in interface KadminkeytabFile - The keytab fileprincipal - The principal nameKrbException - epublic void removeKeytabEntriesOf(File keytabFile, String principal, int kvno) throws KrbException
KadminremoveKeytabEntriesOf in interface KadminkeytabFile - The keytab fileprincipal - The principal namekvno - The kvnoKrbException - epublic void removeOldKeytabEntriesOf(File keytabFile, String principal) throws KrbException
KadminremoveOldKeytabEntriesOf in interface KadminkeytabFile - The keytab fileprincipal - The principal nameKrbException - epublic void deletePrincipal(String principal) throws KrbException
KadmindeletePrincipal in interface Kadminprincipal - The principal to be deleted from backendKrbException - epublic void modifyPrincipal(String principal, org.apache.kerby.KOptions kOptions) throws KrbException
KadminmodifyPrincipal in interface Kadminprincipal - The principal to be modifiedkOptions - The KOptions with changed principal infoKrbException - epublic void renamePrincipal(String oldPrincipalName, String newPrincipalName) throws KrbException
KadminrenamePrincipal in interface KadminoldPrincipalName - The original principal namenewPrincipalName - The new principal nameKrbException - epublic org.apache.kerby.kerberos.kerb.request.KrbIdentity getPrincipal(String principalName) throws KrbException
LocalKadmingetPrincipal in interface LocalKadminprincipalName - The principal nameKrbException - epublic List<String> getPrincipals() throws KrbException
KadmingetPrincipals in interface KadminKrbException - epublic List<String> getPrincipals(String globString) throws KrbException
KadmingetPrincipals in interface KadminglobString - The glob string for matchingKrbException - epublic void changePassword(String principal, String newPassword) throws KrbException
KadminchangePassword in interface Kadminprincipal - The principal to be updated passwordnewPassword - The new passwordKrbException - epublic void updateKeys(String principal) throws KrbException
KadminupdateKeys in interface Kadminprincipal - The principal to be updated keysKrbException - epublic void release()
throws KrbException
Kadminrelease in interface KadminKrbException - epublic int size()
throws KrbException
size in interface LocalKadminKrbExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.