providers/saml: skip unsupported bindings when importing metadata
Details
The "SAML Provider from Metadata" flow could select the first ACS/SLS endpoint even when its Binding is not supported by authentik, resulting in an invalid provider configuration.
Prefer supported bindings (HTTP-POST / HTTP-Redirect) and skip unsupported entries when creating SAML provider from metadata.
This patch will close #21009
Note: Split metadata extraction from endpoint selection policy to keep parsing and decisions separate.
Checklist
- [x] Local tests pass (
ak test authentik/) - [x] The code has been formatted (
make lint-fix)
If an API change has been made
- [ ] The API schema has been updated (
make gen-build)
If changes to the frontend have been made
- [ ] The code has been formatted (
make web)
If applicable
- [ ] The documentation has been updated
- [ ] The documentation has been formatted (
make docs)
Deploy Preview for authentik-docs ready!
| Name | Link |
|---|---|
| Latest commit | d2a2f77016a036295f9845a36463be6d40128042 |
| Latest deploy log | https://app.netlify.com/projects/authentik-docs/deploys/69c69748631364000823b5b3 |
| Deploy Preview | https://deploy-preview-21010--authentik-docs.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Codecov Report
:x: Patch coverage is 90.97222% with 13 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 93.42%. Comparing base (5a33833) to head (1d51847).
Additional details and impacted files
@@ Coverage Diff @@
## main #21010 +/- ##
==========================================
- Coverage 93.45% 93.42% -0.03%
==========================================
Files 1058 1059 +1
Lines 63107 63224 +117
Branches 424 424
==========================================
+ Hits 58974 59066 +92
- Misses 4133 4158 +25
| Flag | Coverage Ξ | |
|---|---|---|
| conformance | 35.38% <18.75%> (-0.03%) |
:arrow_down: |
| e2e | 40.38% <18.75%> (-0.04%) |
:arrow_down: |
| integration | 31.38% <18.75%> (-0.50%) |
:arrow_down: |
| rust | 0.00% <ΓΈ> (ΓΈ) |
|
| unit | 92.64% <90.97%> (+0.01%) |
:arrow_up: |
| unit-migrate | 92.66% <90.97%> (+0.03%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.
Updated this branch onto the latest main.
Thanks @ikob
We've created a new PR to do this but in a slightly different way: #24716
Thank you regardless.