Class PredicateAccessControl

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.IdentifiableComponent, net.shibboleth.utilities.java.support.component.IdentifiedComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, net.shibboleth.utilities.java.support.security.AccessControl

    public class PredicateAccessControl
    extends net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
    implements net.shibboleth.utilities.java.support.security.AccessControl
    Access control implementation based on a predicate over a ProfileRequestContext.

    To bridge the two designs, this adapter populates an AccessControlContext placed beneath the ProfileRequestContext to carry the operation and resource parameters and allow access to them from the Predicate.

    Since:
    3.3.0
    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
    • Constructor Detail

      • PredicateAccessControl

        public PredicateAccessControl​(@Nonnull @ParameterName(name="condition")
                                      Predicate<ProfileRequestContext> condition)
        Constructor.
        Parameters:
        condition - the predicate to use
    • Method Detail

      • checkAccess

        public boolean checkAccess​(@Nonnull
                                   javax.servlet.ServletRequest request,
                                   @Nullable
                                   String operation,
                                   @Nullable
                                   String resource)
        Specified by:
        checkAccess in interface net.shibboleth.utilities.java.support.security.AccessControl
      • getLogPrefix

        @Nonnull
        private String getLogPrefix()
        Get logging prefix.
        Returns:
        prefix