Class LoopDetectionPredicate

java.lang.Object
net.shibboleth.idp.profile.logic.AbstractRelyingPartyPredicate
net.shibboleth.idp.profile.logic.LoopDetectionPredicate
All Implemented Interfaces:
Predicate<ProfileRequestContext>, Predicate<ProfileRequestContext>

public class LoopDetectionPredicate extends AbstractRelyingPartyPredicate
A condition that relies on a Meter to detect looping SPs.
Since:
4.1.0
  • Field Details

    • log

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

      private long threshold
      Count to trigger warning.
    • relyingPartyMap

      @Nonnull @NonnullElements private Map<String,String> relyingPartyMap
      Map of RP names to meter names.
    • usernameLookupStrategy

      @Nonnull private Function<ProfileRequestContext,String> usernameLookupStrategy
      Lookup strategy to obtain subject name.
  • Constructor Details

    • LoopDetectionPredicate

      public LoopDetectionPredicate()
      Constructor.
  • Method Details

    • setThreshold

      public void setThreshold(@Positive long value)
      Set the warning threshold for the 1 minute moving average to exceed.

      Defaults to 20.

      Parameters:
      value - threshold to use
    • setRelyingPartyMap

      public void setRelyingPartyMap(@Nullable @NonnullElements Map<String,String> map)
      Set the map of relying party names to meter names to track counts.
      Parameters:
      map - map of RP/meter mappings
    • setUsernameLookupStrategy

      public void setUsernameLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)
      Set lookup strategy to obtain username.
      Parameters:
      strategy - lookup strategy
    • test

      public boolean test(@Nullable ProfileRequestContext input)