Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added support for extension_fhirUser claim for SMART auth #3564

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

namalu
Copy link
Member

@namalu namalu commented Oct 18, 2023

Description

This PR adds support for extension_fhirUser token claim which can be used with Azure B2C to map FHIR user resources with B2C user accounts. This PR also removes support for sending FHIR user data in a request header.

Milestone S126

Testing

Manual testing was performed to ensure these changes work with Azure B2C.
Unit tests have been updated to ensure code quality and guard against regression.

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)

@namalu namalu requested a review from a team as a code owner October 18, 2023 18:49
@namalu namalu added Enhancement Enhancement on existing functionality. Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs labels Oct 18, 2023
@namalu namalu added this to the S126 milestone Oct 18, 2023
{
fhirUser = hValue.ToString();
}
// The "fhirUser" claim is not present, check if the "extension_fhirUser" claim is present.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did discuss that if both the extension_fhirUser and fhirUser claim were both present and did not agree that we should throw an exception.

It does seem clean here that we simply prefer fhirUser, and only check extension_fhirUser if necessary. I am open to leaving it as is, or adding the exception logic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm inclined to leave this as is. Because the claims are generated and signed by the issuer, I don't think having a preference for one claim over another raises a security concern. Also, other than significant human error, I would imagine that if both claims did exist they would likely point to the same FHIR resource.

@namalu namalu merged commit 31d4d65 into main Oct 24, 2023
@namalu namalu deleted the personal/namalu/support-extension-fhir-user-claim branch October 24, 2023 16:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Azure Healthcare APIs Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs Enhancement Enhancement on existing functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants