RBAC routes configuration file
RBAC configuration file allows to manage access to Kodjin endpoints. Instead of listing HTTP methods and paths, access is now configured per FHIR interaction or operation. Current configuration file provides three levels of access:
- access is allowed without token or scope
- access is allowed with active and valid token but no scope is required
- access is allowed only with proper scope and valid token
Example of the RBAC configuration file
How to read and use file:
restfulis an array of rules for RESTful interactions (CRUD, search, history, etc.).operationis an array of rules for FHIR operations and Kodjin-specific endpoints.interactionis a string with the name of the interaction or operation. Supported values are listed in the tables below. Interaction is required in each rule.modeis a string, where only two variants could be used. Mode is required in each rule.
Mode variants are:
"public"- access without token or scope"token"- access with active and valid token but no scope is required
Any interaction or operation that is not mentioned in this file requires proper scope and valid token for access.
Note
A rule applies to all endpoints covered by the interaction. For example, capabilities covers GET /metadata, and validate-code covers both GET and POST requests on CodeSystem and ValueSet, with or without resource id.
RESTful interactions
| Interaction | Description |
|---|---|
create |
Create a new resource with a server assigned id |
read |
Read the current state of the resource |
vread |
Read the state of a specific version of the resource |
update |
Update an existing resource by its id (or create it if it is new) |
patch |
Update an existing resource by posting a set of changes to it |
delete |
Delete a resource |
history-instance |
Retrieve the change history for a particular resource |
history-system |
Retrieve the change history for all resources on a system |
history-type |
Retrieve the change history for all resources of a particular type |
search |
Search a resource type or all resources based on some filter criteria |
capabilities |
GET /metadata - get a Capability Statement for the system |
transaction |
Update, create or delete a set of resources as a single transaction |
batch |
Perform a set of separate interactions in a single HTTP operation |
websocket |
Perform a websocket connection |
job |
Get job |
Operations
| Interaction | Endpoints |
|---|---|
validate |
POST /{resource_type}/$validatePOST /{resource_type}/{id}/$validate |
snapshot |
POST /StructureDefinition/$snapshotPOST /StructureDefinition/{id}/$snapshot |
everything |
GET /Patient/$everythingGET /Patient/{id}/$everything |
summary |
GET /Patient/$summaryGET /Patient/{id}/$summary |
document |
GET, POST /Composition/$documentGET /Composition/{id}/$document |
validate-code |
GET, POST /CodeSystem/$validate-codeGET, POST /CodeSystem/{id}/$validate-codeGET, POST /ValueSet/$validate-codeGET, POST /ValueSet/{id}/$validate-code |
expand |
GET, POST /ValueSet/$expandGET, POST /ValueSet/{id}/$expand |
lookup |
GET, POST /CodeSystem/$lookupGET, POST /CodeSystem/{id}/$lookup |
translate |
GET, POST /ConceptMap/$translateGET, POST /ConceptMap/{id}/$translate |
find-matches |
GET, POST /CodeSystem/$find-matchesGET, POST /CodeSystem/{id}/$find-matches |
subsumes |
GET, POST /CodeSystem/$subsumesGET, POST /CodeSystem/{id}/$subsumes |
export-read |
GET /export/{id} |
export-write |
GET, POST /$exportDELETE /export/{id}GET, POST /Group/{id}/$exportGET, POST /Patient/$export |
import-read |
GET /import/{id} |
import-write |
POST /$importDELETE /import/{id} |
graphql |
GET /$graphql |
convert-data |
Data conversion |
templates |
Templates |
versions |
GET /$versions |
subset |
POST /CapabilityStatement/$subsetPOST /CapabilityStatement/{id}/$subset |
purge |
GET, POST /Patient/{id}/$purge |
purge-read |
GET /Patient-purge/{id} |
bulk-purge |
GET, POST /Patient/$bulk-purge |
bulk-purge-read |
GET /Patient-bulk-purge/{id} |
system-stats |
GET /$system-stats |
reindex |
GET /$reindexGET /reindex/{id} |
base-url-read |
GET /fhir-base-url |
base-url-write |
POST, PUT, DELETE /fhir-base-url |
apply-fhirpath |
POST /$apply-fhirpath |
smart-style |
GET /app/smart-style-url |
Migration from the previous format
The previous format (routes with method, path/regex and mode) is replaced. Rules map as follows:
| Previous rule | New rule |
|---|---|
POST /$apply-fhirpath, token_only |
operation → apply-fhirpath, token |
GET /$versions, public |
operation → versions, public |
GET /metadata (regex), public |
restful → capabilities, public |
GET /fhir-base-url, public |
operation → base-url-read, public |
Mode token_only is renamed to token.
The previous format documentation