Java Code Examples for javax.security.auth.kerberos.KeyTab#getInstance()

The following examples show how to use javax.security.auth.kerberos.KeyTab#getInstance() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KerberosUtilities.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
private KeyTab getKeyTab(final KerberosPrincipal principal, final File keyTabFile)
{
    if (!keyTabFile.exists() || !keyTabFile.canRead())
    {
        throw new IllegalArgumentException("Specified file does not exist or is not readable.");
    }

    final KeyTab keytab = KeyTab.getInstance(principal, keyTabFile);
    if (!keytab.exists())
    {
        throw new IllegalArgumentException("Specified file is not a keyTab file.");
    }

    final KerberosKey[] keys = keytab.getKeys(principal);
    if (keys.length == 0)
    {
        throw new IllegalArgumentException("Specified file does not contain at least one key for this principal.");
    }

    for (final KerberosKey key : keys)
    {
        try
        {
            key.destroy();
        }
        catch (DestroyFailedException e)
        {
            LOGGER.debug("Unable to destroy key", e);
        }
    }

    return keytab;
}
 
Example 2
Source File: ServiceCredsCombination.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private static KeyTab oldktab() {
    return KeyTab.getInstance();
}
 
Example 3
Source File: ServiceCredsCombination.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private static KeyTab oldktab() {
    return KeyTab.getInstance();
}
 
Example 4
Source File: ServiceCredsCombination.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
private static KeyTab oldktab() {
    return KeyTab.getInstance();
}
 
Example 5
Source File: ServiceCredsCombination.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private static KeyTab oldktab() {
    return KeyTab.getInstance();
}
 
Example 6
Source File: ServiceCredsCombination.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
static KeyTab ktab(String s) {
    return KeyTab.getInstance(princ(s));
}
 
Example 7
Source File: ServiceCredsCombination.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private static KeyTab oldktab() {
    return KeyTab.getInstance();
}
 
Example 8
Source File: ServiceCredsCombination.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
static KeyTab ktab(String s) {
    return KeyTab.getInstance(princ(s));
}
 
Example 9
Source File: ServiceCredsCombination.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
private static KeyTab oldktab() {
    return KeyTab.getInstance();
}
 
Example 10
Source File: ServiceCredsCombination.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
static KeyTab ktab(String s) {
    return KeyTab.getInstance(princ(s));
}
 
Example 11
Source File: ServiceCredsCombination.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
private static KeyTab oldktab() {
    return KeyTab.getInstance();
}
 
Example 12
Source File: ServiceCredsCombination.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
static KeyTab ktab(String s) {
    return KeyTab.getInstance(princ(s));
}
 
Example 13
Source File: ServiceCredsCombination.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private static KeyTab oldktab() {
    return KeyTab.getInstance();
}
 
Example 14
Source File: ServiceCredsCombination.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
static KeyTab ktab(String s) {
    return KeyTab.getInstance(princ(s));
}
 
Example 15
Source File: ServiceCredsCombination.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private static KeyTab oldktab() {
    return KeyTab.getInstance();
}
 
Example 16
Source File: ServiceCredsCombination.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
static KeyTab ktab(String s) {
    return KeyTab.getInstance(princ(s));
}
 
Example 17
Source File: ServiceCredsCombination.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private static KeyTab oldktab() {
    return KeyTab.getInstance();
}
 
Example 18
Source File: ServiceCredsCombination.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
static KeyTab ktab(String s) {
    return KeyTab.getInstance(princ(s));
}
 
Example 19
Source File: ServiceCredsCombination.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
static KeyTab ktab(String s) {
    return KeyTab.getInstance(princ(s));
}
 
Example 20
Source File: ServiceCredsCombination.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
static KeyTab ktab(String s) {
    return KeyTab.getInstance(princ(s));
}