Skip to main content

authnz

Abstract

Authorization and authentication design

Concepts

Naming based on AuthNZ: Existing concepts

  • Subject. Entity that can make a request - User/Device/Service
  • Login. Represents a subject which can log in (synonym: sign in), user/device
  • Profile. Linked to login, personal data and other application specific information
  • Principal (Принципал). Unique key which can be used in ACL (список управления доступом)
    • Login | Group | Role
  • Role (Роль). Schema-level principal (predefined group, предопределенная группа)
    • Allows to create predefined ACLs (предопределенные списки управления доступом)
    • Examples
      • unTill: Waiter, Waiter+, Manager
      • PK: Executor, Executor+, Manager
  • Group (Группа). Workspace-level principal
  • PrincipalToken (То́кен Принципала) - token which authenticated principals (токен который удостоверяет подлинность принципалов)
    • Login + Role/Group memberships
  • ACL. Acces Control List (список управления доступом)
    • Currently we use predefined ACLs only (предопределенные списки управления доступом)
      • ACL managements too complicated
    • Users can only manage groups and roles membership
    • Permissions for Hosts can be manages by
      • GRANT ROLE ChargeBee TO ADDRESS

ACL Rules

  • “Principal P from Workspace W is [Allowed/Denied] Operation O on Resources matching ResourcePattern RP”.
    • Principal
    • Policy (Allow/Deny)
    • Operation
    • ResourcePattern
    • MembershipInheritance (00, 10, 11, 01)
    • Ref. comments here

Query AuthNZ process

StepActorServed by
Send a request to the QueryProcessorSubject
Authenticate PrincipalQueryProcessorIAuthenticator.Authenticate()
Authorize EXECUTE operationQueryProcessorIAuthorizer.Authorize()
Opt: Authorize READ operationQueryProcessorIAuthorizer.Authorize()

Command AuthNZ process

StepActorServed by
Send a request to the CommandProcessorSubject
Authenticate PrincipalCommandProcessorIAuthenticator.Authenticate()
Authorize EXECUTE operationCommandProcessorIAuthorizer.Authorize()
Authorize fields CREATE/UPDATECommandProcessorIAuthenticator.Authorize()

Detailed design

Components

Context