You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to get an overview of common authorization scenarios and mechanisms that exist today and will be implemented into the platform. Here are some movements happening where there are questions related to authorization.
Access control: roles, system user delegations (what actions the system user owner approves that the system can do on behalf of the system user owner)
A system user is a special Maskinporten client (in principle) using Rich Authorization Request (RAR) protocol to enrich Maskinporten tokens with Altinn system user details (systemuser_id, system_id)
App (WIP)
Authorized as: app within an org
Access control: XACML rule either manually written or injected (TBD)
Used by the app to perform certain actions independently of the current client/user
Use supplier/system enrollment flow to register a system user (which includes delegations)
Supplier authenticates with a Maskinporten client including RAR grant
Resulting Maskinporten token can be used directly without exchange
Q:
Does it really not need to be exchanged?
JWT token
{
"authorization_details": [
{
"type": "urn:altinn:systemuser",
"systemuser_id": ["ID of system user"],
"systemuser_org": {
"authority": "iso6523-actorid-upis",
"ID": "0192:Org no of the org owning the system user"
},
"system_id": "ID of the system in the system register"
}
]
}
More details
An Altinn system user concept consists of the following entities
System user (systembruker)
System (system)
Supplier (leverandør) - the organization providing some automated Altinn-related service
Customer (kunde) - the organization using the service provided by the supplier
Maskinporten client - Maskinporten provides org-level identities meant for integrating across orgs
The customer owns the system user, and the permissions/delegations are owned by the system user.
The supplier owns the system, and the system owns the Maskinporten client.
The system owner concept/feature in Altinn 3 allows a system to impersonate a system user,
thereby enabling the system to perform operations in Altinn 3 as if it was the system user.
So the system "inherits" all delegations and roles assigned to the system user and can utilize these
by authenticating with Maskinporten using the system user RAR grant.
A key differentiator from the "org token" mechanism is that the system user can have roles similarly to a regular user.
A system user can be viewed as a virtual user owned by some customer/client organization.
App flow
TBD
Outbound authn/authz
Storage - user token + APIM subscription key
User token comes from IUserTokenProvider which in reality is either the AltinnStudioRuntime cookie or the auth header, so it needs the HTTP Context directly
APIM subscription key is used to disallow anything but GET depending on the subscription (to allow mutating operators only from apps running in app clusters)
Consists of ApplicationClient, InstanceClient, InstanceEventClient, ProcessClient, SignClient, TextClient, DataClient
Notifications - PlatformAccessToken
Altinn2MetadataApiClient - none
NetsClient - API key from configuration
Events - user token + PlatformAccessToken + APIM subscription key
Description
We need to get an overview of common authorization scenarios and mechanisms that exist today and will be implemented into the platform. Here are some movements happening where there are questions related to authorization.
In scope
Analysis
Mechanisms for authorization
These methods are supported through Altinn Authentication and Authorization through PEP and PDP.
[ORG]
)urn:altinn:org
claim in the resulting Altinn tokensystemuser_id
,system_id
)User flow
Log into tt02 manually, then navigate to an app
altinnContext
cookie is set (this is still A2 I think)altinnContext
andaltinnReportee
cookies are set (this is still A2 I think)platform.tt02.altinn.no/authentication/api/v1/authentication
then back againAltinnStudioRuntime
is set by Authn API, it is a JWT, see below/profile/user
,/parties
, /authorization/parties/current)PUT /parties/{partyId}
,AltinnPartyId
cookie is setJWT token claims:
Q:
partyid
claim in the auth cookie can differ fromaltinnReportee
andAltinnPartyId
, how does this stay consistent?Self identified users
Org flow
JWT token claims
System user flow
More details to come, but
Q:
JWT token
More details
An Altinn system user concept consists of the following entities
The customer owns the system user, and the permissions/delegations are owned by the system user.
The supplier owns the system, and the system owns the Maskinporten client.
The system owner concept/feature in Altinn 3 allows a system to impersonate a system user,
thereby enabling the system to perform operations in Altinn 3 as if it was the system user.
So the system "inherits" all delegations and roles assigned to the system user and can utilize these
by authenticating with Maskinporten using the system user RAR grant.
A key differentiator from the "org token" mechanism is that the system user can have roles similarly to a regular user.
A system user can be viewed as a virtual user owned by some customer/client organization.
App flow
TBD
Outbound authn/authz
IUserTokenProvider
which in reality is either theAltinnStudioRuntime
cookie or the auth header, so it needs the HTTP Context directlyGET
depending on the subscription (to allow mutating operators only from apps running in app clusters)ApplicationClient
,InstanceClient
,InstanceEventClient
,ProcessClient
,SignClient
,TextClient
,DataClient
PlatformAccessToken
PlatformAccessToken
+ APIM subscription keyIEventsSecretCodeProvider
)PlatformAccessToken
+ APIM subscription keyPlatformAccessToken
+ APIM subscription keyConclusion
Work that needs to be done
IClientContext
, that allows us to represent the authenticated state/contextIAuthenticationContext
abstraction #880IClientContext
where possible - which encapsulates the authenticated stateJwtTokenUtil
IUserTokenProvider
.User
(match case, whole word)ClaimsPrincipalExtensions
UserHelper
ClaimsPrincipal
TelemetryEnrichingMiddleware
DecisionHelper
PlatformUser
(part ofInstanceEvent
) that considers system usersGenerateProcessChangeEvent
,InstanceEventExtensions
The text was updated successfully, but these errors were encountered: