Route bindings do not match metadata
Maintainers usually reply within 5 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php
- Domain
- api, authentication
Research direction
Start with the bin/console debug:route output for gateway_identityprovider_sso and gateway_second_factor_only_identityprovider_sso, then trace those route entry points to their definitions. Confirm that the two metadata-declared HTTP-Redirect endpoints accept only GET, or add coverage if POST must remain supported.
Written by the indexing model from the issue text.
Description
Summary
After some discussion in https://github.com/OpenConext/Stepup-Gateway/pull/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-assertion
Issue: 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-on
Issue: 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.
- Dominant language
- PHP
- Stars
- 6
- Forks
- 3
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 15
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenConext/Stepup-Gateway
-
gateway
Difficulty 3/5 1-2 days Newbie friendliness 58/100
OpenConext/Stepup-Gateway#695 ·
Maintainers usually reply within 5 days
-
Upgrade to PHP 8.5 and apply Rector cleanupPossibly taken @kayjoosten claimed this 41 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
OpenConext/Stepup-Gateway#634 · 1 assignee ·
Maintainers usually reply within 5 days
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
OpenConext/Stepup-Gateway#508 ·
Maintainers usually reply within 5 days
-
needs discussion technical debt
Difficulty 4/5 3-5 days Newbie friendliness 25/100
OpenConext/Stepup-Gateway#471 ·
Maintainers usually reply within 5 days
-
Imported
Difficulty 3/5 1-2 days Newbie friendliness 38/100
OpenConext/Stepup-Gateway#413 ·
Maintainers usually reply within 5 days
All issues in OpenConext/Stepup-Gateway
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
area/import type/enhancement when/later
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
parime/glpi-iso27001-management#1165 ·
Maintainers usually reply within 1 day
-
15.0
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
opnsense/plugins#5976 · 1 comment ·
Maintainers usually reply within 1 day