[JIRA] (JCOMOIDC-42) Root cause logging in FilesystemClientInformationResolver

Henri Mikkonen (Jira) jira at shibboleth.atlassian.net
Fri Mar 11 08:17:28 UTC 2022


Henri Mikkonen ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A1614c4a5-c89e-4edc-9421-990bd6ea85fd ) *commented* on JCOMOIDC-42 ( https://shibboleth.atlassian.net/browse/JCOMOIDC-42?atlOrigin=eyJpIjoiYjhkNjhkYWQ5MzE3NGRjZWE5Yjg4YTMwYzdjZDhkYTgiLCJwIjoiaiJ9 )

Re: Root cause logging in FilesystemClientInformationResolver ( https://shibboleth.atlassian.net/browse/JCOMOIDC-42?atlOrigin=eyJpIjoiYjhkNjhkYWQ5MzE3NGRjZWE5Yjg4YTMwYzdjZDhkYTgiLCJwIjoiaiJ9 )

Updated the code to also log stack trace for the parsing exceptions.

Now, for instance for the following metadata (line 3 missing comma in the end of the line):

[
 {
   "client_name":"TEST_RP configured via oidc-clients.json"
   "scope":"openid phone profile email offline_access",
...

The following logs are produced when it’s being parsed:

2022-03-11 08:13:30,336 - 127.0.0.1 - ERROR [net.shibboleth.oidc.metadata.impl.AbstractReloadingOIDCEntityResolver:186] - Error occurred while attempting to refresh metadata from '/opt/shibboleth-idp/metadata/oidc-client.json'
com.nimbusds.oauth2.sdk.ParseException: Could not parse a single or an array of OIDC client information object(s).
	at net.shibboleth.oidc.metadata.impl.FilesystemClientInformationResolver.parse(FilesystemClientInformationResolver.java:152)
Caused by: com.nimbusds.oauth2.sdk.ParseException: Invalid JSON: Unexpected token " at position 70.
	at com.nimbusds.oauth2.sdk.util.JSONUtils.parseJSON(JSONUtils.java:52)
Caused by: net.minidev.json.parser.ParseException: Unexpected token " at position 70.
	at net.minidev.json.parser.JSONParserBase.readObject(JSONParserBase.java:586)

The unexpected token " at position 70 refers to "scope"..

( https://shibboleth.atlassian.net/browse/JCOMOIDC-42#add-comment?atlOrigin=eyJpIjoiYjhkNjhkYWQ5MzE3NGRjZWE5Yjg4YTMwYzdjZDhkYTgiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/JCOMOIDC-42#add-comment?atlOrigin=eyJpIjoiYjhkNjhkYWQ5MzE3NGRjZWE5Yjg4YTMwYzdjZDhkYTgiLCJwIjoiaiJ9 )

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#100197- sha1:b96bc1b )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20220311/cfe26201/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-f258abd9-3731-4f6b-9bdc-d98f487f5a9f
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220311/cfe26201/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-264536c1-f93b-4ea4-9f1c-67a39e14e47c
Type: image/png
Size: 457 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220311/cfe26201/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-9dc0158a-ae97-45aa-a64c-42f292fd73ff
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220311/cfe26201/attachment-0005.png>


More information about the commits mailing list