Class HostAuthorization
java.lang.Object
org.globus.gsi.gssapi.auth.Authorization
org.globus.gsi.gssapi.auth.GSSAuthorization
org.globus.gsi.gssapi.auth.HostAuthorization
Implements a simple host authorization mechanism.
The peer's host name (in FQDN form) is compared with the
host name specified in the peer's certificate chain.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate static HostAuthorizationstatic final HostAuthorizationprivate static org.apache.commons.logging.Log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidauthorize(GSSContext context, String host) Performs host authentication.booleangetExpectedName(GSSCredential cred, String host) Returns expectedGSSNameused for authorization purposes.static HostAuthorizationReturns an instance of host authentication.inthashCode()Methods inherited from class Authorization
generateAuthorizationException
-
Field Details
-
logger
private static org.apache.commons.logging.Log logger -
ldapAuthorization
-
_service
-
hostAuthorization
-
-
Constructor Details
-
HostAuthorization
-
-
Method Details
-
getInstance
Returns an instance of host authentication.- Returns:
- an instance of this class initialized with host as a service.
-
getExpectedName
Description copied from class:GSSAuthorizationReturns expectedGSSNameused for authorization purposes. Can returns null for self authorization.- Specified by:
getExpectedNamein classGSSAuthorization- Parameters:
cred- credentials usedhost- host address of the peer.- Throws:
GSSException- if unable to create the name.
-
authorize
Performs host authentication. The hostname of the peer is compared with the hostname specified in the peer's (topmost) certificate in the certificate chain. The hostnames must match exactly (in case-insensitive way)- Specified by:
authorizein classAuthorization- Parameters:
context- the security contexthost- host address of the peer.- Throws:
AuthorizationException- if the hostnames do not match.
-
equals
-
hashCode
-