Skip to main content

Authorisation

The Authorisation component is an essential part Factory+, as it ensures that access to resources is controlled and restricted based on the permissions assigned to various principals or actors in the architecture. Access Control Lists (ACLs) are used to manage these permissions and provide a flexible way to define and manage access control policies.

Open Source Example

ACS Authorisation Component

See how the AMRC have implemented this component in the AMRC Connectivity Stack
View on Github

Overview

Identity
Authorisation
Identity
Authorisation
Directory
Configuration Store
Manager
Commands
Data Warehouse
MQTT
Edge Agent

The Factory+ Authorisation component can be broken down into the following elements:

  • Principals: Principals are the entities (users, services, or applications) that interact with the architecture and request access to its resources. Each principal is identified using a unique ID, referred to as a UUID (Universally Unique Identifier) that conforms to RFC4122. The Identity component is responsible for managing the principals.
  • Access Control Lists (ACLs): ACLs are data structures that specify the access permissions for resources in the architecture. Each entry in an ACL defines a particular action that a principal is allowed or denied to perform on a specific resource. ACLs use UUIDs to reference both the principals and the resources.
  • Resource Management: The resources in the architecture are managed by different components, and each component is responsible for defining its own ACLs. This allows for a decentralised approach to access control, where each component can define its own rules based on its unique requirements.
  • Access Control Enforcement: When a principal attempts to access a resource, the Authorisation component checks the corresponding ACLs to determine if the action is allowed. If the principal's UUID is found in the ACL with the appropriate permissions, access is granted; otherwise, access is denied.

Linking Identity

The Authorisation component in Factory+ plays a crucial role in managing the relationship between internal Principal UUIDs and Identities. The Authorisation component maintains a mapping table that links each Principal UUID to its corresponding Kerberos principal, ensuring that access control requests from authenticated entities can be resolved. With the Principal UUID and the associated ACL information, the Authorisation component can evaluate the user's permissions on the requested resources, ensuring that only authorised actions are allowed.

Access Control Entries (ACEs)

An Access Control Entry (ACE) is a fundamental building block of the Factory+ Authorisation component. It defines the relationship between three key elements: a principal, a permission, and a target:

  • Principal UUID: The principal is an entity (user, service, or application) that requests access to a resource. It is represented by a UUID, which uniquely identifies the principal within the architecture.
  • Permission UUID: The permission specifies the type of action that the principal is allowed to perform on the target resource. It is also represented by a UUID, which helps to maintain a consistent and standardised set of permissions across the architecture.
  • Target UUID: The target is the resource that the principal is trying to access. It is represented by a UUID to ensure that each resource in the architecture can be uniquely identified and referenced.

The semantics of an ACE can be summarised as:

"This Principal UUID has this Permission UUID on this Target UUID."

The access control component checks the ACEs in the ACL to determine if a principal is authorised to perform a particular action on a target resource. If a matching ACE is found in the ACL, the principal is granted access; otherwise, access is denied.

Deny-by-default

In Factory+, the Authorisation component uses allow-only ACEs and follows a deny-by-default permission model. This approach ensures that access to resources is denied unless explicitly granted by an ACE, providing a higher level of security.

The Permission and Target UUIDs in the ACEs are interpreted and enforced by the individual services that make use of the access control system. Each service defines the semantics of these UUIDs based on its own requirements and resource management policies.

Wildcard UUID

The null UUID (00000000-0000-0000-0000-000000000000) is conventionally used as a wildcard target, with two possible interpretations:

  1. This permission on all targets: When the null UUID is used as the target in an ACE, it signifies that the specified permission applies to all resources managed by the service. This allows the principal to perform the specified action on any target within the service's domain.
  2. This permission needs no target: In some cases, a permission may not require a specific target to be associated with it. When the null UUID is used as the target, it signifies that the permission itself is sufficient to grant the principal access to the service, without needing to specify any particular resource.

Permission Groups

In Factory+, the use of groups in access control management is a practical way to reduce duplication and simplify the maintenance of ACLs. Groups can be utilised for any of the three UUIDs (Principal, Permission, or Target), allowing for more efficient access control policies. The Authorisation component is responsible for managing groups, as they must be defined and available before other services can be successfully contacted.

Groups can contain other groups, allowing for a hierarchical structure that simplifies access control management. Nested groups are expanded recursively, meaning that all members of a group (including those in nested groups) are considered when evaluating access control policies.

HTTP Interface

Authentication

All requests must supply HTTP authentication; the following mechanisms are supported:

MechanismAuthentication info required
NegotiateA Kerberos GSSAPI token.
BasicUsername and password for a password-based Kerberos principal.
BearerA token from the /token endpoint.

Specification

Loading OpenAPI Specification...
From: /spec/authorisation.yaml

Well-Known UUIDs

These well-known UUIDs are part of the core framework and all MUST to be registered with the Configuration Store component under the appropriate classes.

Identity

Service Function
Authorisation
cab2642a-f7d9-42e5-8845-8f35affe1fd4
The server identity of the Authorisation Component that provides the service

Service Account
Authorisation
1e1989ab-14e4-42bd-8171-495230acc406
The client identity of the Authorisation Component used to communicate with other services

Permission Groups

Permission Group
Authorisation Permissions
50b727d4-3faa-40dc-b347-01c99a226c58
Permissions needed by the Authorisation Component

This group must be set up to contain all the permissions UUIDs below.


Permissions

Permission
Read ACL Entry
ba566181-0e8a-405b-b16e-3fb89130fbee
Grant permission to read ACLs for the target permission group

This permission allows a component to read the ACLs it needs to read. The target of the permission should be the permission group the service application will request from the Authorisation Component.


Permission
Read Kerberos Mappings
e8c9c0f7-0d54-4db2-b8d6-cd80c45f6a5c
Grants permission to read Kerberos mappings for the target Principal

This permission grants the right to look up the Kerberos principal corresponding to the target, which also represents a principal.

To search for a principal by Kerberos principal name this must be granted as a wildcard.


Permission
Read Effective Permissions
35252562-51e5-4dd8-84cd-ba0fafa62669
Grants permission to read effective permissions

This must always be granted as a wildcard. This is intended only for administrators.


Permission
Manage ACLs
3a41f5ce-fc08-4669-9762-ec9e71061168
Grants permission to manage ACL entries affecting the target permission

The target of this permission should be either the UUID of the permission that can be managed, or the wildcard.

If this is not granted as a wildcard then the only endpoint that can be used is POST /authz/ace.


Permission
Manage Group
be9b6d47-c845-49b2-b9d5-d87b83f11c3b
Grants permission to edit group membership

The target of this permission is the group which can be edited. This permission also implicitly grants the right to create the group in the Authorisation Component, as groups exist when and only when they have members.


Permission
Manage Kerberos Mappings
327c4cc8-9c46-4e1e-bb6b-257ace37b0f6
Permits managing Kerberos mappings for the target principal

The target of this permission is the UUID of another principal, or the wildcard. This grants permission to add, change or remove the Kerberos principal mapping.

Class Definitions

These classes are defined by the Authorisation component and provide functionality to the Factory+ framework.

Principals

UUIDs under these classes are typically used in the princpal slot of an ACE, though sometimes they may be used as target representing, for example, the Sparkplug Node address associated with the account.

Class Definition
Service Account
e463b4ae-a322-46cc-8976-4ba76838e908
Accounts for services

UUIDs under this class represent particular component instances running on particular Factory+ deployments. They are used to grant the component instance permissions appropriate to its role.

Where a component has a Sparkplug interface, the component account UUID also serves as the component instance's Device UUID.


Class Definition
User Account
8b3e8f35-78e5-4f93-bf21-7238bcb2ba9d
Accounts for human users

Class Definition
Cell Gateway
00da3c0b-f62b-4761-a689-39ad0c33f864
Accounts for physical edge devices

Class Definition
Soft Gateway
5bee4d24-32e1-44f8-b953-1f86ff4b3e87
Accounts for virtual edge devices

Permissions

Class Definition
Permission
8ae784bb-c4b5-4995-9bf6-799b3c7f21ad
Well-known UUIDs used as permissions in the Authorisation Component

UUIDs of this class are used in the permission field of ACL entries. They represent particular permissions that can be granted to accounts as needed. The meaning of any individual permission UUID is defined by the component that implements that permission.


Groups

Class Definition
Permission Group
ac0d5288-6136-4ced-a372-325fbbcdd70d
Well-known UUIDs representing permissions for a particular application

These UUIDs are hardcoded into components, and each one represents the set of permissions that the component needs to query. As part of bootstrapping a component, it is necessary to ensure that the permission group is set up appropriately and contains the permissions documented in the service specification.


Class Definition
Client Role
1c567e3c-5519-4418-8682-6086f22fbc13
Groups of permissions that can be granted to accounts

UUIDs of this class represent groups of permissions. The group UUID will be used in the permission field of an ACE, and grants all permissions in that group on the given targets.


Class Definition
User Group
f1fabdd1-de90-4399-b3da-ccf6c2b2c08b
Groups of accounts

These UUIDs represent groups of accounts which need to be granted permissions in common. These appear in the princpal field of an ACE.