Top Description Inners Constructors Methods
org.apache.sshd.server.auth.gss

public final Class CredentialHelper

extends Object
Class Inheritance
Imports
java.security.PrivilegedActionException, .PrivilegedExceptionAction, java.util.Map, .TreeMap, javax.security.auth.Subject, javax.security.auth.login.AppConfigurationEntry, .Configuration, .LoginContext, .LoginException, org.ietf.jgss.GSSCredential, .GSSException, .GSSManager

Simple helper class which gets GSS credential using a fixed Krb5 login configuration. May need generalizing to deal with non-Sun JREs.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
CredentialHelper.FixedLoginConfiguration

A login configuration which is defined from code.

private static class
CredentialHelper.G

Privileged action which runs as the subject to get the credentials.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static GSSCredential
creds(GSSManager mgr, String spn, String keytab)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CredentialHelperback to summary
private CredentialHelper()

Method Detail

credsback to summary
public static GSSCredential creds(GSSManager mgr, String spn, String keytab) throws LoginException, GSSException
Annotations
@SuppressWarnings:synthetic-access
org.apache.sshd.server.auth.gss back to summary

private final Class CredentialHelper.FixedLoginConfiguration

extends Configuration
Class Inheritance

A login configuration which is defined from code.
Author
Richard Evans

Field Summary

Modifier and TypeField and Description
private AppConfigurationEntry

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public AppConfigurationEntry[]
getAppConfigurationEntry(String
the name used to index the Configuration.
name
)

Implements abstract javax.security.auth.login.Configuration.getAppConfigurationEntry.

Retrieve the AppConfigurationEntries for the specified name from this Configuration.

public void
refresh()

Overrides javax.security.auth.login.Configuration.refresh.

Refresh and reload the Configuration.

Inherited from javax.security.auth.login.Configuration:
getConfigurationgetInstancegetInstancegetInstancegetParametersgetProvidergetTypesetConfiguration

Field Detail

entryback to summary
private AppConfigurationEntry entry

Constructor Detail

FixedLoginConfigurationback to summary
private FixedLoginConfiguration(String spn, String keytab)

Method Detail

getAppConfigurationEntryback to summary
public AppConfigurationEntry[] getAppConfigurationEntry(String name)

Implements abstract javax.security.auth.login.Configuration.getAppConfigurationEntry.

Doc from javax.security.auth.login.Configuration.getAppConfigurationEntry.

Retrieve the AppConfigurationEntries for the specified name from this Configuration.

Parameters
name:String

the name used to index the Configuration.

Returns:AppConfigurationEntry[]

an array of AppConfigurationEntries for the specified name from this Configuration, or null if there are no entries for the specified name

Annotations
@Override
refreshback to summary
public void refresh()

Overrides javax.security.auth.login.Configuration.refresh.

Doc from javax.security.auth.login.Configuration.refresh.

Refresh and reload the Configuration.

This method causes this Configuration object to refresh/reload its contents in an implementation-dependent manner. For example, if this Configuration object stores its entries in a file, calling refresh may cause the file to be re-read.

The default implementation of this method does nothing. This method should be overridden if a refresh operation is supported by the implementation.

Annotations
@Override
org.apache.sshd.server.auth.gss back to summary

private final Class CredentialHelper.G

extends Object
implements PrivilegedExceptionAction<GSSCredential>
Class Inheritance
All Implemented Interfaces
java.security.PrivilegedExceptionAction

Privileged action which runs as the subject to get the credentials.

Field Summary

Modifier and TypeField and Description
private GSSManager

Constructor Summary

AccessConstructor and Description
private
G(GSSManager
The existing GSS manager
mgr
)

Method Summary

Modifier and TypeMethod and Description
public GSSCredential
run()

Implements java.security.PrivilegedExceptionAction.run.

Performs the computation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mgrback to summary
private GSSManager mgr

Constructor Detail

Gback to summary
private G(GSSManager mgr)
Parameters
mgr:GSSManager

The existing GSS manager

Method Detail

runback to summary
public GSSCredential run() throws GSSException

Implements java.security.PrivilegedExceptionAction.run.

Doc from java.security.PrivilegedExceptionAction.run.

Performs the computation. This method will be called by AccessController.doPrivileged.

Returns:GSSCredential

a class-dependent value that may represent the results of the computation. Each class that implements PrivilegedExceptionAction should document what (if anything) this value represents.

Annotations
@Override