-
Notifications
You must be signed in to change notification settings - Fork 160
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
Warn fhir-smart users that Binary.securityContext will not affect access control #3716
Comments
Even if we don't implement this, maybe we should introduce a config option to throw an error if someone specifies a securityContext that we don't support? |
Decision: implement as suggested above and make that the default (secure by default)
|
notes on introducing a new config parameter:
|
I confirmed that, with fhir-smart installed in userlib, creating or updating a Binary resource that has a valued Binary.securityContext element now results in an 403 with an operation outcome like
One interesting case that I hit while testing is that, due to our "skippable updates" feature where no-op updates (where incoming resource matches the existing resource) get skipped by default, I wasn't seeing the interceptor complain about the Binary.securityContext field on an update. |
Additionally, I confirmed that by setting Personally I think the message detail could be a bit better by making it clear that Binary.securityContext is the problematic element (and maybe by mentioning the value that was requested for this element). But we can improve that if/when we get to #4036 |
I tried creating a Binary resource that has a SecurityContext element which is a "logical reference" (Reference.identifier) instead of a "literal reference" (Reference.value) and, to my surprise, even with Since we don't honor the intent of this field for any reference type (logical or literal or absolute or what-have-you), I think we want to provide the warning/error behavior for any securityContext element (i.e. whenever securityContext is not null) |
Prasanna added the fix for the above comment. Looks good now. |
Is your feature request related to a problem? Please describe.
from http://hl7.org/fhir/binary.html#rest
In our default config, we use basic auth and security/permissions models must be added on top. However, in cases where the fhir-smart interceptor is used, it would be nice to support this special feature for Binary resources.
Describe the solution you'd like
Support this from our fhir-smart interceptor; probably in the
afterX
methods. If a given access token wouldn't grant access to the securityContext target, then it shouldn't give access to this Binary resource either.In my opinion,
X-Security-Context
should only be considered when the contentType is non-FHIR (see #3715), but we'll need to document our approach...especially in cases where both Binary.securityContext and the header are present.Describe alternatives you've considered
Acceptance Criteria
AND [another precondition]
WHEN [test step]
AND [test step]
THEN [verification step]
AND [verification step]
Additional context
The text was updated successfully, but these errors were encountered: