Buckets:

|
download
raw
13 kB

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 Subject is 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 Subject to open a new session through authentication
  • Registrar <- Opaque token-based authentication.System
  • System (: Entity) executes the received action requests

Actions

  • action (: Action) that the Subject wants 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 Subject is allowed to perform the actions required to perform its request
  • get_privileges (: Action) retrieve the set of privileges granted to the Subject identified as Principal
  • 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 Subject to its principal
  • sessionId <- Opaque token-based authentication.token
  • Tags: Secret, Untampered
  • principal (: Data) identifies a Subject as it is known to the System
  • Tags: Identifier, Untampered
  • actionId (: Data) identifies the action(s) that would be performed by the System to execute the Subject's requested action
  • Tags: Identifier, Untampered
  • objectId (: Data) identifies the object(s) the Subject requires access to for performing the requested action
  • Tags: Identifier, Untampered
  • privileges (: Data) overview of the privileges the Principal has (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 System to the Subject triggered by the requested action (optional)
  • error (: Data) message indicate a check failed or an action could not be (correctly) executed

Behaviour

  1. The Subject requests an action from the System and provides a token as proof of its claimed identity.
  2. The Authentication enforcer intercepts the Subject's requests and forwards the token to the Verifier for verification.
  3. The Verifier requests the principal that matches the received token from the Session manager.
  4. The Principal provider retrieves the principal, if any, associated with the provided token and replies it to the Verifier.
  5. The Verifier sends the result of the verification to the Authentication Enforcer.
  6. If the Authentication enforcer receives a principal as reply to the token verification it forward the action request, with the token substituted by the principal, to the Authorisation enforcer.
  7. The Authorisation enforcer translates the the requested action to the corresponding actionId(s) and objectId(s) and forwards a request for authorisation to the Decider.
  8. The Decider requests the relevant privileges for the principal from the Policy provider.
  9. The Policy provider retrieves the requested privileges and replies to the Decider.
  10. Based on the received privileges the Decider determines whether the request is authorised or not and sends the result of this decision to the Authorisation enforcer.
  11. If the request was authorised the Subject's original request is forwarded to the System for execution. Otherwise the Subject is informed that an error has occurred.
  12. The System may reply to the Subject, 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 the Authentication enforcer or Authorisation 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.