|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AzEntity<T extends java.lang.Enum<T> & AzCategoryId>
The AzEntity Interface represents a XACML collection of attributes. This is a generic interface that is used as the basis for holding collections of attributes where they appear in both the AzRequestContext and AzResponseContext.
The AzEntity Interface also contains factory methods for creating AzAttributes that will be directly added the current AzEntity object. It also contains factory methods for creating the AzAttributeValue objects with the associated XACML AzDataTypeId datatypes and the related Java or AzData* objects used to create the XACML datatypes.
AzEntity is also is used to hold the collections of attributes that are returned in the AzResponseContext (AzStatusDetail for a collection of missing attributes reported by the PDP, and AzObligation, which contains a set of AzAttributes that are used to inform the PEP of responsibilities associated with processing the Results of an authorization request.
Basically, in the XACML model, there are four "categories" of entities defined that are part of a XACML Request, each of which can contain a collection of attributes:
AzEntity
<AzCategoryIdSubjectAccess
>
AzEntity
<AzCategoryIdResource
>
AzEntity
<AzCategoryIdAction
>
AzEntity
<AzCategoryIdEnvironment
>
AzEntity
<AzCategoryIdSubjectCodebase
>
AzEntity
<AzCategoryIdSubjectIntermediary
>
AzEntity
<AzCategoryIdSubjectRecipient
>
AzEntity
<AzCategoryIdSubjectRequestingMachine
>
Note: for AzEntity objects with AzCategoryId Enum equal to one of the following below, the collection may contain any AzAttribute with any AzCategoryId Enum. This collection may be accessed via the getAzAttributeMixedSet() method.
There are two "categories" of entities that contain a collection of mixed AzAttributes that are returned by the PDP in a XACML Response element:
AzEntity
<AzCategoryIdStatusDetail
>
AzEntity
<AzCategoryIdObligation
>
TBD: should the createAzAttributeValue methods throw Exceptions based on processing the input values, or can it be assumed the object containing the input value has already handled any exception conditions?
Method Summary | ||
---|---|---|
|
addAzAttribute(AzAttribute<V> azAttribute)
Add an existing AzAttribute to the current collection of AzAttributes in this AzEntity object. |
|
|
addAzAttribute(W w,
java.lang.String issuer,
java.lang.String attributeId,
AzAttributeValue<U,V> attributeValue)
Add a new AzAttribute to the current collection of AzAttributes in this AzEntity object. |
|
|
createAzAttribute(java.lang.String issuer,
java.lang.String attributeId,
AzAttributeValue<U,V> attributeValue)
Creates a general AzAttribute with the AzCategoryId Enum, T, specified for this AzEntity object, and add it to the Set |
|
AzAttributeValueAnyURI |
createAzAttributeValue(AzDataTypeIdAnyURI u,
java.net.URI v)
Returns an AzAttributeValue object that holds a #anyURI type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueBase64Binary |
createAzAttributeValue(AzDataTypeIdBase64Binary u,
AzDataByteArray v)
Returns an AzAttributeValue object that holds a AzDataByteArray type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueBoolean |
createAzAttributeValue(AzDataTypeIdBoolean u,
java.lang.Boolean v)
Returns an AzAttributeValue object that holds a Boolean type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueDate |
createAzAttributeValue(AzDataTypeIdDate u,
AzDataDateTime v)
Returns a general AzAttributeValueDate object that holds a #date type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueDateTime |
createAzAttributeValue(AzDataTypeIdDateTime u,
AzDataDateTime v)
Returns a general AzAttributeValueDateTime object that holds a #dateTime type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueDayTimeDuration |
createAzAttributeValue(AzDataTypeIdDayTimeDuration u,
AzDataDayTimeDuration v)
Returns an AzAttributeValueDayTimeDuration object that holds a XACML #dayTimeDuration DataType. |
|
AzAttributeValueDnsName |
createAzAttributeValue(AzDataTypeIdDnsName u,
java.lang.String v)
Returns an AzAttributeValue object that holds a String type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueDouble |
createAzAttributeValue(AzDataTypeIdDouble u,
java.lang.Double v)
Returns an AzAttributeValue object that holds a Double type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueHexBinary |
createAzAttributeValue(AzDataTypeIdHexBinary u,
AzDataByteArray v)
Returns an AzAttributeValue object that holds a AzDataByteArray type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueInteger |
createAzAttributeValue(AzDataTypeIdInteger u,
java.lang.Long v)
Returns an AzAttributeValue object that holds an Integer type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueIpAddress |
createAzAttributeValue(AzDataTypeIdIpAddress u,
java.lang.String v)
Returns an AzAttributeValue object that holds a String type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueRfc822Name |
createAzAttributeValue(AzDataTypeIdRfc822Name u,
java.lang.String v)
Returns an AzAttributeValue object that holds a String type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueString |
createAzAttributeValue(AzDataTypeIdString u,
java.lang.String v)
Returns an AzAttributeValue object that holds a String type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueTime |
createAzAttributeValue(AzDataTypeIdTime u,
AzDataDateTime v)
Returns an AzAttributeValueTime object that holds a #time type and value, where that value was established by the parameters passed in this method. |
|
AzAttributeValueX500Name |
createAzAttributeValue(AzDataTypeIdX500Name u,
javax.security.auth.x500.X500Principal v)
Returns an AzAttributeValue object that holds a #x500Name type and value, that can be used with an AzAttribute of any AzCategoryId. |
|
AzAttributeValueYearMonthDuration |
createAzAttributeValue(AzDataTypeIdYearMonthDuration u,
AzDataYearMonthDuration v)
Returns an AzAttributeValueYearMonthDuration object that holds a XACML #yearMonthDuration DataType. |
|
AzDataByteArray |
createAzDataByteArray(byte[] byteArray)
Returns a helper data container for boxed Java byte[] arrays |
|
AzDataDateTime |
createAzDataDateTime(java.util.Date date,
int actualTimeZone,
int intendedTimeZone,
int nanoSeconds)
Returns a helper data container for XACML #date, #time, and #date-time datatypes |
|
AzDataDayTimeDuration |
createAzDataDayTimeDuration(boolean isNegativeDuration,
long days,
long hours,
long minutes,
long seconds,
int nanoSeconds)
Returns a helper data container for XACML #dayTimeDuration DataType |
|
AzDataYearMonthDuration |
createAzDataYearMonthDuration(boolean isNegativeDuration,
long years,
long months)
Returns a helper data container for Xacml #yearMonthDuration |
|
AzAttribute<T> |
getAttributeByAttribId(java.lang.String s)
Get any attribute in the current collection by specifying its AttributeId. |
|
java.util.Set<AzAttribute<?>> |
getAzAttributeMixedSet()
Get the Set that holds the attributes in this collection |
|
java.util.Set<AzAttribute<T>> |
getAzAttributeSet()
Get the Set that holds the attributes in this collection |
|
java.util.Set<AzAttribute<T>> |
getAzAttributeSetByAttribId(java.lang.String s)
Get the Set of attributes in this collection that match the provided XACML AttributeId. |
|
T |
getAzCategoryId()
Returns the AzCategoryId of this AzEntity. |
|
java.lang.String |
getId()
Get a local non-XACML implementation-specific id that can be used to distinguish this AzEntity object from other AzEntity objects. |
Method Detail |
---|
T getAzCategoryId()
Generally, for the AzRequestContext collections, this AzCategoryId specifies the allowed AzCategoryId for the member attributes. For the AzResponseContext collections (AzObligation, AZStatusDetail) this AzCategoryId only indicates the type of collection, and the member attributes can have any AzCategoryId.
AzCategoryId
java.lang.String getId()
An alternative approach might be to have specific "official" AzAttributes used for such purposes. XACML provides ids, such as subject-id, resource-id, and action-id, however, these ids are tied to somewhat to XACML semantics, and enterprises may want to define a specific id which could be applied in any category, possibly category-specific, which could be used to correlate the entities in the authorization requests for administrative purposes. The id provided by this method could be used to access the "special id" if it existed within the attribute collection or it could be implemented independently of the attributes as well.
AzXacmlStrings.X_ATTR_ACTION_ID
<U extends java.lang.Enum<U> & AzDataTypeId,V> AzAttribute<T> createAzAttribute(java.lang.String issuer, java.lang.String attributeId, AzAttributeValue<U,V> attributeValue)
The AzApi caller must provide an optional issuer, a required AttributeId, and a required AzAttributeValue containing an AzDataTypeId Enum identifying the XACML datatype of this attribute, and a value for this attribute in an appropriate object, determined by the createAzAttributeValue(U,V) signature, where U is the XACML datatype, and V is the corresponding object type required to provide the value for an attribute of that XACML datatype.
When an attribute is created within an AzEntity object, it inherits the AzCategoryId Enum from the AzEntity object.
issuer
- attributeId
- attributeValue
-
AzAttribute<T> getAttributeByAttribId(java.lang.String s)
Note: In the case where an attribute is multi-valued, this method returns only one of the values, and which value may vary if the method is called multiple times. Therefore, if the AzApi caller needs information whether there are additional values, and what those values are, then the method getAzAttributeSetByAttribId(String s) should be used, which returns all the values with a specific XACML AttributeId.
s
- a String containing a XACML AttributeId
getAzAttributeSetByAttribId(String)
java.util.Set<AzAttribute<T>> getAzAttributeSetByAttribId(java.lang.String s)
In general, XACML attributes may be multi-valued. The way this is represented by AzApi is that a separate AzAttribute instance exists for each value.
s
- a String containing the XACML AttributeId being requested
java.util.Set<AzAttribute<T>> getAzAttributeSet()
Note: this method returns a Set
java.util.Set<AzAttribute<?>> getAzAttributeMixedSet()
Note: this method returns a Set
Note: A specific AzEntity may have AzAttributes either in the
mixed attribute collection or the uniform attribute collection
but not both. The "other" collection will always be null.
<V extends java.lang.Enum<V> & AzCategoryId> boolean addAzAttribute(AzAttribute<V> azAttribute)
For most AzEntity objects the AzCategoryId Enum, V, must match
that of the AzEntity.getAzCategoryId(), T. However, for
AzEntity
V
- the AzCategoryId Enum of azAttributeazAttribute
-
AzEntity
<AzCategoryIdObligation
>
AzEntity
<AzCategoryIdStatusDetail
>
<U extends java.lang.Enum<U> & AzDataTypeId,V,W extends java.lang.Enum<W> & AzCategoryId> boolean addAzAttribute(W w, java.lang.String issuer, java.lang.String attributeId, AzAttributeValue<U,V> attributeValue)
For most AzEntity objects the AzCategoryId Enum, W, must match
that of the AzEntity.getAzCategoryId(). However, for
AzEntity
U
- A Java type containing the value of the attributeV
- An AzDataTypeId Enum representing a XACML DataTypeW
- An AzCategoryId Enum representing a XACML Categoryw
- an instance of Wissuer
- a String identifying the Issuer of this attributeattributeId
- attributeValue
- an AzAttributeValue
AzAttributeValueAnyURI createAzAttributeValue(AzDataTypeIdAnyURI u, java.net.URI v)
u
- an AzDataTypeIdAnyURI Enumv
- a URI providing a value for this AzAttributeValue object
AzAttributeValueAnyURI
AzAttributeValue
createAzAttribute(String, String, AzAttributeValue)
AzAttributeValueBase64Binary createAzAttributeValue(AzDataTypeIdBase64Binary u, AzDataByteArray v)
u
- an AzDataTypeIdBase64Binary Enumv
- an AzDataByteArray containing the Base64 binary data
AzAttributeValueBase64Binary
,
AzAttributeValue
AzAttributeValueBoolean createAzAttributeValue(AzDataTypeIdBoolean u, java.lang.Boolean v)
u
- an AzDataTypeIdBoolean Enumv
- a Boolean with the value that will be set for this attribute
AzAttributeValueBoolean
,
AzAttributeValue
AzAttributeValueDate createAzAttributeValue(AzDataTypeIdDate u, AzDataDateTime v)
u
- an AzDataTypeIdDate Enumv
- an AzDataDateTime object containing the value
provided for this attribute
AzAttributeValueDate
AzAttributeValueDateTime createAzAttributeValue(AzDataTypeIdDateTime u, AzDataDateTime v)
u
- an AzDataTypeIdDateTime Enumv
- an AzDataDateTime object containing the value provided
AzAttributeValueDateTime
AzAttributeValueDayTimeDuration createAzAttributeValue(AzDataTypeIdDayTimeDuration u, AzDataDayTimeDuration v)
u
- an AzDataTypeIdDayTimeDuration Enumv
- an AzDataDayTimeDuration object providing a value
AzAttributeValueDnsName createAzAttributeValue(AzDataTypeIdDnsName u, java.lang.String v)
u
- an AzDataTypeIdDnsName Enumv
- a String providing the value for this AzAttributeValue object
AzAttributeValueDnsName
,
AzAttributeValue
AzAttributeValueDouble createAzAttributeValue(AzDataTypeIdDouble u, java.lang.Double v)
u
- an AzDataTypeIdDouble Enumv
- a Double providing the value for this
AzAttributeValue object
AzAttributeValueDouble
,
AzAttributeValue
AzAttributeValueHexBinary createAzAttributeValue(AzDataTypeIdHexBinary u, AzDataByteArray v)
u
- an AzDataTypeIdHexBinary Enumv
- an AzDataByteArray containing binary data
AzAttributeValueHexBinary
,
AzAttributeValue
AzAttributeValueInteger createAzAttributeValue(AzDataTypeIdInteger u, java.lang.Long v)
u
- an AzDataTypeIdInteger Enumv
- a Long containing an integer
AzAttributeValueInteger
,
AzAttributeValue
AzAttributeValueIpAddress createAzAttributeValue(AzDataTypeIdIpAddress u, java.lang.String v)
u
- an AzDataTypeIdIpAddress
Enumv
- a String value provided to be used to create the IpAddress
AzAttributeValueIpAddress
,
AzAttributeValue
AzAttributeValueRfc822Name createAzAttributeValue(AzDataTypeIdRfc822Name u, java.lang.String v)
u
- an AzDataTypeIdRfc822Name Enumv
- a String value representing an RFC822 name
AzAttributeValueRfc822Name
,
AzAttributeValue
AzAttributeValueString createAzAttributeValue(AzDataTypeIdString u, java.lang.String v)
u
- an AzDateTypeIdString Enumv
- a String value
AzAttributeValueString
,
AzAttributeValue
AzAttributeValueTime createAzAttributeValue(AzDataTypeIdTime u, AzDataDateTime v)
u
- an AzDateTypeIdTime Enumv
- an AzDataDateTime object
AzAttributeValueTime
AzAttributeValueX500Name createAzAttributeValue(AzDataTypeIdX500Name u, javax.security.auth.x500.X500Principal v)
u
- an AzDataTypeIdX500Name Enumv
- an X500Principal object
AzAttributeValueX500Name
,
AzAttributeValue
AzAttributeValueYearMonthDuration createAzAttributeValue(AzDataTypeIdYearMonthDuration u, AzDataYearMonthDuration v)
u
- an AzDataTypeIdYearMonthDuration Enumv
- an AzDataYearMonthDuration object providing the duration data
to be used for the value
AzDataDateTime createAzDataDateTime(java.util.Date date, int actualTimeZone, int intendedTimeZone, int nanoSeconds)
date
- actualTimeZone
- intendedTimeZone
- nanoSeconds
-
AzAttributeValueDate
,
AzAttributeValueDateTime
,
AzAttributeValueTime
AzDataDayTimeDuration createAzDataDayTimeDuration(boolean isNegativeDuration, long days, long hours, long minutes, long seconds, int nanoSeconds)
AzDataYearMonthDuration createAzDataYearMonthDuration(boolean isNegativeDuration, long years, long months)
AzDataByteArray createAzDataByteArray(byte[] byteArray)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |