Class XACMLUtils
java.lang.Object
org.opencastproject.authorization.xacml.XACMLUtils
Utility implementation for dealing with XACML data.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringXACML urn for actionsstatic final StringThe policy assertion issuerprotected static javax.xml.bind.JAXBContextThe JAXB Context to use for marshaling XACML security policy documentsstatic final StringXACML urn for resourcesstatic final StringXACML rule for combining policiesstatic final StringXACML urn for subjectstatic final StringXACML urn for rolesstatic final StringW3C String data typestatic final StringXACML urn for string equalitystatic final StringXACML urn for string equality -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetXacml(org.opencastproject.mediapackage.MediaPackage mediapackage, org.opencastproject.security.api.AccessControlList accessControlList) Builds an xml string containing the xacml for the mediapackage.static org.opencastproject.security.api.AccessControlListparseXacml(InputStream xacml) Parses a XACML into anAccessControlList.
-
Field Details
-
RULE_COMBINING_ALG
XACML rule for combining policies- See Also:
-
ACTION_IDENTIFIER
XACML urn for actions- See Also:
-
RESOURCE_IDENTIFIER
XACML urn for resources- See Also:
-
SUBJECT_IDENTIFIER
XACML urn for subject- See Also:
-
SUBJECT_ROLE_IDENTIFIER
XACML urn for roles- See Also:
-
XACML_STRING_EQUAL
XACML urn for string equality- See Also:
-
XACML_STRING_IS_IN
XACML urn for string equality- See Also:
-
W3C_STRING
W3C String data type- See Also:
-
ISSUER
The policy assertion issuer- See Also:
-
jBossXacmlJaxbContext
protected static javax.xml.bind.JAXBContext jBossXacmlJaxbContextThe JAXB Context to use for marshaling XACML security policy documents
-
-
Method Details
-
parseXacml
public static org.opencastproject.security.api.AccessControlList parseXacml(InputStream xacml) throws XACMLParsingException Parses a XACML into anAccessControlList.Only rules which follow the structure of those created by
getXacml(MediaPackage, AccessControlList)may be successfully parsed. All other rules are ignored.- Parameters:
xacml- the XACML to parse- Returns:
- the ACL, never
null - Throws:
XACMLParsingException- if parsing fails
-
getXacml
public static String getXacml(org.opencastproject.mediapackage.MediaPackage mediapackage, org.opencastproject.security.api.AccessControlList accessControlList) throws javax.xml.bind.JAXBException Builds an xml string containing the xacml for the mediapackage.- Parameters:
mediapackage- the mediapackageaccessControlList- the tuples of roles to actions- Returns:
- Throws:
javax.xml.bind.JAXBException
-