Using org.opensaml.profile.logic.IPRangePredicate in MFA nextFlowStrategy

Youssef GHORBAL youssef.ghorbal at pasteur.fr
Thu Apr 3 20:35:04 UTC 2025



On 3 Apr 2025, at 22:02, Cantor, Scott <cantor.2 at osu.edu> wrote:


But since I may have multiple ranges I was wondering is
there is any trick to IPRangePredicate

If by trick you mean "give the predicate multiple ranges"; the input setter for that class takes a collection, not a single range.

https://urldefense.com/v3/__https://shibboleth.net/api/java-opensaml/5.1.4/org/opensaml/profile/logic/IPRangePredicate.html__;!!JFdNOqOXpB6UZW0!oiT7ta2A4XFxvWE04DqsrX29tW1gVxq6GDjifHPQBRZ54CGsOQsUCUIWowzKojyiy2Xam4_xDU2VsDxG_so3LczNdg$

The only reason giving it one works is that Spring converts singletons to collections automatically.

Sorry I wasn’t that clear in my statement. I was meant to say that I made the logic work using a simple if (request.getRemoteAddr().startsWith("192.168.42."))

But given that I’ll be having multiple IP ranges/subnets it will be tedious to make itwork with just chained startsWith() checks, hence the idea to use IPRangePredicate that seems to target what I’m looking for, but I must confess I wan’t able to correctly call IPRangePredicate from withing the inline script, hence my call for assistance.

Youssef




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20250403/ee0dc858/attachment.htm>


More information about the users mailing list