Closed jdkizer9 closed 2 years ago
@jdkizer9 Please see issue #157.
We have been notified any SMART on FHIR app should be able to call FHIR Server authorize endpoint with only code as value for response_type parameter.
CPS 12.3, CEMR 9.12, athenaPractice and athenaFlow V20 FHIR Server incorrectly requires both code and id_token for response_type parameter. Part of the reason for this is that we use id_token from Microsoft AAD to get the identity of the authenticated user.
The V22 release will include changes so id_token is optional in response_type parameter. Until then, with earlier versions, you must specify response_type=code%20id_token when invoking FHIR Server authorize endpoint.
With regard to the contents of id_token: In current products, the id_token comes directly from Microsoft AAD which sets audience claim to an appropriate Azure Application ID.
With the new regulatory requirement to support fhirUser claim, the V22 release aP/aF FHIR Servers will issue its own id tokens with audience claim set to the requested client id registered at the Dev Portal.
With earlier versions, would it be possible to implement extra logic to work around the issue with AppAuth-Android failing to validate the id_tokens issued by AAD?
Thanks @Torin-Shepard-athena. I'll look into a work around. In the meantime, do you have a sense for when V22 will be available?
@jdkizer9 v22 will available by June 2022.
@jdkizer9 Since we did not receive any further query in past one month to address as part of this issue, marking as closed.
Per the OpenID Connect Core Specification ID Token Validation section, item #3 specifies:
The
aud
claim in the ID token containsd4e2960e-8201-4f41-a509-8edb791b5562
, which is not ourclient_id
. The OAuth library that we are using (AppAuth) performs ID token validation whenever an ID token is returned.Attempts to not request an ID token results in a server error during the authorization sequence.
Expected behavior would be both of the following: