Clarify dual use of iss parameter: SMART launch URL vs RFC 9207#419
Open
dionmcm wants to merge 1 commit into
Open
Clarify dual use of iss parameter: SMART launch URL vs RFC 9207#419dionmcm wants to merge 1 commit into
iss parameter: SMART launch URL vs RFC 9207#419dionmcm wants to merge 1 commit into
Conversation
The `iss` query parameter appears in two distinct contexts within a SMART App Launch flow: on the app launch URL (FHIR server base URL) and on the OAuth authorization response (authorization server issuer per RFC 9207). Add normative guidance that the authorization response `iss` SHALL NOT be used to determine the FHIR server base URL, and encourage clients to validate it to mitigate mix-up attacks.
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.
Summary
Clarifies the dual use of the
issquery parameter in SMART App Launch and OAuth 2.0 authorization responses (RFC 9207).issrepresents the FHIR server base URLiss(per RFC 9207) represents the authorization server issuerThis PR adds a small clarification to distinguish these contexts and prevent misinterpretation in client implementations.
Problem
SMART App Launch and RFC 9207 both define a query parameter named
iss, but with different meanings at different stages of the flow:SMART App Launch (launch request)
iss= FHIR server base URLRFC 9207 (authorization response)
iss= authorization server issuer (to mitigate mix-up attacks)With increasing adoption of RFC 9207 (e.g. Keycloak ≥23, FAPI 2.0), clients may receive an
issparameter on the OAuth callback and incorrectly interpret it as the FHIR server base URL. This can lead to:Proposed Change
This PR introduces minimal, targeted clarifications:
Launch section
Adds a note clarifying that
issin the launch URL refers to the FHIR server base URL.Authorization response handling
Adds normative guidance that:
issin the authorization response SHALL be interpreted as the RFC 9207 authorization server issuer(Optional) Security considerations
Encourages validation of
issper RFC 9207 to mitigate mix-up attacks.Rationale
issoccur in different phases of the SMART flow (launch vs callback)Backwards Compatibility
This is a non-breaking clarification only.
No changes to existing parameter definitions or behaviour are required.
References
Notes
This PR was prompted by issues observed when RFC 9207 support is enabled (e.g. Keycloak ≥23), where the
issparameter in authorization responses was misinterpreted smart-on-fhir/client-js.Following a Zulip conversation, this proposal reflects the suggested approach of distinguishing launch vs callback handling (e.g. based on the presence of an authorization
codeparameter), and clarifies the intended meaning ofissin each context.The goal here is simply to make this behaviour explicit for implementers, avoid the need for workarounds (such as disabling RFC 9207), and support safe adoption of its protections.
This is the subject of FHIR-56141 Disambiguate iss in SMART flows with RFC 9207.
Very happy for this to be refined, reworked, or redirected to better align with the spec.