-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Summary
After some discussion in #493, @MKodde and I took a look at the bindings in Gateway. It seems gateway could accept POST requests, where only GET requests should be supported.
Using the POST in those scenario's is unsupported, and if it works, it might break as it has no test coverage.
Proposal: Remove POST from /authentication/single-sign-on and /second-factor-only/single-sign-on.
Let's refine. If the POST cannot be removed, add test coverage.
Details
Taking a look at the bindings specified in the various metadata endpoints:
https://sa-gw.surfconext.nl/authentication/metadata
π’ /authentication/consume-assertion
<md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://sa-gw.surfconext.nl/authentication/consume-assertion" index="0"/>
root@gateway:/var/www/html# ./bin/console debug:route | grep consume-assertion
gateway_serviceprovider_consume_assertion POST /authentication/consume-assertionIssue: None
π΄ /authentication/single-sign-on
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://sa-gw.surfconext.nl/authentication/single-sign-on"/>
root@gateway:/var/www/html# ./bin/console debug:route | grep single-sign-on
gateway_identityprovider_sso GET|POST /authentication/single-sign-on
gateway_identityprovider_sso_proxy POST /authentication/single-sign-on/{idpKey}
...Issue: The api route accepts both POST and GET requests. The metadata only accepts the HTTP-Redirect (GET) binding. If POST requests were to be sent to this endpoint, the behavior is unsupported.
https://sa-gw.surfconext.nl/second-factor-only/metadata
π΄ /second-factor-only/single-sign-on
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://sa-gw.surfconext.nl/second-factor-only/single-sign-on"/>
root@gateway:/var/www/html# ./bin/console debug:route | grep single-sign-on
...
gateway_second_factor_only_identityprovider_sso GET|POST /second-factor-only/single-sign-onIssue: The api route accepts both POST and GET requests. The metadata only accepts the HTTP-Redirect (GET) binding.
https://sa-gw.surfconext.nl/gssp/tiqr/metadata
π’ /gssp/tiqr/single-sign-on
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://sa-gw.surfconext.nl/gssp/tiqr/single-sign-on"/>
root@gateway:/var/www/html# ./bin/console debug:route | grep gssp
gssp_verify GET /gssp/{provider}/single-sign-on
π’ /gssp/tiqr/consume-assertion
<md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://sa-gw.surfconext.nl/gssp/tiqr/consume-assertion" index="0"/>
root@gateway:/var/www/html# ./bin/console debug:route | grep gssp
gssp_consume_assertion POST /gssp/{provider}/consume-assertion
Issue: None.