Skip to content

Commit 0c0caf9

Browse files
committed
updated role config docs
1 parent f3da2f8 commit 0c0caf9

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

docs/src/operations/v2.0.0-RC2/fhir/access-control.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ icon: config
55

66
## Overview
77

8-
The DSF FHIR server implements a subset of the FHIR R4 [REST API](http://hl7.org/fhir/R4/http.html). When accessing the API with a web browser a limited graphical user interface is shown. Without any additional configuration the API and user interface is only accessible with the X.509 client certificate configured for the organization via the configuration parameter: [DEV_DSF_FHIR_SERVER_ORGANIZATION_THUMBPRINT](configuration#dev-dsf-fhir-server-organization-thumbprint)
8+
The DSF FHIR server implements a subset of the FHIR R4 [REST API](http://hl7.org/fhir/R4/http.html). When accessing the API with a web browser a limited graphical user interface is shown. Without any additional configuration the API and user interface is only accessible with the X.509 client certificate configured for the organization via the client certificate configuration parameter [DEV_DSF_FHIR_CLIENT_CERTIFICATE](configuration##dev-dsf-fhir-client-certificate) or the manual override option [DEV_DSF_FHIR_SERVER_ORGANIZATION_THUMBPRINT](configuration#dev-dsf-fhir-server-organization-thumbprint).
99

1010
::: tip OpenID Connect
1111
To enable OpenID Connect authentication of local user, see the DSF FHIR server OpenID Connect [configuration page](oidc).
1212
:::
1313

1414
Access to the API and user interface can be enabled for additional client certificates and local users authenticating via OAuth 2.0 OpenID Connect. Access can be configured for so called roles, with all roles specified using the configuration parameter [DEV_DSF_FHIR_SERVER_ROLECONFIG](configuration#dev-dsf-fhir-server-roleconfig). The value for this environment variable is specified as YAML using the block scalar `|`.
1515

16-
The listing below shows a minimal configuration to enable read access for a specific client-certificate:
16+
The listing below shows a minimal configuration to enable read access for all resources for a specific client-certificate:
1717

1818
```yaml
1919
DEV_DSF_FHIR_SERVER_ROLECONFIG: |
@@ -24,7 +24,20 @@ The listing below shows a minimal configuration to enable read access for a spec
2424
- SEARCH
2525
- HISTORY
2626
```
27-
The list of user roles above contains a single rule-entry `example_read_only_role`, matching the user via a client certificate SHA-512 thumbprint and assigning three DSF roles. Any string can be used as the name for the rule-enty.
27+
28+
The list of user roles above contains a single rule-entry `example_read_only_role`, matching the user via a client certificate SHA-512 thumbprint and assigning three DSF roles. Any string can be used as the name for the rule-entry.
29+
30+
With DSF 2, you can now restrict the granted priviledges to specific resource types. If you want to restrict the rule-entry `example_read_only_role` to Organization resources, you can specify the resource type per dsf-role ("action"):
31+
32+
```yaml
33+
DEV_DSF_FHIR_SERVER_ROLECONFIG: |
34+
- example_read_only_organization_role:
35+
thumbprint: 00474993fa261b0225f93c5a66aa6fcc... [a-f0-9]{128}
36+
dsf-role:
37+
- READ: [Organization]
38+
- SEARCH: [Organization]
39+
- HISTORY: [Organization]
40+
```
2841

2942
::: tip Certificate Thumbprints
3043
SHA-512 certificate thumbprints in HEX form `[a-f0-9]{128}` can be calculated using:
@@ -62,14 +75,15 @@ DSF roles specified via the `dsf-role` property define general access to the RES
6275

6376
`CREATE`, `READ`, `UPDATE`, `DELETE`, `SEARCH`, `HISTORY`, `PERMANENT_DELETE` and `WEBSOCKET`.
6477

78+
6579
#### practitioner-role
6680

6781
In order to allow users to start processes, the property `practitioner-role` can be used to assign codes from FHIR [CodeSystem](http://hl7.org/fhir/R4/codesystem.html) resources. Codes are specified in the form `system-url|code`.
6882
If the uses has a code specified here that match with a `requester` extension within the process plugin's [ActivityDefinition](http://hl7.org/fhir/R4/activitydefinition.html) resource, the user can start the process if he also has the `dsf-role` `CREATE`.
6983

7084
Process plugins can defined and use there own code-systems. However, the DSF specifies a standard set of practitioner roles within the CodeSystem `http://dsf.dev/fhir/CodeSystem/practitioner-role`:
7185

72-
`UAC_USER`, `COS_USER`, `CRR_USER`, `DIC_USER`, `DMS_USER`, `DTS_USER`, `HRP_USER`, `TTP_USER`, `AMS_USER` and `DSF_ADMIN`.
86+
`UAC_USER`, `COS_USER`, `CRR_USER`, `DIC_USER`, `DMS_USER`, `DTS_USER`, `HRP_USER`, `TTP_USER`, `AMS_USER`, `ASP_USER`, `SPR_USER`, `TSP_USER`, `PPH_USER`, `BIO_USER`, and `DSF_ADMIN`.
7387

7488

7589
## Examples
@@ -114,7 +128,7 @@ The second example defines a group of DSF administrators by specifying an `admin
114128
```
115129

116130

117-
The third example allows read-only access. Two e-mail addresses are used to match this role. E-mail addresses from X.509 client certificates and OAuth 2.0 access tokens are matched:
131+
The third example allows read-only access, restricted to QuestionnaireResponse resources only. Two e-mail addresses are used to match this role. E-mail addresses from X.509 client certificates and OAuth 2.0 access tokens are matched:
118132

119133
```yaml
120134
DEV_DSF_FHIR_SERVER_ROLECONFIG: |
@@ -123,7 +137,8 @@ The third example allows read-only access. Two e-mail addresses are used to matc
123137
- first.user@test.org
124138
- second.user@test.org
125139
dsf-role:
126-
- READ
127-
- SEARCH
128-
- HISTORY
140+
- READ: [QuestionnaireResponse]
141+
- UPDATE: [QuestionnaireResponse]
142+
- SEARCH: [QuestionnaireResponse]
143+
- HISTORY: [QuestionnaireResponse]
129144
```

0 commit comments

Comments
 (0)