|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fzj.unicore.uas.security.util.RuleBuilder
public class RuleBuilder
helper to generate XACML rules using a nice, "fluent" API, based on the SUN XACML 1.0 implementation,
| Constructor Summary | |
|---|---|
RuleBuilder()
|
|
| Method Summary | |
|---|---|
com.sun.xacml.Rule |
buildRule()
build the resulting rule and return it |
RuleBuilder |
denyAccess()
|
RuleBuilder |
forMethod(java.lang.String method)
set the action (i.e. web service method name) this rule refers to |
RuleBuilder |
forRole(java.lang.String role)
|
protected com.sun.xacml.cond.Apply |
getConditionAttributeMatches(java.lang.String attributeID,
java.lang.String attributeValue,
boolean mustBePresent)
returns a condition expressing that the attribute defined by attributeID has to match the supplied value |
protected com.sun.xacml.cond.Apply |
getConditionOwnerMatches()
returns a Condition expressing that the owner of a resource has to be matched |
protected com.sun.xacml.cond.Apply |
getConditionRoleMatches(java.lang.String role)
returns a condition expressing that the given role has to be matched |
protected com.sun.xacml.Target |
getTarget()
builds the rule target from the available information |
RuleBuilder |
ifOwnerMatches()
|
RuleBuilder |
ifSubjectHasOptionalAttribute(java.lang.String attributeID,
java.lang.String attributeValue)
|
RuleBuilder |
ifSubjectHasRequiredAttribute(java.lang.String attributeID,
java.lang.String attributeValue)
|
RuleBuilder |
onService(java.lang.String serviceName)
set the web service this rule refers to |
RuleBuilder |
onServiceInstance(java.lang.String serviceName,
java.lang.String instanceID)
set the WSRF instance this rule refers to |
RuleBuilder |
permitAccess()
|
RuleBuilder |
setDescription(java.lang.String description)
|
RuleBuilder |
setID(java.lang.String id)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RuleBuilder()
| Method Detail |
|---|
public RuleBuilder permitAccess()
public RuleBuilder denyAccess()
public RuleBuilder forMethod(java.lang.String method)
method - - the name of the webservice method (e.g., "GetResourceProperty")
public RuleBuilder forRole(java.lang.String role)
public RuleBuilder ifSubjectHasOptionalAttribute(java.lang.String attributeID,
java.lang.String attributeValue)
public RuleBuilder ifSubjectHasRequiredAttribute(java.lang.String attributeID,
java.lang.String attributeValue)
public RuleBuilder ifOwnerMatches()
public RuleBuilder setDescription(java.lang.String description)
public RuleBuilder setID(java.lang.String id)
public RuleBuilder onService(java.lang.String serviceName)
serviceName - - the name of the web service
public RuleBuilder onServiceInstance(java.lang.String serviceName,
java.lang.String instanceID)
serviceName - - the name of the serviceinstanceID - - the unique ID
public com.sun.xacml.Rule buildRule()
protected com.sun.xacml.Target getTarget()
protected com.sun.xacml.cond.Apply getConditionRoleMatches(java.lang.String role)
role -
protected com.sun.xacml.cond.Apply getConditionAttributeMatches(java.lang.String attributeID,
java.lang.String attributeValue,
boolean mustBePresent)
attributeID - attributeValue - param mustBePresent - if true, failure to find the designated attribute will result in "Indeterminate"
protected com.sun.xacml.cond.Apply getConditionOwnerMatches()
role -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||