Skip to content

Add per-resource authority checks to typed CRUD and batch providers#2603

Merged
johngrimes merged 1 commit intomainfrom
typed-provider-permissions
May 9, 2026
Merged

Add per-resource authority checks to typed CRUD and batch providers#2603
johngrimes merged 1 commit intomainfrom
typed-provider-permissions

Conversation

@johngrimes
Copy link
Copy Markdown
Member

Typed FHIR resource providers (Search, Read, Create, Update, Delete) and the Batch provider previously only enforced operation-level authorities (e.g. pathling:search, pathling:update) but did not check per-resource read/write authority. This allowed a caller with a coarse-grained token to access any resource type.

Adds explicit SecurityAspect.checkHasAuthority() calls gated by auth.enabled to each provider method, and injects ServerConfiguration into the providers and their factories that lacked it.

Includes focused auth unit tests for all six providers.

Typed FHIR resource providers (Search, Read, Create, Update, Delete) and
the Batch provider previously only enforced operation-level authorities
(e.g. pathling:search, pathling:update) but did not check per-resource
read/write authority. This allowed a caller with a coarse-grained token
to access any resource type.

Adds explicit SecurityAspect.checkHasAuthority() calls gated by
auth.enabled to each provider method, and injects ServerConfiguration
into the providers and their factories that lacked it.

Includes focused auth unit tests for all six providers.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@johngrimes johngrimes marked this pull request as ready for review May 7, 2026 11:59
@johngrimes johngrimes added bug Something isn't working server Issues relating to Pathling server. security Pull requests that address a security vulnerability and removed bug Something isn't working labels May 7, 2026
@johngrimes johngrimes mentioned this pull request May 8, 2026
@johngrimes johngrimes self-assigned this May 8, 2026
@johngrimes johngrimes merged commit a107409 into main May 9, 2026
5 checks passed
@johngrimes johngrimes deleted the typed-provider-permissions branch May 9, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Pull requests that address a security vulnerability server Issues relating to Pathling server.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant