|
Sea 0.4.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.lbl.dsd.sea.nio.auth.SmartHostAuthorizer
Allow/deny rule-based mechanism to configure and query whether or not a given host is allowed to perform a certain action.
Via SmartHostAuthorizationRules
supports allow and deny rules based
on exact or patterned DNS host names, exact or patterned IP addresses, as
well as regular expressions on "hostName/IPaddress" pairs.
Constructor Summary | |
SmartHostAuthorizer()
Creates a denying authorizer (isAllowed(x) returns false). |
|
SmartHostAuthorizer(boolean allowBeforeDeny,
HostAuthorizationRules allowRules,
HostAuthorizationRules denyRules)
Creates an authorizer with the given parameters. |
Method Summary | |
HostAuthorizationRules |
getAllowRules()
Returns the rules used for allow checks. |
HostAuthorizationRules |
getDenyRules()
Returns the rules used for deny checks. |
boolean |
isAllowed(InetAddress address)
Returns whether or not the given host (aka InetAddress) is allowed to perform a certain action, depending on the current allow/deny rules. |
String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SmartHostAuthorizer(boolean allowBeforeDeny, HostAuthorizationRules allowRules, HostAuthorizationRules denyRules)
allowBeforeDeny
- apply allow rules before deny rules, or deny rules before allow rules?allowRules
- the rules used for allow checksdenyRules
- the rules used for deny checkspublic SmartHostAuthorizer()
Method Detail |
public HostAuthorizationRules getAllowRules()
public HostAuthorizationRules getDenyRules()
public boolean isAllowed(InetAddress address)
isAllowed
in interface HostAuthorizer
address
- the host attempting to be authorizedpublic String toString()
|
Sea 0.4.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |