Skip to content

Select preferred binding on the configuration #120

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

Merged

Conversation

c00kiemon5ter
Copy link
Member

@c00kiemon5ter c00kiemon5ter commented Jul 19, 2017

pysaml2 supports the configuration option preferred_binding which is a map of services to array of preferred bindings for that service. Use the configuration instead of the currently hardcoded choices.

An example configuration would be the following:

  module: satosa.backends.saml2.SAMLBackend
  name: Saml2
  config:
    sp_config:
      preferred_binding:
        single_sign_on_service:
        - urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
        - urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST

This defines the preferred bindings for the SSO service, and is equivalent the code that was hardcoded before that is also the default behaviour of pysaml2. Changing the order of the bindings would use HTTP-POST instead of the HTTP-Redirect.

You can see the preferred_binding service names map here:
https://github.com/rohe/pysaml2/blob/master/src/saml2/config.py#L139-L156

pysaml2 supports the configuration option 'preferred_binding' which is
a map of services to array of preferred bindings for that service. Use
the configuration instead of the currently hardcoded choices.

An example configuration would be the following:

  module: satosa.backends.saml2.SAMLBackend
  name: Saml2
  config:
    sp_config:
      preferred_binding:
        single_sign_on_service:
        - urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
        - urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST

This defines the preferred bindings for the SSO service, and is
equivalent the code that was hardcoded before. Changing the order of the
bindings would use HTTP-POST instead of the HTTP-Redirect.
@c00kiemon5ter c00kiemon5ter force-pushed the feature-preferred-binding branch from 8c0347e to 7046ceb Compare July 19, 2017 14:27
@jkakavas
Copy link
Member

jkakavas commented Jul 19, 2017 via email

@c00kiemon5ter
Copy link
Member Author

Note that this configuration option is undocumented on the pysaml2 side.
That should probably happen too.

@johanlundberg johanlundberg merged commit 3be975e into IdentityPython:master Jul 20, 2017
@jkakavas
Copy link
Member

Note that this configuration option is undocumented on the pysaml2 side. That should probably happen too.

Care to open an issue/PR there too ?

@c00kiemon5ter
Copy link
Member Author

Yes, I will

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.

3 participants