user3406222
user3406222

Reputation: 307

How to configure Spring SAML to send "assertionConsumerServiceIndex" instead of "assertionConsumerServiceUrl"?

How can I configure Spring SAML to send "assertionConsumerServiceIndex" instead of "assertionConsumerServiceUrl" in the SAML Authentication Requests?

Another question: Where can I report an issue of the Spring security SAML project?

Thanks

Upvotes: 2

Views: 2745

Answers (2)

Saurabh Agrawal
Saurabh Agrawal

Reputation: 25

Yes, We need to alter the way buildReturnAddress() behaves in f/w. We can do this simply by extending WebSSOProfileImpl and overriding buildReturnAddress() method in our service provider code.

Upvotes: 1

user3406222
user3406222

Reputation: 307

Got it working but not through config file. I found following comment in the Spring SAML source code:

// AssertionConsumerServiceURL + ProtocolBinding is mutually exclusive with AssertionConsumerServiceIndex, we use first one here

I had to modify buildReturnAddress method of WebSSOProfileImpl class as below to insert AssertionConsumerServiceIndex instead of AssertionConsumerServiceURL + ProtocolBinding when creating new AuthNRequest:

if (service != null) {
    request.setAssertionConsumerServiceIndex(service.getIndex());
}

Upvotes: 2

Related Questions