Using Client IP Address in conf/authn/mfa-authn-config.xml

Noriyuki TAKEI ntakei at sios.com
Tue Feb 5 11:11:15 EST 2019


Hi, Scott.

Thanks to your advice, I could solve that.

The way I did is as follows:

I added the statement marked as "added" to conf/authn/mfa-authn-config.xml.

    <util:map id="secondFactorHelpersMap">
        <entry key="attributeResolver"
value-ref="shibboleth.AttributeResolverService" />
        <entry key="totpAuthnSessionChecker"
value-ref="TotpAuthnSessionChecker" />
        <entry key="httpServletRequestContext"
value-ref="shibboleth.HttpServletRequest" /> // added
    </util:map>


And then, I added the following statement inside bean tag
whose attribute is 'parent="shibboleth.ContextFunctions.Scripted"'.

httpRequestServletContext = custom.get("httpServletRequestContext");
logger.info("IP Address:" + httpRequestServletContext.remoteAddr);

On Tue, Feb 5, 2019 at 11:27 PM Cantor, Scott <cantor.2 at osu.edu> wrote:

> On 2/5/19, 9:19 AM, "users on behalf of Noriyuki TAKEI" <
> users-bounces at shibboleth.net on behalf of ntakei at sios.com> wrote:
>
> > But I’ve already defined p:customObject-ref to get another custom bean I
> developed.
>
> Define a map of objects in Spring and inject the map as the custom object.
> Obvious trick once you know it.
>
> -- Scott
>
>
> --
> For Consortium Member technical support, see
> https://wiki.shibboleth.net/confluence/x/coFAAg
> To unsubscribe from this list send an email to
> users-unsubscribe at shibboleth.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20190206/c98ae038/attachment.html>


More information about the users mailing list