-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SMART interceptor should enforce scope permissions up front #2669
Comments
search In addition to checking the scopes for each resource on the way out (via the afterX methods), we now check that the requested interaction is permitted by the passed scopes on the way in (the beforeX methods). Two reasons: 1. We prevent some unnecessary work for invalid requests 2. We prevent leaking info about the presence/absence of resourceTypes for which a given application has not been granted access The request scopes are already checked before create, update, and delete. Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
…d search (#2671) Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
One of the questions I had while implementing this is whether it should apply only to patient compartment resources (e.g. Condition, Observation) or whether it should also apply to non-compartment resources like Practitioner and Organization. It wasn't super clear to me whether the existing Therefore, to invoke read/vread/search/history against ANY resource type's endpoint, it is now definitively required to include the corresponding resourceType (or |
Walked thru the test of this one with Lee using his Alvearie demo environment. Confirmed appropriate behaviors with and without limited scope when attempting to access (read/search) non-Patient compartment resources. |
Describe the bug
Because SMART scopes are only enforced on resources on their way out of the FHIR server, it is possible for an application with a valid access token to obtain information about the presence (or absence) of resource types for which they have not been granted read access.
Environment
Which version of IBM FHIR Server?
To Reproduce
Steps to reproduce the behavior:
Not that a search that returns the AllergyIntolerance comes back with a 403 whereas the other comes back with a 200 (with no results).
Expected behavior
A client app without read permission for a given resource type should not be able to infer whether or not any such resources exist.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: