@ThreadSafe public class EntityRoleFilterStage extends BaseIteratingStage<Element>
Element items that are entity or entities descriptors. In the case of
EntitiesDescriptors the role filter will effect all descendant EntityDescriptors.| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
EntityRoleFilterStage() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDestroy() |
protected boolean |
doExecute(Item<Element> 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.
|
doExecuteexecute, getCollectionPredicate, setCollectionPredicatesetIddoInitialize, getIddestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isDestroyedpublic 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: falseprivate boolean removingRolelessEntities
private boolean removingEntitylessEntitiesDescriptor
@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.AbstractInitializableComponentprotected boolean doExecute(@Nonnull Item<Element> item)
doExecute in class BaseIteratingStage<Element>item - Item on which to operateprotected 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 processedprotected boolean processEntityDescriptor(@Nonnull Element entityDescriptor)
isRemovingRolelessEntities() is true the EntityDescriptor is marked to be removed.entityDescriptor - entity descriptor being processedprotected 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 processedCopyright © 1999–2016. All rights reserved.