public final class AdminHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.apache.kerby.kerberos.kerb.request.KrbIdentity |
createIdentity(String principal,
org.apache.kerby.KOptions kOptions)
Create principal.
|
static Keytab |
createOrLoadKeytab(File keytabFile)
If keytab file does not exist, create a new keytab,
otherwise load keytab from keytab file.
|
static void |
exportKeytab(File keytabFile,
org.apache.kerby.kerberos.kerb.request.KrbIdentity identity)
Export all the keys of the specified principal into the specified keytab
file.
|
static void |
exportKeytab(File keytabFile,
List<org.apache.kerby.kerberos.kerb.request.KrbIdentity> identities)
Export all the keys of the specified principal into the specified keytab
file.
|
static void |
exportToKeytab(Keytab keytab,
org.apache.kerby.kerberos.kerb.request.KrbIdentity identity)
Export all the keys of the specified identity into the keytab.
|
static Pattern |
getPatternFromGlobPatternString(String globString)
Get all the Pattern for matching from glob string.
|
static Keytab |
loadKeytab(File keytabFile)
Load keytab from keytab file.
|
static Keytab |
loadKeytab(InputStream keytabInputStream)
Load keytab from Input stream.
|
static void |
removeKeytabEntriesOf(File keytabFile,
String principalName)
Remove all the keys of the specified principal in the specified keytab
file.
|
static void |
removeOldKeytabEntriesOf(File keytabFile,
String principalName)
Remove all the old keys of the specified principal
in the specified keytab file.
|
static void |
storeKeytab(Keytab keytab,
File keytabFile)
Store the keytab to keytab file.
|
static void |
updateIdentity(org.apache.kerby.kerberos.kerb.request.KrbIdentity identity,
org.apache.kerby.KOptions kOptions)
Modify the principal with KOptions.
|
public static void exportKeytab(File keytabFile, org.apache.kerby.kerberos.kerb.request.KrbIdentity identity) throws KrbException
keytabFile - The keytab fileidentity - The identityKrbException - If there is a problem exporting the keys of the specified principalpublic static void exportKeytab(File keytabFile, List<org.apache.kerby.kerberos.kerb.request.KrbIdentity> identities) throws KrbException
keytabFile - The keytab fileidentities - Identities to export to keytabFileKrbException - If there is a problem exporting the keys of the specified principalpublic static Keytab loadKeytab(File keytabFile) throws KrbException
keytabFile - The keytab fileKrbException - If there is a problem loading the keytabpublic static Keytab loadKeytab(InputStream keytabInputStream) throws KrbException
keytabInputStream - The Input streamKrbException - If there is a problem loading the Input streampublic static Keytab createOrLoadKeytab(File keytabFile) throws KrbException
keytabFile - The keytab fileKrbException - If there is a problem creating or loading the keytabpublic static void exportToKeytab(Keytab keytab, org.apache.kerby.kerberos.kerb.request.KrbIdentity identity) throws KrbException
keytab - The keytabidentity - The identityKrbException - If there is a problem exporting the identity to the keytabpublic static void storeKeytab(Keytab keytab, File keytabFile) throws KrbException
keytab - The keytabkeytabFile - The keytab fileKrbException - If there is a problem storing the keytabpublic static void removeKeytabEntriesOf(File keytabFile, String principalName) throws KrbException
keytabFile - The keytab fileprincipalName - The principal nameKrbException - If there is a problem removing the keys of the specified principalpublic static void removeOldKeytabEntriesOf(File keytabFile, String principalName) throws KrbException
keytabFile - The keytab fileprincipalName - The principal nameKrbException - If there is a problem in removing the old keys of the specified principalpublic static org.apache.kerby.kerberos.kerb.request.KrbIdentity createIdentity(String principal, org.apache.kerby.KOptions kOptions) throws KrbException
principal - The principal name to be createdkOptions - The KOptions with principal infoKrbException - If there is a problem in creating the principalpublic static void updateIdentity(org.apache.kerby.kerberos.kerb.request.KrbIdentity identity, org.apache.kerby.KOptions kOptions)
identity - The identity to be modifiedkOptions - The KOptions with changed principal infopublic static Pattern getPatternFromGlobPatternString(String globString) throws KrbException
globString - The glob string for matchingKrbException - If there is a problem in compiling the pattern stringCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.