[JIRA] (IDP-1793) Use Suppliers for HttpRequest/Response
Rod Widdowson (Jira)
jira at shibboleth.atlassian.net
Thu Jul 28 16:06:49 UTC 2022
Rod Widdowson ( https://shibboleth.atlassian.net/secure/ViewProfile.jspa?accountId=59fb32bbc24efb3c4ed3c977 ) *commented* on IDP-1793 ( https://shibboleth.atlassian.net/browse/IDP-1793?atlOrigin=eyJpIjoiNWEzZTUzNTRmMmMyNDg0OWIwOTYyZWFmZTU5MjJkMDIiLCJwIjoiaiJ9 )
Re: Use Suppliers for HttpRequest/Response ( https://shibboleth.atlassian.net/browse/IDP-1793?atlOrigin=eyJpIjoiNWEzZTUzNTRmMmMyNDg0OWIwOTYyZWFmZTU5MjJkMDIiLCJwIjoiaiJ9 )
I’m poking at this and retro working out what Scott means. You get 99% of the way by just changing org.opensaml.profile.action.AbstractProfileAction to have a setHttpServletRequestSupplier (or even just a setHttpServletRequest with a distinguished type if you want to separate the Proxy-Implementing bean from the Supplier Implementing bean.
I don’t think we can get away with just changing the type (i.e. removing the setter which takes a HttpXXX and replacing it with one which gets a Supplier<HttpXXX> because that's API contract and we want to get warnings into 4.3
You can leave getHttpRequest in place (just looking through the provider) and you can add lots of warnings to setHttpServletRequest(@Nullable final HttpServletRequest request).
I have prototyped this up and will push a dev stream (to support/saml and the IdP) to do the work (in V4) for one flow (the admin flows).
If that looks OK I’ll do all classes that are based on the OpenSAML AbstractProfileAction (confusion - there is an IdP one as well). This will involve reviewing all uses of getHttpServletRequest getHttpServletResponse against weird use as per https://shibboleth.atlassian.net/browse/IDP-1984.
With that out of the way it will be easier to see the places where the beans called shibboleth.HttpServletRequest and shibboleth.HttpServletResponse get used.
I’m not sure what to do about the beans called shibboleth.HttpServletReXXX because our documentation is full of suggestions to inject them into scripts. We might be able to make them a restricted scope (at least prototype but obviously request would be better if I knew how that worked) which were manufactured from the supplier.
There is also the option of justr throwing deprecation warnings into the implementation of the methods in ThreadLocalHttpServletRequestProxy and documenting to use the supplier.
( https://shibboleth.atlassian.net/browse/IDP-1793#add-comment?atlOrigin=eyJpIjoiNWEzZTUzNTRmMmMyNDg0OWIwOTYyZWFmZTU5MjJkMDIiLCJwIjoiaiJ9 ) Add Comment ( https://shibboleth.atlassian.net/browse/IDP-1793#add-comment?atlOrigin=eyJpIjoiNWEzZTUzNTRmMmMyNDg0OWIwOTYyZWFmZTU5MjJkMDIiLCJwIjoiaiJ9 )
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#100203- sha1:db6c294 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/commits/attachments/20220728/a1977569/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-comment-icon-3c9837a3-520f-4f3b-b024-a30f13f3b719
Type: image/png
Size: 1084 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220728/a1977569/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-static-footer-desktop-logo-64bbdf1b-24a0-487d-b02a-9dd5d6d14e4d
Type: image/png
Size: 10805 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220728/a1977569/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jira-generated-image-avatar-b7bb7ade-16be-43bc-aa66-20e2cb06189e
Type: image/png
Size: 468 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/commits/attachments/20220728/a1977569/attachment-0005.png>
More information about the commits
mailing list