[JIRA] (JSATTR-14) Registry rule loader constructor breaks on jar-based classpaths

Scott Cantor (Jira) jira at shibboleth.atlassian.net
Wed May 10 17:35:57 UTC 2023


Scott Cantor ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A5b78efc9-1379-42cc-a3f6-56c6ea3a0007 ) *created* an issue

Shibboleth Attribute Library - Java ( https://shibboleth.atlassian.net/browse/JSATTR?atlOrigin=eyJpIjoiOTkxN2EwOWI5ZjFhNGE5Njk1YmQzZjdkYjBlYjRiMTYiLCJwIjoiaiJ9 ) / Bug ( https://shibboleth.atlassian.net/browse/JSATTR-14?atlOrigin=eyJpIjoiOTkxN2EwOWI5ZjFhNGE5Njk1YmQzZjdkYjBlYjRiMTYiLCJwIjoiaiJ9 ) JSATTR-14 ( https://shibboleth.atlassian.net/browse/JSATTR-14?atlOrigin=eyJpIjoiOTkxN2EwOWI5ZjFhNGE5Njk1YmQzZjdkYjBlYjRiMTYiLCJwIjoiaiJ9 ) Registry rule loader constructor breaks on jar-based classpaths ( https://shibboleth.atlassian.net/browse/JSATTR-14?atlOrigin=eyJpIjoiOTkxN2EwOWI5ZjFhNGE5Njk1YmQzZjdkYjBlYjRiMTYiLCJwIjoiaiJ9 )

Issue Type: Bug Assignee: Rod Widdowson ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=59fb32bbc24efb3c4ed3c977 ) Components: Attribute Transcoding Created: 10/May/23 1:35 PM Fix Versions: 5.0.0 Priority: Trivial Reporter: Scott Cantor ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A5b78efc9-1379-42cc-a3f6-56c6ea3a0007 )

The constructor for the custom rule loader requires a Path, which Spring tries to auto-convert through the ClasspathResource class, and it breaks if the classpath is referencing something that can’t be expressed in a File path. This seems to be very dependent on the runtime environment since the tests and testbed had been working with classpath: as idp.home.

There’s no way to trap the failure and keep it from being fatal, so I think the fix is to change the constructor type into Resource and do the conversion internally under a try/catch.

( https://shibboleth.atlassian.net/browse/JSATTR-14#add-comment?atlOrigin=eyJpIjoiOTkxN2EwOWI5ZjFhNGE5Njk1YmQzZjdkYjBlYjRiMTYiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/JSATTR-14#add-comment?atlOrigin=eyJpIjoiOTkxN2EwOWI5ZjFhNGE5Njk1YmQzZjdkYjBlYjRiMTYiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:55ea0c5 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20230510/b213b771/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-4ca45533-ba5f-4c7e-ba5d-6acdc932201a
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230510/b213b771/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-trivial-fc9029c6-d43a-43ad-8f73-6ad6d073d394
Type: image/png
Size: 446 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230510/b213b771/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-35652e12-7042-450a-9032-bf45436bc42b
Type: image/png
Size: 345 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230510/b213b771/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-bca31a17-4563-479f-9626-92ab4ebabadc
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20230510/b213b771/attachment-0007.png>


More information about the commits mailing list