Session-based access control
Name
Session-based access control
Summary
A subject is authenticated using a session identifier, i.e an opaque token, which the subject can use for multiple action requests. The subject's authenticated principal is used to assess whether the subject is authorise to perform the requested action.
Parent
Problem
Solution
Roles
- Subject (: Entity) wants to perform an action on the
System - Subject <- Opaque token-based authentication.Subject
- Authentication enforcer (: Enforcement point) ensures the session id provided by the
Subjectis verified before the requested action is processed, this entity must be incorporated into the system - Authentication enforcer <- Opaque token-based authentication.Enforcer
- Verifier (: Decision point) verifies whether the received session identifier corresponds to an open session
- Verifier <- Opaque token-based authentication.Verifier
- Session manager (: Entity) keeps track of open sessions
- Verifier <- Opaque token-based authentication.Principal provider
- Session id generator (: Cryptographic primitive) generates a new session id when requested
- Session id generator <- Opaque token-based authentication.Token generator
- Authorisation enforcer (: Enforcement point) ensures the requested action is only executed if it is allowed by the authorisation policy
- Authorisation enforcer <- Authorisation.Enforcer
- Decider (: Decision point) verifies the
Subjects access request against the authorisation policy - Decider <- Authorisation.Decider
- Policy provider (: Entity) keeps track of the applied authorisation policy
- Policy provider <- Authorisation.Policy provider
- Registrar (: Entity) allows the
Subjectto open a new session through authentication - Registrar <- Opaque token-based authentication.System
- System (: Entity) executes the received action requests
Actions
- action (: Action) that the
Subjectwants to perform - verify (: Action) whether the provided session id corresponds to an open session
- get_principal (: Action) retrieve the principal for which the session was opened, if any
- get_principal <- Opaque token-based authentication.get_principal
- authorise (: Action) whether the
Subjectis allowed to perform the actions required to perform its request - get_privileges (: Action) retrieve the set of privileges granted to the
Subjectidentified asPrincipal - open_session (: Action) open a new session for the given principal by generating a new token
- open_session <- Opaque token-based authentication.add
- next (: Action) request the next token to be generated
Data elements
- sessionId (: Data) used to match the requesting
Subjectto its principal - sessionId <- Opaque token-based authentication.token
- Tags: Secret, Untampered
- principal (: Data) identifies a
Subjectas it is known to theSystem - Tags: Identifier, Untampered
- actionId (: Data) identifies the action(s) that would be performed by the
Systemto execute theSubject's requested action - Tags: Identifier, Untampered
- objectId (: Data) identifies the object(s) the
Subjectrequires access to for performing the requestedaction - Tags: Identifier, Untampered
- privileges (: Data) overview of the privileges the
Principalhas (with respect to the required objects) - Tags: Untampered
- error (: Data) message informing the receiver some check failed or action could not be performed
- reply (: Data) from the
Systemto theSubjecttriggered by the requested action (optional) - error (: Data) message indicate a check failed or an action could not be (correctly) executed
Behaviour
- The
Subjectrequests an action from theSystemand provides atokenas proof of its claimed identity. - The
Authentication enforcerintercepts theSubject's requests and forwards thetokento theVerifierfor verification. - The
Verifierrequests theprincipalthat matches the receivedtokenfrom theSession manager. - The
Principal providerretrieves theprincipal, if any, associated with the providedtokenand replies it to theVerifier. - The
Verifiersends the result of the verification to theAuthentication Enforcer. - If the
Authentication enforcerreceives a principal as reply to the token verification it forward the action request, with the token substituted by the principal, to theAuthorisation enforcer. - The
Authorisation enforcertranslates the the requested action to the correspondingactionId(s)andobjectId(s)and forwards a request for authorisation to theDecider. - The
Deciderrequests the relevant privileges for theprincipalfrom thePolicy provider. - The
Policy providerretrieves the requested privileges and replies to theDecider. - Based on the received privileges the
Deciderdetermines whether the request is authorised or not and sends the result of this decision to theAuthorisation enforcer. - If the request was authorised the
Subject's original request is forwarded to theSystemfor execution. Otherwise theSubjectis informed that an error has occurred. - The
Systemmay reply to theSubject, for example, to provide the result of the action or to confirm the request was successfully received. This reply does not need to pass through theAuthentication enforcerorAuthorisation enforcer. (Optional)
Role considerations
Open a new session (Registrar)
Specialisation of Opaque token-based authentication.Subject registration
SessionId generation (Session id generator)
Specialisation of Opaque token-based authentication.Token generation
SessionId lifetime (Session manager)
Specialisation of Opaque token-based authentication.Token lifetime
Session manager
If any additional sensitive information is stored alongside the token and principal, additional security measures should be taken.1
SessionId change (Session manager)
Specialisation of Opaque token-based authentication.Token change
An session identifier should not be changed upon request from the Subject without the Subject (re-)authenticating via the Registrar. Depending on the system at hand, any existing session should be closed when a Subject requests to open a new one.
Session reset (Resetter)
Specialisation of Opaque token-based authentication.Token reset
A session, and corresponding id, should not be reset upon request from a Subject. If the Subject lost its session id it should request a new one by (re-)authenticating via the Registrar.
Error messages (Authentication enforcer)
Specialisation of Opaque token-based authentication.Error messages
Sensitive actions (Authentication enforcer)
Specialisation of Opaque token-based authentication.Sensitive actions
Authorise after authentication (Verifier)
Specialisation of Authorisation.Authorise after authentication
In this pattern the Subject is first authenticated based on the session id it provides. Only actions requests corresponding to open sessions should be forwarded for further authorisation.
Resource usage (Enforcer, Verifier, Session provider, Decider, Policy provider)
Specialisation of Opaque token-based authentication.Resource usage
Specialisation of Authorisation.Resource absorption
Policy provider
Specialisation of Authorisation.Policy provider
Data considerations
SessionId selection
Specialisation of Opaque token-based authentication.Selection of credential and evidence
sessionId
Specialisation of Opaque token-based authentication.token
principal
Specialisation of Opaque token-based authentication.principal
Token scope
Specialisation of Opaque token-based authentication.Token scope
privileges
Specialisation of Authorisation.privileges
ObjectId
Specialisation of Authorisation.ObjectId
actionId
Specialisation of Authorisation.actionId
Implementations
None
Xet Storage Details
- Size:
- 13 kB
- Xet hash:
- 510c501c1521cb2b4c362dc4679e24be00b61ce67ea4597a33bea52882b9a92b
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.