Each role may have a number of permissions that determine its ability to interact with a resource. The RBAC system provides a level of granularity that works by assigning actions on a per-resource level using the principle of least privilege. This means that a user can have read permissions on /foo/bar
and write permissions on /foo/bar/far
.
Kong Gateway has the following RBAC user types:
User type
|
Purpose
|
Most useful for
|
What tools does it have access to?
|
Admin
|
An admin belongs to a Workspace and has at least one role with a set of permissions. If an admin is in a Workspace without a role, they can’t see or interact with anything.
Admins can manage entities inside Workspaces, including users and their roles.
|
Personal administrative accounts for Kong Gateway and Kong Manager
|
- Admin API
- Kong Manager
- decK
|
Super admin
|
Specialized admins with the ability to:
- Manage all Workspaces
- Further customize permissions
- Create entirely new roles
- Invite or deactivate admins
- Assign or revoke admin roles
|
Managing RBAC
|
- Admin API
- Kong Manager
- decK
|
User
|
RBAC users without administrator permissions.
They have access to manage Kong Gateway, but can’t adjust teams, groups, or user permissions.
|
Service accounts for Kong Gateway, used as part of an automated process
|
|
By default, when Kong Gateway is configured, the starting user is configured as a Super Admin in the default
Workspace. Workspaces, by default, contain the following roles:
Role
|
Description
|
admin
|
Full access to all endpoints, across all Workspaces, except the RBAC Admin API.
|
super-admin
|
Full access to all endpoints, across all Workspaces, including the ability to assign and modify RBAC permissions.
|
read-only
|
Read access to all endpoints, across all Workspaces.
|
An admin has full permissions to every endpoint in Kong Gateway, but they can’t assign and modify RBAC permissions.
flowchart LR
A((fa:fa-user Super-admin user
permissions
CRUD))
B(Kong Manager)
C(Admin API)
D(RBAC)
E(Routes)
F(Services)
G(Plugins)
H(Workspaces)
A--> B & C
subgraph id1 [Control Plane]
B --> C
direction LR
subgraph id2 [Kong Entities]
direction LR
D
E
F
G
H
end
C --> D & E & F & G & H
end
Workspaces provide a way to logically segment configurations and entities with RBAC. Using RBAC, you can restrict access to groups of users and create roles within a Workspace so that users can manage each other. This is done using the workspaces/rbac/roles
endpoint.
Role
|
Description
|
workspace-admin
|
Full access to all endpoints in the Workspace, except the RBAC Admin API.
|
workspace-super-admin
|
Full access to all endpoints in the Workspaces, including the ability to assign and modify RBAC.
|
workspace-portal-admin
|
Full access to Dev Portal related endpoints in the Workspace.
|
workspace-read-only
|
Read access to all endpoints in the Workspace.
|
A role assigned in the default
Workspace has permissions across all subsequently created Workspaces unless the roles in the specific Workplace are explicitly assigned. When a Workspace has explicitly assigned roles, they take precedent over the default
Workspace.
If RBAC roles and permissions are assigned from within a Workspace, they are specific to that Workspace. For example, if there are two Workspaces, Payments and Deliveries, an admin created in Payments doesn’t have access to any endpoints in Deliveries.
When Kong Manager authentication is enabled, RBAC must be enabled to enforce authorization rules. Otherwise, anyone who can log in
to Kong Manager can perform any operation available on the Admin API.