How to enable labels-based access control
This guide explains how security label access control can be enabled
Prerequisites
Docker and Docker Compose
You should have Docker and Docker Compose installed before going further. To get it installed, follow the instructions.
Start Aidbox locally
1. Create a directory
2. Run Aidbox on Docker
3. Access Aidbox
Open in browser http://localhost:8080/
4. Activate your Aidbox instance
Using AidboxID AidboxID is a unique identifier within the Aidbox ecosystem used for product activation
Using Aidbox license Aidbox license can be issued on the Aidbox user portal. More about Aidbox licenses here.
Enable security labels access control
To enable LBAC, use Aidbox UI -> Settings -> Enable LBAC. You don't have to restart the instance if you use Aidbox UI. Also, you can update environment variables
Superadmin Role with Label-based Access Control
As mentioned earlier, resources without security labels cannot be accessed. This can affect the functionality of the Aidbox UI console, making resources like User, Client, Access Policy, etc., inaccessible until they are labeled.
To avoid the need to label all resources displayed in the UI console, use the superadmin
Role.
Create a Role
resource with the name superadmin
and reference to the User used to log in to the UI console before enabling Label-based Access Control.
Ensure the security labels access control works
Create TokenIntrospector
To make Aidbox trust JWT
issued by external server token introspection is used, run the following request in the REST Console.
Create AccessPolicy
This access policy allows FhirRead
and FhirSearch
operations for requesters having JWT with iss
claim value https://auth.example.com
.
To create the access policy, run the following request in the REST Console.
Populate data samples
Create Patient resource
To create the Patient, run the following request in the REST Console.
Create Encounter resource
To create the Encounter, run the following request in the REST Console.
Create Observation resource
To create the Observation, run the following request in the REST Console.
JWT for requests
There are two users and two JWTs that we will use:
Check resource-level access control works
Provider's access to the Patient
Provider has access to the Patient because there is overlap between the Patient labels and the Provider labels.
Patient is labeled with:
Provider is allowed:
http://terminology.hl7.org/CodeSystem/v3-ActCode|PSY
http://terminology.hl7.org/CodeSystem/v3-ActCode|CTCOMPT
Provider's access to the Encounter
Provider has access to the Encounter because there is overlap between the Encounter labels and the Provider labels.
Encounter is labeled with:
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|L
Provider is allowed:
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|R
expands to:http://terminology.hl7.org/CodeSystem/v3-Confidentiality|R
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|N
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|L
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|U
http://terminology.hl7.org/CodeSystem/v3-ActCode|PSY
http://terminology.hl7.org/CodeSystem/v3-ActCode|CTCOMPT
Provider's access to the Observation
Provider has access to the Observation because there is overlap between the Observation labels and the Provider labels.
Observation is labeled with:
http://terminology.hl7.org/CodeSystem/v3-ActCode|PSY
Provider is allowed:
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|R
expands to:http://terminology.hl7.org/CodeSystem/v3-Confidentiality|R
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|N
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|L
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|U
http://terminology.hl7.org/CodeSystem/v3-ActCode|PSY
http://terminology.hl7.org/CodeSystem/v3-ActCode|CTCOMPT
Finance's access to the Patient
Finance has access to the Patient because there is overlap between the Patient labels and the Finance labels.
Patient is labeled with:
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
Finance is allowed:
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
expands to:http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|L
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|U
http://terminology.hl7.org/CodeSystem/v3-ActCode|RESCOMPT
Finance's access to the Encounter
Finance has access to the Encounter because there is overlap between the Encounter labels and the Finance labels.
Encounter is labeled with:
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|L
Finance is allowed:
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
expands to:http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|L
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|U
http://terminology.hl7.org/CodeSystem/v3-ActCode|RESCOMPT
Finance does not have access to the Observation because there is no overlap between the Observation labels and the Finance labels.
Observation is labeled with:
http://terminology.hl7.org/CodeSystem/v3-ActCode|PSY
Finance is only allowed:
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
http://terminology.hl7.org/CodeSystem/v3-ActCode|RESCOMPT
Check resource-element access control works
Provider
Provider has access to all the fields within the Encounter resource.
Encounter.subject
is labeled:
http://terminology.hl7.org/CodeSystem/v3-ActCode|CTCOMPT
Provider is allowed:
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|R
expands to:http://terminology.hl7.org/CodeSystem/v3-Confidentiality|R
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|N
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|L
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|U
http://terminology.hl7.org/CodeSystem/v3-ActCode|PSY
http://terminology.hl7.org/CodeSystem/v3-ActCode|CTCOMPT
Finance
Finance has access to all the fields within the Encounter resource but to the subject.
Encounter.subject
is labeled:
http://terminology.hl7.org/CodeSystem/v3-ActCode|CTCOMPT
Finance is allowed:
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
expands to:http://terminology.hl7.org/CodeSystem/v3-Confidentiality|M
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|L
http://terminology.hl7.org/CodeSystem/v3-Confidentiality|U
http://terminology.hl7.org/CodeSystem/v3-ActCode|RESCOMPT
Last updated
Was this helpful?