|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectissrg.pba.rbac.URLHandler
issrg.jaas.CodeSourceURLHandler
This URLHandler knows how to create Principals and Subtrees from a given codesource: URL. The URL is a string of the following format:
codesource:<URL>
The URL is a string with the same semantics as specified in java.security.CodeSource.implies method. Basically, it is a URL where the code is located. It may contain two kinds of wildcards at the end: "-" or "*", which are interpreted as "any file in any subdirectory" or "any file in this subdirectory" respectively; Min and Max level specifications are ignored in this case. If the URL does not end with these wildcards, the PERMIS URLHandler is used to construct the subtree for this URL and Min and Max levels specifications are taken into account.
Java specification allows to specify the signers of the code as well, but this is not supported in the CodeSource URL yet.
Field Summary | |
static java.lang.String |
CODE_SOURCE_PROTOCOL
|
Fields inherited from class issrg.pba.rbac.URLHandler |
defaultPort, FILE_PORT, FILE_PROTOCOL, HTTP_PORT, HTTP_PROTOCOL, HTTPS_PORT, HTTPS_PROTOCOL, protocol |
Constructor Summary | |
CodeSourceURLHandler()
|
Method Summary | |
int |
getDefaultPort()
This method returns the number of the defaul port that the protocol listens on |
Entry |
getEntry(java.lang.String url)
This method returns an Entry identified by a given HTTP URL. |
Principal |
getPrincipal(java.lang.String url)
This method returns a Principal for a given HTTP URL string. |
java.lang.String |
getProtocol()
This method returns the string name of the protocol (without the trailing colon). |
AttributeRepository |
getRepository(java.lang.String url)
This method returns an instance of a repository that would be able to retrieve attributes given the URL. |
Subtree |
getSubtree(java.lang.String url,
int min,
int max,
Subtree[] exclude)
|
Methods inherited from class issrg.pba.rbac.URLHandler |
addProtocol, getEntryByURL, getPrincipalByURL, getProtocolName, getRepositoryByURL, getSubtree, getSubtreeByURL, getURLHandler, removeProtocol |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CODE_SOURCE_PROTOCOL
Constructor Detail |
public CodeSourceURLHandler()
Method Detail |
public java.lang.String getProtocol()
URLHandler
getProtocol
in class URLHandler
public AttributeRepository getRepository(java.lang.String url)
URLHandler
In this version of the URLHandler, no HTTP/HTTPS repositories are implemented, so null is returned for such URLs.
getRepository
in class URLHandler
url
- - the URL of the repository
public int getDefaultPort()
URLHandler
getDefaultPort
in class URLHandler
public Principal getPrincipal(java.lang.String url) throws BadURLException
URLHandler
getPrincipal
in class URLHandler
url
- the string representation of the HTTP URL (including the
protocol name part)
(the actual protocol name is checked with the string returned by
getProtocol,
but the format of the rest of the URL is as specified in HTTP RFC)
BadURLException
public Entry getEntry(java.lang.String url) throws BadURLException
URLHandler
This URLHandler does (Entry)getPrincipal(url) - so if your Principal implements the Entry interface, you can leave the getEntry method.
getEntry
in class URLHandler
url
- the string representation of the HTTP URL (see comments for
getPrincipal method)
BadURLException
public Subtree getSubtree(java.lang.String url, int min, int max, Subtree[] exclude) throws BadURLException
getSubtree
in class URLHandler
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 specificationmin
- the Min value for the subtreemax
- the Max value for the subtree
BadURLException
Subtree
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |