Skip to content

SAML2 Provider AuthNRequest Hardcoded Protocol Binding #7513

@blucas

Description

@blucas

Summary

When acting as a SP sending an AuthnRequest to an IdP, the request is created with a hard-coded protocol binding. I was testing against http://samltest.id and it looks like they validate that the binding used is HTTP-POST. I am a novice at SAML. Googling around, it sounds like HTTP-POST is the recommended approach to responding to an AuthnRequest. Here is an example and another.

Actual Behavior

IdP validates protocol-binding and rejects AuthnRequest:

2019-10-07 00:40:38,302 - DEBUG [org.opensaml.saml.common.binding.impl.DefaultEndpointResolver:?] - Endpoint Resolver org.opensaml.saml.common.binding.impl.DefaultEndpointResolver: Candidate endpoint binding 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST' did not match 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'
2019-10-07 00:40:38,302 - DEBUG [org.opensaml.saml.common.binding.impl.DefaultEndpointResolver:?] - Endpoint Resolver org.opensaml.saml.common.binding.impl.DefaultEndpointResolver: Candidate endpoint binding 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect' not permitted by input criteria

You can see by the last log statement that HTTP-Redirect is not permitted

Expected Behavior

The SP should use HTTP-POST protocol-binding when creating an AuthnRequest so that validation on the IdP side passes.

Configuration

Version

Spring-Security 5.2.0
Spring-Boot 2.2.0.RC-1

@fhanik FYI. Also, thanks for contributing this. It is very much appreciated.

Metadata

Metadata

Assignees

Labels

in: saml2An issue in SAML2 modulestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions