Path issues when loading a resourceScript for an MFA transition bean

Max Spicer max.spicer at york.ac.uk
Fri Mar 19 11:59:53 UTC 2021


I'm trying to load a script from a separate file rather than including the
source inline in a bean. This is to make linting and editing easier.
Unfortunately, I'm finding that the absolute resource path that I supply is
always prefixed with /opt/shibboleth-idp/system/flows/authn/ when the idp
tries to load the file, thus causing the file not to be found.

My original setup is based on the example at
https://wiki.shibboleth.net/confluence/display/IDP4/MultiFactorAuthnConfiguration#55804289a3d92e63b12449a2a6f87810900f5178.
I've changed my bean definition in conf/authn/mfa-authn-config.xml to this:

<bean id="checkSecondFactor" parent="shibboleth.ContextFunctions.Scripted"
factory-method="resourceScript"
          c:resource="*/opt/shibboleth-idp/conf/authn/checkSecondFactor.js*"
          p:customObject-ref="shibboleth.AttributeResolverService" />

However, the IdP (4.0.1) throws this error when it tries to load the script:
java.io.FileNotFoundException: */opt/shibboleth-idp/system/flows/authn*
/opt/shibboleth-idp/conf/authn/checkSecondFactor.js

I can work around this using "../../../conf/authn/checkSecondFactor.js" as
my resource path, but it's not pretty.

Is this expected behaviour? Or a bug?

Thanks,

Max Spicer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20210319/2b8e37cb/attachment.htm>


More information about the users mailing list