|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAttributeSource
IAttributeSource provides the interface for UNICORE/X to retrieve authorisation information
(attributes) for a particular request from an attribute provider, based on information
such as Client DN, certificate, etc, contained in an instance of SecurityTokens.
The getAttributes method shall return the incarnation attributes, which are specially handled by
the UNICORE stack. Those attribute names are defined in this interface with constants ATTRIBUTE_*.
Additionally XACML attributes can be returned, those are used for authorization (are fed to
the PDP). Note that any attribute which is returned in the first list shouldn't
be returned again in XACML version; UNICORE automatically exposes incarnation attributes
to the PDP too when needed.
Lifecycle
IAttributeSource implementations are created and initialised by the AttributeSourceFactory,
which will create the instance using Class.forName(), set additional parameters, and finally call
the init() method. The IAuthoriser will be created only once, and will be kept alive during the
lifetime of the server.
Parameter injection
When creating an IAttributeSource instance, UNICORE/X will set parameters according to the properties
defined in the main configuration file (usually uas.config), provided there is a public
setter method. For example, if the class has a field setHost(String host), it
will be automatically invoked by UNICORE/X if the configuration has a property
uas.security.attributes.NAME1.Host
Currently parameters can be of type String, boolean, or numerical, for details see AttributeSourceFactory
| Field Summary | |
|---|---|
static String |
ATTRIBUTE_ADD_DEFAULT_GROUPS
Add OS default groups. |
static String |
ATTRIBUTE_GROUP
UNIX primary group attribute key. |
static String |
ATTRIBUTE_ROLE
UNICORE role attribute key. |
static String |
ATTRIBUTE_SUPPLEMENTARY_GROUPS
UNIX supplementary groups attribute key. |
static String |
ATTRIBUTE_VOS
Virtual Organisations attribute key. |
static String |
ROLE_ADMIN
role attribute value: admin |
static String |
ROLE_ANONYMOUS
role attribute value: anonymous |
| Method Summary | |
|---|---|
String[] |
getAcceptedVOs()
This method returns the list of VOs that this attribute source supports. |
SubjectAttributesHolder |
getAttributes(SecurityTokens tokens,
SubjectAttributesHolder otherAuthoriserInfo)
Retrieves a map of attributes based on the supplied SecurityTokens. Since authorisers can be chained, it might be sometimes useful to see attributes returned by authorisers that have run previously. |
String |
getName()
This method should return name of this attribute source, which was passed to the init() method. |
String |
getStatusDescription()
Get a user-friendly description of the attribute source's status. This is used for informing the administrator of any problems with configuration, connection problems, etc. |
void |
init(String name)
initialise the source |
| Field Detail |
|---|
static final String ATTRIBUTE_ROLE
static final String ATTRIBUTE_GROUP
static final String ATTRIBUTE_SUPPLEMENTARY_GROUPS
static final String ATTRIBUTE_ADD_DEFAULT_GROUPS
static final String ATTRIBUTE_VOS
static final String ROLE_ANONYMOUS
static final String ROLE_ADMIN
| Method Detail |
|---|
void init(String name)
throws Exception
Exception
SubjectAttributesHolder getAttributes(SecurityTokens tokens,
SubjectAttributesHolder otherAuthoriserInfo)
throws IOException
null must be returned.
tokens - - security tokens for this requestotherAuthoriserInfo - - attributes returned by other authorisers, which may be null
IOException - in case of technical problemsString getStatusDescription()
TimeoutRunner class to avoid blocking.
String getName()
String[] getAcceptedVOs()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||