Skip to content

Change identityprovider to asserting-party in Saml2RelyingPartyProperties #30742

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

Conversation

mhalbritter
Copy link
Contributor

@mhalbritter mhalbritter commented Apr 19, 2022

This was a bit of a hassle, because the properties-migrator can't be used for map-based types, which the identityprovider is (see #9945). I had to write codepaths for both the old and the new property names, and a warning is logged if the old one is used. I adjusted the tests to test with both the old and the new names.

I had to change private boolean signRequest = true; to private Boolean signRequest; to get the fallback working. This doesn't make a difference, because this only gets applied if != null. And the default in Spring Security is true for that field (see org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistration.AssertingPartyDetails.Builder#wantAuthnRequestsSigned).

Closes gh-30642

Copy link
Member

@snicoll snicoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a quick look and added a couple comments for your consideration.

Rename spring.security.saml2.relyingparty.registration.*.identity-provider.*
to spring.security.saml2.relyingparty.registration.*.asserting-party.*

The old property names are still supported, but will lead to a warning
in the logs.

Closes spring-projectsgh-30642
@mhalbritter mhalbritter force-pushed the mh/30642-change-identityprovider-to-assertingparty-in-saml2relyingpartyproperties branch from bf92a01 to 21c0b79 Compare April 19, 2022 11:32
@mhalbritter mhalbritter deleted the mh/30642-change-identityprovider-to-assertingparty-in-saml2relyingpartyproperties branch April 25, 2022 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants