tewhatuora / api-standards

Health New Zealand | Te Whatu Ora API Development and Security Standards
https://apistandards.digital.health.nz
Other
9 stars 1 forks source link

[NEW STANDARD] - _include and _revinclude scopes #155

Closed ChrisSquats closed 5 months ago

ChrisSquats commented 5 months ago

Summary

When searching or retrieving resources, if _include/_revinclude query modifiers are included, the authorisation should extend to the other resources.

For example, GET Immunization/{id}?_include=patient, should include authorisation scopes of :

  1. system/Immunization.r
  2. system/Patient.r

Drawbacks

Potential complexity in scope and token requests.

Which area of the standards does this apply to?

ChrisSquats commented 5 months ago

@swithinfoote / @daniel-thomson / @charllanghout01 - do you have any opinion on whether this should be a MUST or SHOULD requirement?

charllanghout01 commented 5 months ago

From a security point of view, I recommend making this requirement a "MUST" for the following reasons:

Given the potential complexity, if there is significant resistance or practical difficulties, it might be worth revisiting this decision to explore ways to mitigate the drawbacks while maintaining the necessary security standards.

ChrisSquats commented 5 months ago

Thanks @charllanghout01, agree. I've also had a conversation with @kyle-mwnz @daniel-thomson who also agree.

I'll raise a change for a MUST requirement.

kyle-mwnz commented 5 months ago

This is defined a MUST by FHIR https://build.fhir.org/security.html#6.1.0.5.1