Skip to content

Add expiry-aware refreshing asserting party repository #15395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jzheaux opened this issue Jul 10, 2024 · 0 comments
Closed

Add expiry-aware refreshing asserting party repository #15395

jzheaux opened this issue Jul 10, 2024 · 0 comments
Assignees
Labels
in: saml2 An issue in SAML2 modules type: enhancement A general enhancement

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Jul 10, 2024

With the introduction of #15394, an implementation that uses MetadataResolver would be handy as several of its implementations ship with support for expiry-aware refreshing of metadata from various sources.

Such an implementation would greatly simplify an application producing a RelyingPartyRegistrationRepository that refreshes the underlying asserting party details of each RelyingPartyRegistration.

@jzheaux jzheaux added type: enhancement A general enhancement in: saml2 An issue in SAML2 modules labels Jul 10, 2024
@jzheaux jzheaux self-assigned this Jul 10, 2024
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 11, 2024
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 11, 2024
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 11, 2024
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 14, 2024
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 19, 2024
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 19, 2024
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 19, 2024
jzheaux added a commit that referenced this issue Jul 29, 2024
- MockWebServer seems to start failing to respond to connections
at a certain frequency of requests. This commit builds in a small
delay of 1 millisecond to address this.

Closes gh-15395
jzheaux added a commit that referenced this issue Aug 9, 2024
- Applying changes to OpenSaml4 tests that were already applied
to OpenSaml5 tests

Issue gh-15395
jzheaux added a commit that referenced this issue Aug 20, 2024
The error between MockWebServer and OpenSAML still happens on
occasion. This commit uses MockWebServer's default queue dispatcher
to remove any customization that might be contributing to
the flakiness.

Issue gh-15395
jzheaux added a commit that referenced this issue Aug 23, 2024
The issue turned out to be that OpenSAML first sends two HEAD
requests before sending a GET to retrieve the metadata. The way
the MockWebServer dispatcher was configured, it would send back
the metadata on each request. This created a situation where sockets
were being closed by the client before the server had sent all the
response, resulting in a broken pipe.

The tests would succeed most of the time due to lucky timing between
the client closing the socket and the server having sent all of its
(unrequested) data.

This version sends an expected HEAD response when requested.

Issue gh-15395
kse-music added a commit to kse-music/spring-security that referenced this issue Aug 25, 2024
jzheaux added a commit that referenced this issue Aug 26, 2024
There was another flaky failure. While it seems clear what
needs to be done to repair it, this commit disables these
tests for now while the CI on a separate branch confirms
after a few days that the tests are stable again.

Issue gh-15395
jzheaux added a commit that referenced this issue Aug 26, 2024
There was one test that wasn't converted and now it is.

Closes gh-15395
Kehrlann pushed a commit to Kehrlann/spring-security that referenced this issue Aug 30, 2024
The issue turned out to be that OpenSAML first sends two HEAD
requests before sending a GET to retrieve the metadata. The way
the MockWebServer dispatcher was configured, it would send back
the metadata on each request. This created a situation where sockets
were being closed by the client before the server had sent all the
response, resulting in a broken pipe.

The tests would succeed most of the time due to lucky timing between
the client closing the socket and the server having sent all of its
(unrequested) data.

This version sends an expected HEAD response when requested.

Issue spring-projectsgh-15395
jzheaux added a commit that referenced this issue Aug 30, 2024
There was one test that wasn't converted and now it is.

Issue gh-15395
jzheaux added a commit that referenced this issue Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: saml2 An issue in SAML2 modules type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant