|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent
net.shibboleth.metadata.pipeline.BaseStage<ItemType>
net.shibboleth.metadata.pipeline.BaseIteratingStage<DomElementItem>
net.shibboleth.metadata.dom.saml.EntityRoleFilterStage
@ThreadSafe public class EntityRoleFilterStage
A pipeline stage that will filter SAML role descriptors from EntityDescriptors.
This filter will work on DomElementItem elements that are entity or entities descriptors. In the case of
EntitiesDescriptors the role filter will effect all descendant EntityDescriptors.
| Field Summary | |
|---|---|
static QName |
ATTRIBUTE_AUTHORITY_DESCRIPTOR_NAME
QName of the AttributeAuthorityDescriptor element. |
static QName |
AUTHN_AUTHORITY_DESCRIPTOR_NAME
QName of the AuthnAuthorityDescriptor element. |
private Collection<QName> |
designatedRoles
Role element or type names which are white/black listed depending on the value of whitelistingRoles. |
static QName |
IDP_SSO_DESCRIPTOR_NAME
QName of the IDPSSODescriptor element. |
private Logger |
log
Class logger. |
private Set<QName> |
namedRoles
Set containing the SAML-defined, named role descriptors: IDP_SSO_DESCRIPTOR_NAME,
SP_SSO_DESCRIPTOR_NAME, AUTHN_AUTHORITY_DESCRIPTOR_NAME,
ATTRIBUTE_AUTHORITY_DESCRIPTOR_NAME, PDP_DESCRIPTOR_NAME. |
static QName |
PDP_DESCRIPTOR_NAME
QName of the PDPDescriptor element. |
private boolean |
removingEntitylessEntitiesDescriptor
Whether EntitiesDescriptor that do not contain EntityDescriptors should be removed. |
private boolean |
removingRolelessEntities
Whether EntityDescriptor elements that do not contain roles, after filtering, should be removed. |
static QName |
ROLE_DESCRIPTOR_NAME
QName of the RoleDescriptor element. |
static QName |
SP_SSO_DESCRIPTOR_NAME
QName of the SPSSODescriptor element. |
private boolean |
whitelistingRoles
Whether designatedRoles should be considered a whitelist or a blacklist. |
| Constructor Summary | |
|---|---|
EntityRoleFilterStage()
|
|
| Method Summary | |
|---|---|
protected void |
doDestroy()
|
protected boolean |
doExecute(DomElementItem item)
Processes a given Item. |
Collection<QName> |
getDesignatedRoles()
Gets the list of designated entity roles. |
protected List<Element> |
getFilteredRoles(String entityId,
Element entityDescriptor)
Iterates over the roles of a EntitiesDescriptor, filters out the appropriate ones and returns the rest. |
boolean |
isRemovingEntitylessEntitiesDescriptor()
Gets whether EntitiesDescriptor that do not contain EntityDescriptors should be removed. |
boolean |
isRemovingRolelessEntities()
Gets whether EntityDescriptor elements without roles (after filtering) should be removed altogether. |
boolean |
isWhitelistingRoles()
Gets whether the list of designated roles should be considered a whitelist. |
protected boolean |
processEntitiesDescriptor(Element entitiesDescriptor)
Iterates over all child EntitiesDescriptor, passing each to processEntitiesDescriptor(Element), and
EntityDescriptor, passing each to processEntityDescriptor(Element). |
protected boolean |
processEntityDescriptor(Element entityDescriptor)
Processes an EntityDescriptor. |
void |
setDesignatedRoles(Collection<QName> roles)
Sets the list of designated entity roles. |
void |
setRemoveRolelessEntities(boolean remove)
Sets whether EntityDescriptor elements without roles (after filtering) should be removed altogether. |
void |
setRemovingEntitylessEntitiesDescriptor(boolean remove)
Sets whether EntitiesDescriptor that do not contain EntityDescriptors should be removed. |
void |
setWhitelistingRoles(boolean whitelisting)
Sets whether the list of designated roles should be considered a whitelist. |
| Methods inherited from class net.shibboleth.metadata.pipeline.BaseIteratingStage |
|---|
doExecute |
| Methods inherited from class net.shibboleth.metadata.pipeline.BaseStage |
|---|
execute, setId |
| Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableIdentifiableInitializableComponent |
|---|
doInitialize, getId |
| Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent |
|---|
destroy, initialize, isDestroyed, isInitialized |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.shibboleth.utilities.java.support.component.DestructableComponent |
|---|
destroy, isDestroyed |
| Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiableComponent |
|---|
getId |
| Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent |
|---|
initialize, isInitialized |
| Field Detail |
|---|
public static final QName ROLE_DESCRIPTOR_NAME
public static final QName IDP_SSO_DESCRIPTOR_NAME
public static final QName SP_SSO_DESCRIPTOR_NAME
public static final QName AUTHN_AUTHORITY_DESCRIPTOR_NAME
public static final QName ATTRIBUTE_AUTHORITY_DESCRIPTOR_NAME
public static final QName PDP_DESCRIPTOR_NAME
private final Logger log
private final Set<QName> namedRoles
IDP_SSO_DESCRIPTOR_NAME,
SP_SSO_DESCRIPTOR_NAME, AUTHN_AUTHORITY_DESCRIPTOR_NAME,
ATTRIBUTE_AUTHORITY_DESCRIPTOR_NAME, PDP_DESCRIPTOR_NAME.
private Collection<QName> designatedRoles
whitelistingRoles.
private boolean whitelistingRoles
designatedRoles should be considered a whitelist or a blacklist. Default value: false
private boolean removingRolelessEntities
private boolean removingEntitylessEntitiesDescriptor
| Constructor Detail |
|---|
public EntityRoleFilterStage()
| Method Detail |
|---|
@Nonnull @NonnullElements @Unmodifiable public Collection<QName> getDesignatedRoles()
public void setDesignatedRoles(@Nullable@NullableElements
Collection<QName> roles)
roles - list of designated entity rolespublic boolean isWhitelistingRoles()
public void setWhitelistingRoles(boolean whitelisting)
whitelisting - true if the designated entities should be considered a whitelist, false otherwisepublic boolean isRemovingRolelessEntities()
public void setRemoveRolelessEntities(boolean remove)
remove - whether EntityDescriptor elements without roles (after filtering) should be removed altogetherpublic boolean isRemovingEntitylessEntitiesDescriptor()
public void setRemovingEntitylessEntitiesDescriptor(boolean remove)
remove - whether EntitiesDescriptor that do not contain EntityDescriptors should be removedprotected void doDestroy()
doDestroy in class net.shibboleth.utilities.java.support.component.AbstractDestructableInitializableComponent
protected boolean doExecute(@Nonnull
DomElementItem item)
doExecute in class BaseIteratingStage<DomElementItem>item - Item on which to operate
protected boolean processEntitiesDescriptor(@Nonnull
Element entitiesDescriptor)
processEntitiesDescriptor(Element), and
EntityDescriptor, passing each to processEntityDescriptor(Element). If
isRemovingEntitylessEntitiesDescriptor() is true and the EntitiesDescriptor contains no child
EntitiesDescriptors or EntityDescriptors it is removed.
entitiesDescriptor - EntitiesDescriptor being processed
protected boolean processEntityDescriptor(@Nonnull
Element entityDescriptor)
isRemovingRolelessEntities() is true the EntityDescriptor is marked to be removed.
entityDescriptor - entity descriptor being processed
protected List<Element> getFilteredRoles(@Nonnull
String entityId,
@Nonnull
Element entityDescriptor)
entityId - ID of the entity whose roles are being processedentityDescriptor - descriptor of entity whose roles are being processed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||