- Resource naming convention
- OAuth 2.0 resource types and scopes
To get the most out of the below documentation, we recommend that you:
- understand the Kaa platform microservice-based architecture
- familiarize yourself with the OAuth 2.0 Authorization Framework (also, great read here).
The Kaa platform is based on multiple microservices that implement various aspects of the overall platform functionality. Many of these microservices manage resources that require access authentication and authorization. Kaa API security is implemented based on OAuth 2.0 and the User-Managed Access (UMA).
Kaa microservices that require access authorization act as resource servers. The user authentication, access authorization, and resource management is implemented in a separate, OAuth 2.0- and UMA-compliant, auth server. Kaa uses KeyCloak as the default auth server implementation.
To perform an operation on a resource, the requesting user must be authenticated with the auth server, and granted the necessary scopes. All Kaa services support bearer token HTTP authentication scheme on exposed REST APIs.
Resource naming convention
Protected resources have two unique identifiers in auth server: ID and name. By convention, Kaa services do not set resource IDs, allowing the auth server to generate IDs as it sees fit.
To ensure the uniqueness of resource names, the following pattern is applied:
- type identifies the type of the protected resource (e.g.
- handle is a unique handle of the protected resource, chosen at the discretion of the resource server (e.g. application name, endpoint ID, dashboard UUID, etc.).
Examples of the resource names that follow the above pattern:
OAuth 2.0 resource types and scopes
Kaa services use several resource types to manage access authorization to corresponding resources. Below is a summary of existing resource types and their associated OAuth 2.0 scopes.
Endpoint resource type
||Read access to endpoint and its associated data: tokens, metadata attributes, configuration, time-series, etc.|
||Write access to endpoint and its associated data.|
||Endpoint delete operation.|
Application resource type
Application name is used as a resource handle to construct resource names according to the resource naming convention.
||Read access to application, its associated metadata, and service instance configurations.|
||Write access to application, its associated metadata, and service instance configurations.|
||Application delete operation.|
||Creation of a new Kaa endpoint in a given application.|
||Read access to endpoint filters created in a given application.|
||Creation of endpoint filters in a given application.|
||Update of endpoint filters in a given application.|
||Delete operation on endpoint filters in a given application.|
||Read access to all existing endpoint metadata attribute keys in a given application.|
||Read access to all existing endpoint time-series configurations in a given application.|
||Read access to default endpoint configuration in a given application.|
||Write access to default endpoint configuration in a given application.|
||Delete operation on default endpoint configuration in a given application.|
||Read access to over-the-air software definitions in a given application.|
||Write access to over-the-air software definitions in a given application.|
Dashboard resource type
dashboard resource type is used for restricting access to web dashboards.
These resources are managed by the Kaa Web Dashboard service (WD).
Dashboard UUID is used as a resource handle to construct resource names according to the resource naming convention.
||View access to a given web dashboard.|
Kaa resource type
kaa resource type is used for restricting platform-wide operations.
Only one resource of this type (with name
kaa-system) is created per Kaa platform instance by the Kaa installer.
||Creation of a new Kaa application.|
||Bulk update of Kaa application configurations.|
||Read access to client username/password credentials.|
||Creation of new client username/password credentials.|
||Client username/password credentials status management.|
||Read access to client certificates.|
||Creation of new client certificates.|
||Client certificates status management.|