only displaying one warning intercept out of several with warning module in idp v4.1
Jeffrey Eaton
jeaton at cmu.edu
Wed Feb 9 19:29:11 UTC 2022
I have a requirement for having multiple warning intercepts set up,
triggered based on the resolved attributes. However, I only want the first
one which matches to be displayed, and any further ones to be skipped.
I'm currently doing this with multiple entries in
the shibboleth.warning.ConditionMap pointing to a scripted condition which
when it decides to show the condition, it also shoves a flag into the
AuthenticationContext stateMap. If the later conditions see that flag,
they bypass their check. Is this the best way? Is the ordering of the
conditions in the ConditionMap fixed, or can it vary? I need to enforce an
ordering, so if condition A is displayed, then do not show B or C. If A
does not apply, but B does, then display B, but skip C.
I started going down the path of just having a single warning intercept
that performed all of the logic, but from what I can tell, I can only have
one view that way (named after the key in the ConditionMap).
As an aside, is there a way to reduce the code duplication in my
conditions? Every one has the same basic format (grab stuff from the auth
context, rp context and attribute context, verify the authcontext flag
isn't ready set, verify the RP is not one that's excluded, then check an
attribute for a value (or lack of value), then set the flag and show the
intercept, or just return false and move on to the next. It kills me to
have the same code with only minor variations repeated multiple times.
Thanks,
-jeaton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20220209/ecf359a7/attachment.htm>
More information about the users
mailing list