Java Globus API: Class HostAuthorization

org.globus.gsi.gssapi.auth
Class HostAuthorization

java.lang.Object
  |
  +--org.globus.gsi.gssapi.auth.Authorization
        |
        +--org.globus.gsi.gssapi.auth.HostAuthorization

public class HostAuthorization
extends Authorization

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
static HostAuthorization ldapAuthorization
           
 
Constructor Summary
HostAuthorization(String service)
           
 
Method Summary
 void authorize(GSSContext context, String host)
          Performs host authentication.
static HostAuthorization getInstance()
          Returns an instance of host authentication.
 
Methods inherited from class org.globus.gsi.gssapi.auth.Authorization
generateAuthorizationException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ldapAuthorization

public static final HostAuthorization ldapAuthorization
Constructor Detail

HostAuthorization

public HostAuthorization(String service)
Method Detail

getInstance

public static HostAuthorization getInstance()
Returns an instance of host authentication.
Returns:
an instance of this class initialized with host as a service.

authorize

public void authorize(GSSContext context,
                      String host)
               throws AuthorizationException
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)
Overrides:
authorize in class Authorization
Parameters:
context - the security context
host - host address of the peer.
Throws:
AuthorizationException - if the hostnames do not match.