[JIRA] (IDP-1851) SealedPrincipalSerializer - reduce inappropriate error logging from supports() functions
Jamie Arthur (Jira)
jira at shibboleth.atlassian.net
Wed Aug 11 23:48:59 UTC 2021
Jamie Arthur ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A694aad9d-f56c-4e69-a466-d1406b233f95 ) *created* an issue
Identity Provider ( https://shibboleth.atlassian.net/browse/IDP?atlOrigin=eyJpIjoiZWVlZjgxNmZiOWQ3NDFkODg4YjE0ZjFiMWJiNzkxNjEiLCJwIjoiaiJ9 ) / Improvement ( https://shibboleth.atlassian.net/browse/IDP-1851?atlOrigin=eyJpIjoiZWVlZjgxNmZiOWQ3NDFkODg4YjE0ZjFiMWJiNzkxNjEiLCJwIjoiaiJ9 ) IDP-1851 ( https://shibboleth.atlassian.net/browse/IDP-1851?atlOrigin=eyJpIjoiZWVlZjgxNmZiOWQ3NDFkODg4YjE0ZjFiMWJiNzkxNjEiLCJwIjoiaiJ9 ) SealedPrincipalSerializer - reduce inappropriate error logging from supports() functions ( https://shibboleth.atlassian.net/browse/IDP-1851?atlOrigin=eyJpIjoiZWVlZjgxNmZiOWQ3NDFkODg4YjE0ZjFiMWJiNzkxNjEiLCJwIjoiaiJ9 )
Issue Type: Improvement Affects Versions: 4.1.2 Assignee: Scott Cantor ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A5b78efc9-1379-42cc-a3f6-56c6ea3a0007 ) Components: Authentication Created: 11/Aug/21 7:48 PM Priority: Trivial Reporter: Jamie Arthur ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A694aad9d-f56c-4e69-a466-d1406b233f95 )
In net.shibboleth.idp.authn.principal.SealedPrincipalSerializer (under the idp-authn-api module), the two supports() functions both check for the presence of a data sealer before checking if that serializer is even appropriate for the given principal/string. This leads to the situation where if an installation does not have a data sealer configured, and depending on which order Spring builds the list of serializers for the PrincipalServiceManager bean, that error may or may not get logged under normal operations (even though it's not impacting functionality at all).
Is it possible to swap the checks in each of those supports() functions so that the data sealer check is only performed if the super-class call returns true?
{{
public boolean supports(@Nonnull @NotEmpty final String value) {
if (!super.supports(value))
{ return false; }
else if (sealer == null)
{ log.error("No DataSealer was provided, unable to support deserialization"); return false; }
else
{ return true; }
}
}}
( https://shibboleth.atlassian.net/browse/IDP-1851#add-comment?atlOrigin=eyJpIjoiZWVlZjgxNmZiOWQ3NDFkODg4YjE0ZjFiMWJiNzkxNjEiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/IDP-1851#add-comment?atlOrigin=eyJpIjoiZWVlZjgxNmZiOWQ3NDFkODg4YjE0ZjFiMWJiNzkxNjEiLCJwIjoiaiJ9 )
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#100172- sha1:812d3c4 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20210811/2d18e453/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-20dc82f6-500c-4ce8-9f6f-16bf0e573c79
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20210811/2d18e453/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-797480e5-eb97-4506-8c52-b7c1f5640821
Type: image/png
Size: 457 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20210811/2d18e453/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-trivial-8a61862f-9702-4f34-950f-a85b30a72194
Type: image/png
Size: 563 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20210811/2d18e453/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-4b6f797a-32c5-4214-b6fe-ab1ccaec4196
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20210811/2d18e453/attachment-0007.png>
More information about the commits
mailing list