Class GssApiMechanisms
java.lang.Object
org.eclipse.jgit.internal.transport.sshd.GssApiMechanisms
Global repository of GSS-API mechanisms that we can use.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Prefix to use withGSSName.NT_HOSTBASED_SERVICE
.static final Oid
TheOid
of Kerberos 5.private static final Object
ProtectssupportedMechanisms
.static final Oid
SGNEGO is not to be used with ssh.TheAtomicBoolean
is set totrue
when the mechanism could be initialized successfully at least once. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
closeContextSilently
(GSSContext context) Closes (disposes of) aGSSContext
ignoring anyGSSException
s.static GSSContext
createContext
(Oid mechanism, String fqdn) Creates aGSSContext
for the given mechanism to authenticate with the host given byfqdn
.private static Oid
static void
Mark the mechanisms as failed.static String
getCanonicalName
(InetSocketAddress remote) Determines a canonical host name for use use with GSS-API.static Collection<Oid>
Retrieves an immutable collection of the supported mechanisms.static InetAddress
resolve
(InetSocketAddress remote) Resolves anInetSocketAddress
.static void
Report that this mechanism was used successfully.
-
Field Details
-
GSSAPI_HOST_PREFIX
Prefix to use withGSSName.NT_HOSTBASED_SERVICE
.- See Also:
-
KERBEROS_5
TheOid
of Kerberos 5. -
SPNEGO
SGNEGO is not to be used with ssh. -
LOCK
ProtectssupportedMechanisms
. -
supportedMechanisms
TheAtomicBoolean
is set totrue
when the mechanism could be initialized successfully at least once.
-
-
Constructor Details
-
GssApiMechanisms
private GssApiMechanisms()
-
-
Method Details
-
getSupportedMechanisms
Retrieves an immutable collection of the supported mechanisms.- Returns:
- the supported mechanisms
-
worked
Report that this mechanism was used successfully.- Parameters:
mechanism
- that worked
-
failed
Mark the mechanisms as failed.- Parameters:
mechanism
- to mark
-
resolve
Resolves anInetSocketAddress
.- Parameters:
remote
- to resolve- Returns:
- the resolved
InetAddress
, ornull
if unresolved.
-
getCanonicalName
Determines a canonical host name for use use with GSS-API.- Parameters:
remote
- to get the host name from- Returns:
- the canonical host name, if it can be determined, otherwise the
unprocessed host name
.
-
createContext
Creates aGSSContext
for the given mechanism to authenticate with the host given byfqdn
.- Parameters:
mechanism
-Oid
of the mechanism to usefqdn
- fully qualified domain name of the host to authenticate with- Returns:
- the context, if the mechanism is available and the context could
be created, or
null
otherwise
-
closeContextSilently
Closes (disposes of) aGSSContext
ignoring anyGSSException
s.- Parameters:
context
- to dispose
-
createOid
-