|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.tivoli.mts.PDPrincipal
This class implements the Principal
interface
and represents general information about a Policy Director user.
Principals such as this PDPrincipal
may be associated with a particular Subject
to augment that Subject
with an additional
identity. Refer to the Subject
class for more information
on how to achieve this. Authorization decisions can then be based upon
the Principals associated with a Subject
.
Principal
,
Subject
, Serialized FormConstructor Summary | |
PDPrincipal()
Create a PDPrincipal for the "unauthenticated user". |
|
PDPrincipal(java.lang.String name)
Create a PDPrincipal with an identifying name. |
|
PDPrincipal(java.lang.String name,
char[] password)
Create a PDPrincipal with an identifying name. |
|
PDPrincipal(java.lang.String name,
char[] password,
java.net.URL configURL)
Create a PDPrincipal with an identifying name and the
specified configuration. |
|
PDPrincipal(java.lang.String name,
java.net.URL configURL)
Create a PDPrincipal with an identifying name and the
specified configuration. |
|
PDPrincipal(java.net.URL configURL)
Create a PDPrincipal for the "unauthenticated user" with the
specified configuration. |
Method Summary | |
PDPrincipal |
addGroupMemberships(java.lang.String serviceID,
java.lang.String[] groups)
Return a new PDPrincipal that adds these group memberships to the current PDPrincipal |
boolean |
equals(java.lang.Object o)
Compares the specified Object with this PDPrincipal
for equality. |
PDAttrs |
getEntitlements(java.lang.String serviceID,
PDAttrs attrsIn)
Return all the objects to which this PDPrincipal has the specified access |
java.lang.String |
getName()
Return a string name of this PDPrincipal . |
int |
hashCode()
Return a hash code for this PDPrincipal . |
boolean |
implies(PDPermission perm)
See if the current PDPrincipal has the specified PDPermission. |
boolean |
implies(PDPermission perm,
PDAttrs attrsIn,
PDAttrs attrsOut)
See if the current PDPrincipal has the specified PDPermission. |
boolean |
implies(javax.security.auth.Subject subject)
Check if the specified Subject is implied by
this object. |
java.lang.String |
toString()
Return a string representation of this PDPrincipal . |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PDPrincipal(java.lang.String name, char[] password) throws java.lang.NullPointerException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
PDPrincipal
with an identifying name.
Since no URL is specified for a configuration, the default configuration will be used.
name
- the identifying name. password
- the password for the identifying name.java.lang.NullPointerException
- if the name
or the password
is null
.java.lang.IllegalArgumentException
- if the name
has zero length.java.lang.SecurityException
- if the caller does not have permission
to create PDPrincipal
s.java.lang.IllegalStateException
- if Policy Director could not obtain
this user's credentialspublic PDPrincipal(java.lang.String name, char[] password, java.net.URL configURL) throws java.lang.NullPointerException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
PDPrincipal
with an identifying name and the
specified configuration.
name
- the identifying name. password
- the password for the identifying name.configUrl
- a URL specifying the configuration to use.
If null
is passed, the default configuration will be used.java.lang.NullPointerException
- if the name
or the password
is null
.java.lang.IllegalArgumentException
- if the name
has zero length.java.lang.SecurityException
- if the caller does not have permission
to create PDPrincipal
s.java.lang.IllegalStateException
- if Policy Director could not obtain
this user's credentialspublic PDPrincipal(java.lang.String name) throws java.lang.NullPointerException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
PDPrincipal
with an identifying name.
Since no URL is specified for a configuration, the default configuration will be used.
name
- the identifying name. java.lang.NullPointerException
- if the name
is null
.java.lang.IllegalArgumentException
- if the name
has zero length.java.lang.SecurityException
- if the caller does not have permission
to create PDPrincipal
s.java.lang.IllegalStateException
- if Policy Director could not obtain
this user's credentialspublic PDPrincipal(java.lang.String name, java.net.URL configURL) throws java.lang.NullPointerException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
PDPrincipal
with an identifying name and the
specified configuration.
name
- the identifying name. configUrl
- a URL specifying the configuration to use.
If null
is passed, the default configuration will be used.java.lang.NullPointerException
- if the name
is null
.java.lang.IllegalArgumentException
- if the name
has zero length.java.lang.SecurityException
- if the caller does not have permission
to create PDPrincipal
s.java.lang.IllegalStateException
- if Policy Director could not obtain
this user's credentialspublic PDPrincipal() throws java.lang.IllegalStateException
PDPrincipal
for the "unauthenticated user".
Since no URL is specified for a configuration, the default configuration will be used.
java.lang.IllegalStateException
- if Policy Director could not obtain
the "unauth" credentialspublic PDPrincipal(java.net.URL configURL) throws java.lang.IllegalStateException
PDPrincipal
for the "unauthenticated user" with the
specified configuration.config
- a URL specifying the configuration to use.
If null
is passed, the default configuration will be used.java.lang.IllegalStateException
- if Policy Director could not obtain
the "unauth" credentialsMethod Detail |
public PDPrincipal addGroupMemberships(java.lang.String serviceID, java.lang.String[] groups) throws java.lang.NullPointerException
serviceID
- the credential modification service identifier. If
null
, the default credential modification service will be
employed.groups
- the groups to be added to the new PDPrincipal's credentialsjava.lang.NullPointerException
- if no groups are passed injava.lang.IllegalStateException
- on remote errorspublic PDAttrs getEntitlements(java.lang.String serviceID, PDAttrs attrsIn) throws java.lang.NullPointerException, java.lang.IllegalArgumentException, java.lang.IllegalStateException
serviceID
- the entitlements service identifier. If
null
, the default entitlements service will be
employed.attrsIn
- the names of objects to be reported on and the type(s) of access.
The default entitlements server supports passing in
multiple places in the objectspace by mechanisms like
attrsIn.add(PDStatics.AZN_ENT_SVC_PD_POBJ_PATH, "/Management/GSO"); attrsIn.add(PDStatics.AZN_ENT_SVC_PD_POBJ_PATH, "/Management/Policy");but attempts to pass in multiple separate permissions to search on will result in an IllegalArgumentException. A single string that contains multiple permissions is acceptable. Thus,
attrsIn.add(PDStatics.AZN_ENT_SVC_PD_POBJ_REQD_OPS, "T"); attrsIn.add(PDStatics.AZN_ENT_SVC_PD_POBJ_REQD_OPS, "r");is not currently allowed, but
attrsIn.add(PDStatics.AZN_ENT_SVC_PD_POBJ_REQD_OPS, "Tr");is permissable.
java.lang.NullPointerException
- if no type is passed injava.lang.IllegalArgumentException
- on argument errorsjava.lang.IllegalStateException
- on remote errorspublic boolean implies(PDPermission perm)
perm
- the PDPermission in question.public boolean implies(PDPermission perm, PDAttrs attrsIn, PDAttrs attrsOut)
perm
- the PDPermission in question.attrsIn
- the input attribute list.attrsOut
- the output attribute list.public java.lang.String getName()
PDPrincipal
.
getName
in interface java.security.Principal
PDPrincipal
public java.lang.String toString()
PDPrincipal
.
toString
in interface java.security.Principal
toString
in class java.lang.Object
PDPrincipal
.public boolean equals(java.lang.Object o)
PDPrincipal
for equality. Returns true if the given object is also a
PDPrincipal
and the two PDPrincipals have the
same String representation.
equals
in interface java.security.Principal
equals
in class java.lang.Object
o
- Object to be compared for equality with this
PDPrincipal
.PDPrincipal
.public int hashCode()
PDPrincipal
.
hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
PDPrincipal
.public boolean implies(javax.security.auth.Subject subject)
Subject
is implied by
this object.
implies
in interface com.ibm.security.auth.PrincipalComparator
subject
- a Subject
to check for implication.Subject
is implied by
this object, or false otherwise.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |