Altinn Platform - Authorization
The authorization component provides functionality to authorize access to applications and components in Altinn Apps and Altinn Platform.
The authorization components are based on attribute based access control (ABAC).
In short, a request is authorized based on attributes for the request. Eg what data element is the user accessing, who owns it, what type of data element, and so on.
The authorization architecture for the Altinn Platform is based on the XACML reference architecture.
The following diagram describes the different solution components that provide Authorization capabilities.
This architecture defines the following components.
PDP - Policy Decision Point
Responsible to decide if a request is authorized or not. Read more
PAP - Policy Administration Point
Responsible for defining and administration authorization policies. Read more
PRP - Policy Retrieval Point
Responsible for identifying the correct policy for a request. Read more
Responsible for enriching the decision request so it can correctly be evaluated. Read more
PIP - Policy information point
Responsible for providing information about the subject and the resource to the context handler. Read more
PEP - Policy Enforcement Point
Responsible for enforcing the decision from PDP. This is the component that blocks a request or let it through.
For details about how the components are constructed go here.
The Overall Authorization flow
The sequence diagram below shows how a request is authorized
The following example flow describes in detail the authorization process when the REACT frontend calls an API to store form data
- User trigger save in the REACT application. REACT application makes an HTTP post request against the ServiceAPIController in
- The configured Policy Enforcement Point for the API, the Service Access Handler,
triggers to verify that user is authorized
- The PEP identifies the authenticated user from authorizationhandler context and find the relevant resource ID from request
- The PEP calls the PDP functionality in Authorization Component in Altinn Platform
- PDP calls context handler to enrich the decision request
- Context handler calls Storage PIP to get resource information
- Context handler calls authorization PIP to get roles user have for resource party
- Context handler enriches the decision request and returns to PDP
- PDP calls PRP to get the policy for the resource
- PDP evaluates the decision request and returns a decision response
- If the result was Permit, the PEP validates the obligation from PDP to see if the authentication level was high enough. If it is enough the request is let through
- If the authentication level is not high enough the PEP will throw a not authorized exception (403)
- If the result was “Not Applicable” the PEP will throw a not authorized exception (403)
The Authorization component exposes a REST-API to Altinn Apps. Use the authorization API to manage authorizations in altinn platform.
A party is a person whom you can represent and perform a request on his behalf. A logged in user can retrieve a list of parties that he/she can represent.
Get a list of parties that the user can represent. The userid is sent as parameter.
Validate that a given user is allowed to represent a given party. The partyid and userid are sent as parameters.
A role in altinn offers or denies right to the logged in user to perform an action or group of actions for him or on behalf of someone.
Get a list of roles that the user can perform for the selected party.
A set of polices contains authorization rules.
Stores / updates rules for a given app, defined in the query string. The rules are sent in the body of the request. Reade more about the policy format.
The responsibility to the Context Handler is to enrich a decision request sent from a PEP so it can be evaluated by PDP.
Policy Administration Point
The Policy Administration Point is responsible for creating and modifying the different authorization policies used by the PDP
Policy Decision Point
The Policy Decision Point is responsible to evaluate if users and systems is authorized to perform the requested operation on a resource.
Policy Enforcement Point
In Altinn Platform there are PEP's that enforce access to different types of API
Policy Information Point
The Policy Information Point(s) are responsible for providing needed information to the context handler so it can enrich the context request.
Policy Retrieval Point
The Policy Retrieval Point is the functionality where Policy Decision Point (PDP) can retrieve the policy defined for an app resource.
XACML - Altinn Studio
XACML stands for "eXtensible Access Control Markup Language".