-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Make Saml2AuthenticationToken Serializable #16287
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @ngocnhan-tran1996, for the PR!
In addition to my inline feedback, will you please add Closes gh-16286
to the end of your commit message?
...org/springframework/security/saml2/provider/service/registration/AssertingPartyMetadata.java
Show resolved
Hide resolved
@@ -309,6 +311,7 @@ class SpringSecurityCoreVersionSerializableTests { | |||
(r) -> TestSaml2PostAuthenticationRequests.create()); | |||
generatorByClassName.put(Saml2RedirectAuthenticationRequest.class, | |||
(r) -> TestSaml2RedirectAuthenticationRequests.create()); | |||
generatorByClassName.put(RelyingPartyRegistration.class, (r) -> TestRelyingPartyRegistrations.full().build()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run the serializeCurrentVersionClasses
test so that the appropriate .serialized
file gets created. You can see #16276 for more details.
Thanks for your review. I will rebase commit into below message if my PR does not have any changes.
|
Please review and tell me if I missunderstood |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates, @ngocnhan-tran1996. This is close. I've left feedback inline.
public final class Saml2X509Credential { | ||
public final class Saml2X509Credential implements Serializable { | ||
|
||
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this didn't have a serial version UID declared before 6.3 (when Spring Security started ensuring backward compatibility with Java serialization), it needs to be the JVM-calculated value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same for the other classes as well
230f662
to
ee25efa
Compare
Closes spring-projectsgh-16286 Generate file serialized Generate file serialized
be97a2b
to
bbc8e69
Compare
Closes gh-16286