issrg.shibboleth
Class ShibbolethURLHandler

java.lang.Object
  extended by issrg.pba.rbac.URLHandler
      extended by issrg.shibboleth.ShibbolethURLHandler

public class ShibbolethURLHandler
extends URLHandler

This class handles URLs with "shib:" protocol. These are normally used in PERMIS Policy to refer to Shibboleth Identity Provider sites in SOAPolicy.

E.g. "shib:kent.ac.uk" is an identifier of "kent.ac.uk" IdP, which will appear in attribute statements as the scope of the attribute.

This URLHandler knows how to construct Principals from a URL. It doesn't construct Subtrees, as Shibboleth URLs are not used to define subtrees in subject or target domains, and the subtree semantics are not defined. Shibboleth URLs are not used to construct Repositories, either, so Repository cannot be constructed.


Field Summary
static java.lang.String SHIBBOLETH_PROTOCOL
           
 
Fields inherited from class issrg.pba.rbac.URLHandler
defaultPort, FILE_PORT, FILE_PROTOCOL, HTTP_PORT, HTTP_PROTOCOL, HTTPS_PORT, HTTPS_PROTOCOL, protocol, VOMS_SAML_PROTOCOL
 
Constructor Summary
ShibbolethURLHandler()
           
 
Method Summary
 java.security.Principal getPrincipal(java.lang.String url)
          This method constructs a ShibbolethPrincipal from a URL.
 java.lang.String getProtocol()
          This method returns the protocol of the URLs that can be handled.
 Subtree getSubtree(java.lang.String url, int min, int max, Subtree[] exclude)
          This method always returns null, as Subtrees cannot be constructed from Shibboleth URLs.
 
Methods inherited from class issrg.pba.rbac.URLHandler
addProtocol, getDefaultPort, getEntry, getEntryByURL, getPrincipalByURL, getProtocolName, getRepository, getRepositoryByURL, getSubtreeByURL, getURLHandler, removeProtocol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHIBBOLETH_PROTOCOL

public static final java.lang.String SHIBBOLETH_PROTOCOL
See Also:
Constant Field Values
Constructor Detail

ShibbolethURLHandler

public ShibbolethURLHandler()
Method Detail

getProtocol

public java.lang.String getProtocol()
This method returns the protocol of the URLs that can be handled.

Overrides:
getProtocol in class URLHandler
Returns:
SHIBBOLETH_PROTOCOL, which is "shib".

getPrincipal

public java.security.Principal getPrincipal(java.lang.String url)
                                     throws BadURLException
This method constructs a ShibbolethPrincipal from a URL. The attribute part of the URL is ignored, if present.

Overrides:
getPrincipal in class URLHandler
Parameters:
url - - the URL identifying a issuer of some attributes
Returns:
ShibbolethPrincipal
Throws:
BadURLException - if the URL is malformed

getSubtree

public Subtree getSubtree(java.lang.String url,
                          int min,
                          int max,
                          Subtree[] exclude)
                   throws BadURLException
This method always returns null, as Subtrees cannot be constructed from Shibboleth URLs.

Overrides:
getSubtree in class URLHandler
Parameters:
url - the URL of the Base Entry; port may be specified as a range of ports by using nn-mm notation (two numbers separated by hyphen); if no port is specified, any port matches the subtree specification
min - the Min value for the subtree
max - the Max value for the subtree
Throws:
BadURLException - if the URL is malformed
See Also:
Subtree