Skip to content

Warn fhir-smart users that Binary.securityContext will not affect access control #3716

@lmsurpre

Description

@lmsurpre

Is your feature request related to a problem? Please describe.
from http://hl7.org/fhir/binary.html#rest

Very often, the content of a Binary resource is sensitive, and the server should apply appropriate access control to the content. When the server itself generates the content, it implicitly knows what access control to apply. When the client provides the binary to the server itself, it uses the securityContext element (or the matching X-Security-Context HTTP header) to inform the server that the Binary resource should be treated as if it was the other resource. Typically, the other resource is a DocumentReference or similar resource that refers directly to the Binary resource, but that is not mandatory

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

  1. GIVEN [a precondition]
    AND [another precondition]
    WHEN [test step]
    AND [test step]
    THEN [verification step]
    AND [verification step]

Additional context

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions