fix(saml): resolve SP by entityID via request body, not path param#71
Merged
Conversation
SAML entity IDs are typically URLs (https://sp.example.com/metadata); the :// and slashes broke the single-segment :entityID path param, so the internal SP lookup returned gin's 404 ("unknown service provider") for every URL-shaped entityID. Move the lookup to POST /core/saml/sp/resolve with the entityID in a JSON body — same POST-for-read pattern core already uses for /token/validate and /applications/verify.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SAML entity IDs are typically URLs (e.g.
https://samlsp.com). The internal SP lookup used a single-segment path param (/core/saml/sp/entity/:entityID), so the://and slashes split into extra path segments and gin never matched the route — every URL-shaped entityID returned the default404 page not found, surfacing ascannot handle request from unknown service providerand a 400 at/saml/sso.GET /core/saml/sp/entity/:entityIDwithPOST /core/saml/sp/resolve, entityID in a JSON body (same POST-for-read pattern as/token/validateand/applications/verify)ResolveSPnow POSTs the entityID instead of putting it in the pathFound while testing SP-initiated SSO against
https://samlsp.com. Needs a release + redeploy before live SSO lookups succeed.