Class AbstractEntityGroupPolicyRule
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.filter.policyrule.impl.AbstractPolicyRule
net.shibboleth.idp.attribute.filter.policyrule.saml.impl.AbstractEntityGroupPolicyRule
- All Implemented Interfaces:
PolicyRequirementRule
,Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
- Direct Known Subclasses:
IssuerInEntityGroupPolicyRule
,ProxiedRequesterInEntityGroupPolicyRule
,RequesterInEntityGroupPolicyRule
A matcher that evaluates to true if an entity's metadata matches the provided entity group name,
or a valid metadata-sourced affiliation of entities.
- Since:
- 4.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule
PolicyRequirementRule.Tristate
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Whether to search metadata for AffiliationDescriptor membership.private String
The entity group to match against.Fields inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule
MATCHES_ALL, MATCHES_NONE, REQUIREMENT_RULE_FAILS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Gets the entity group to match against.protected abstract EntityDescriptor
getEntityMetadata
(AttributeFilterContext filterContext) Gets the entity descriptor for the entity to check.boolean
Returns whether we check a suppliedMetadataResolver
for membership in an AffiliationDescriptor as a form of group policy.matches
(AttributeFilterContext input) Checks if the given entity is in the provided entity group.void
setCheckAffiliations
(boolean flag) Set whether to check a suppliedMetadataResolver
for membership in an AffiliationDescriptor as a form of group policy.void
setEntityGroup
(String group) Sets the entity group to match against.Methods inherited from class net.shibboleth.idp.attribute.filter.policyrule.impl.AbstractPolicyRule
getLogPrefix
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, 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.IdentifiedComponent
getId
-
Field Details
-
entityGroup
The entity group to match against. -
checkAffiliations
private boolean checkAffiliationsWhether to search metadata for AffiliationDescriptor membership.
-
-
Constructor Details
-
AbstractEntityGroupPolicyRule
public AbstractEntityGroupPolicyRule()
-
-
Method Details
-
getEntityGroup
Gets the entity group to match against.- Returns:
- entity group to match against
-
setEntityGroup
Sets the entity group to match against.- Parameters:
group
- entity group to match against
-
setCheckAffiliations
public void setCheckAffiliations(boolean flag) Set whether to check a suppliedMetadataResolver
for membership in an AffiliationDescriptor as a form of group policy.Defaults to false.
- Parameters:
flag
- flag to set
-
isCheckAffiliations
public boolean isCheckAffiliations()Returns whether we check a suppliedMetadataResolver
for membership in an AffiliationDescriptor as a form of group policy.- Returns:
- whether to check for AffiliationDescriptor membership
- Since:
- 4.0.0
-
doInitialize
- Overrides:
doInitialize
in classAbstractPolicyRule
- Throws:
ComponentInitializationException
-
getEntityMetadata
@Nullable protected abstract EntityDescriptor getEntityMetadata(@Nonnull AttributeFilterContext filterContext) Gets the entity descriptor for the entity to check.- Parameters:
filterContext
- current filter request context- Returns:
- entity descriptor for the entity to check
-
matches
Checks if the given entity is in the provided entity group.- Parameters:
input
- the context to look at- Returns:
- whether the entity is in the group whether the rule holds
-