Upon client initiation of a OIDC Authorization Code Flow for a citizen user, federation is performed as shown below. Citizen access to the eHealth Infrastructure goes through NemLogin.
SAML Attributes for Citizen Users
NemLogin provides a set of SAML attributes in a SAML assertion which is used to identify the citizen. Other attributes are also part of the SAML attribute; they are however not currently used. The table below lists the current attributes that are delivered by NemLogin:
Attribute | Description |
---|---|
| Civil registration number (CPR) |
| Level of assurance (must be Substantial) |
| First name |
| Last name |
Citizens accessing the eHealth Infrastructure is handled a bit differently from other users accessing the platform. As citizens do not carry a context of roles and rules, it is limited to the citizen itself and scoped by the provided SAML attributes. This means that the citizen is not able to switch context and that the citizen can only access data being scoped to him/herself. The scope of access is determined by setting the citizen in context of him/herself and not allowing context switches.
Note on Citizen access tokens
In order for a citizen to gain access to its patient data the citizen needs to be created using the https://docs.ehealth.sundhed.dk/latest/ig/OperationDefinition-ehealth-patient-create.html. Failing to have done so will grant the citizen access to the platform but not its data. This will be reflected in the access token as the user_id
will be a UUID instead of a FHIR Patient
resource reference. This design ensures that federated NemLogin can be verified without blocking the citizen from accessing the platform.