Skip to content
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

Validate asserting party metadata signature #12116

Closed
palakova opened this issue Nov 1, 2022 · 2 comments
Closed

Validate asserting party metadata signature #12116

palakova opened this issue Nov 1, 2022 · 2 comments
Assignees
Labels
in: saml2 An issue in SAML2 modules type: enhancement A general enhancement
Milestone

Comments

@palakova
Copy link
Contributor

palakova commented Nov 1, 2022

Various elements in metadata can be digitally signed. Although signatures are optional, according to SAML specification, section 4.3.3.2 Processing Signed Documents and Fragments, "Metadata consumers MUST validate signatures, when present."

Expected Behavior
Similar as the previous Spring Security SAML Extension implementation:
Enable to submit a collection of public keys via configuration (e.g. as a part of RelyingPartyRegistration) and verify signature(s) in IdP metadata using PKIX algorithm and using the provided public keys as trust anchors.

Current Behavior
I believe metadata signature is not verified. I did not find any way to enable this behaviour.

Context
Adding metadata signature increases security and conforms to SAML 2.0 specification.
As an example, Azure AD signs the root <EntityDescriptor> element of it's metadata.

@palakova palakova added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Nov 1, 2022
@sjohnr sjohnr added the in: saml2 An issue in SAML2 modules label Nov 2, 2022
@jzheaux jzheaux removed the status: waiting-for-triage An issue we've not yet triaged label Dec 22, 2022
@jzheaux
Copy link
Contributor

jzheaux commented Jan 6, 2023

I think this sounds reasonable, though it would likely involve making OpenSamlAssertingPartyDetailsConverter public and polishing it accordingly.

It might change to something like OpenSamlAssertingPartyDetailsDecoder (similar to NimbusJwtDecoder) and may get an interface like AssertingPartyDetailsDecoder. The implementation would take the keys as part of its construction.

@sumeetpri
Copy link

Hi @jzheaux @sjohnr , metadata consumer must validate signature when presented . Is there any option to add signature?

@jzheaux jzheaux added this to the 6.4.0-M1 milestone May 22, 2024
jzheaux added a commit to jzheaux/spring-security that referenced this issue May 22, 2024
This adds the RelyingPartyRegistrationsDecoder component
which allows configuration with signature verification credentials.
It also introduces a caching RelyingPartyRegistration
implementation that uses it.

Issue spring-projectsgh-12116
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jun 29, 2024
This adds the RelyingPartyRegistrationsDecoder component
which allows configuration with signature verification credentials.
It also introduces a caching RelyingPartyRegistration
implementation that uses it.

Issue spring-projectsgh-12116
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 2, 2024
This adds the RelyingPartyRegistrationsDecoder component
which allows configuration with signature verification credentials.

Closes spring-projectsgh-12116
Closes spring-projectsgh-15017
Closes spring-projectsgh-15090
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 2, 2024
This adds the RelyingPartyRegistrationsDecoder component
which allows configuration with signature verification credentials.

Closes spring-projectsgh-12116
Closes spring-projectsgh-15017
Closes spring-projectsgh-15090
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 2, 2024
This adds the RelyingPartyRegistrationsDecoder component
which allows configuration with signature verification credentials.

Closes spring-projectsgh-12116
Closes spring-projectsgh-15017
Closes spring-projectsgh-15090
jzheaux added a commit to jzheaux/spring-security that referenced this issue Jul 2, 2024
This adds the RelyingPartyRegistrationsDecoder component
which allows configuration with signature verification credentials.

Closes spring-projectsgh-12116
Closes spring-projectsgh-15017
Closes spring-projectsgh-15090
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
@marcusdacoregio marcusdacoregio modified the milestones: 6.4.0-M1, 6.4.0-M2 Jul 15, 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
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
Status: No status
Development

No branches or pull requests

5 participants