Class LoopDetectionPredicate
java.lang.Object
net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate
net.shibboleth.profile.context.logic.LoopDetectionPredicate
- All Implemented Interfaces:
Predicate<ProfileRequestContext>
A condition that relies on a
Meter to detect looping SPs.- Since:
- 4.1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private final com.codahale.metrics.MetricRegistryPrivate registry to isolate timers.Map of RP names to meter names.private longCount to trigger warning.private Function<ProfileRequestContext,String> Lookup strategy to obtain subject name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetRelyingPartyMap(Map<String, String> map) Set the map of relying party names to meter names to track counts.voidsetThreshold(long value) Set the warning threshold for the 1 minute moving average to exceed.voidSet lookup strategy to obtain username.booleantest(ProfileRequestContext input) Methods inherited from class net.shibboleth.profile.context.logic.AbstractRelyingPartyPredicate
getRelyingPartyContext, getRelyingPartyContextLookupStrategy, setRelyingPartyContextLookupStrategy
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
privateRegistry
@Nonnull private final com.codahale.metrics.MetricRegistry privateRegistryPrivate registry to isolate timers. -
threshold
private long thresholdCount to trigger warning. -
relyingPartyMap
Map of RP names to meter names. -
usernameLookupStrategy
Lookup strategy to obtain subject name.
-
-
Constructor Details
-
LoopDetectionPredicate
public LoopDetectionPredicate()Constructor.
-
-
Method Details
-
setThreshold
Set the warning threshold for the 1 minute moving average to exceed.Defaults to 20.
- Parameters:
value- threshold to use
-
setRelyingPartyMap
Set the map of relying party names to meter names to track counts.- Parameters:
map- map of RP/meter mappings
-
setUsernameLookupStrategy
Set lookup strategy to obtain username.- Parameters:
strategy- lookup strategy
-
test
-