Skip to content
Kong Docs are moving soon! Our docs are migrating to a new home. You'll be automatically redirected to the new site in the future. In the meantime, view this page on the new site!
Kong Logo | Kong Docs Logo
  • Docs
    • Explore the API Specs
      View all API Specs View all API Specs View all API Specs arrow image
    • Documentation
      API Specs
      Kong Gateway
      Lightweight, fast, and flexible cloud-native API gateway
      Kong Konnect
      Single platform for SaaS end-to-end connectivity
      Kong AI Gateway
      Multi-LLM AI Gateway for GenAI infrastructure
      Kong Mesh
      Enterprise service mesh based on Kuma and Envoy
      decK
      Helps manage Kong’s configuration in a declarative fashion
      Kong Ingress Controller
      Works inside a Kubernetes cluster and configures Kong to proxy traffic
      Kong Gateway Operator
      Manage your Kong deployments on Kubernetes using YAML Manifests
      Insomnia
      Collaborative API development platform
  • Plugin Hub
    • Explore the Plugin Hub
      View all plugins View all plugins View all plugins arrow image
    • Functionality View all View all arrow image
      View all plugins
      AI's icon
      AI
      Govern, secure, and control AI traffic with multi-LLM AI Gateway plugins
      Authentication's icon
      Authentication
      Protect your services with an authentication layer
      Security's icon
      Security
      Protect your services with additional security layer
      Traffic Control's icon
      Traffic Control
      Manage, throttle and restrict inbound and outbound API traffic
      Serverless's icon
      Serverless
      Invoke serverless functions in combination with other plugins
      Analytics & Monitoring's icon
      Analytics & Monitoring
      Visualize, inspect and monitor APIs and microservices traffic
      Transformations's icon
      Transformations
      Transform request and responses on the fly on Kong
      Logging's icon
      Logging
      Log request and response data using the best transport for your infrastructure
  • Support
  • Community
  • Kong Academy
Get a Demo Start Free Trial
Kong Gateway
3.3.x
  • Home icon
  • Kong Gateway
  • Admin API
  • Rbac
  • RBAC Reference
github-edit-pageEdit this page
report-issueReport an issue
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Kong AI Gateway
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Kong Gateway Operator
  • Insomnia
  • Kuma

  • Docs contribution guidelines
  • 3.10.x (latest)
  • 3.9.x
  • 3.8.x
  • 3.7.x
  • 3.6.x
  • 3.5.x
  • 3.4.x (LTS)
  • 3.3.x
  • 2.8.x (LTS)
  • Archive (3.0.x and pre-2.8.x)
  • Introduction
    • Overview of Kong Gateway
    • Support
      • Version Support Policy
      • Third Party Dependencies
      • Browser Support
      • Software Bill of Materials
    • Stability
    • Release Notes
    • Breaking Changes
      • Kong Gateway 3.3.x
      • Kong Gateway 3.2.x
      • Kong Gateway 3.1.x
      • Kong Gateway 3.0.x
      • Kong Gateway 2.8.x or earlier
    • Key Concepts
      • Services
      • Routes
      • Consumers
      • Upstreams
      • Plugins
    • How Kong Works
      • Routing Traffic
      • Load Balancing
      • Health Checks and Circuit Breakers
      • Kong Performance Testing
    • Glossary
  • Get Started with Kong
    • Get Kong
    • Services and Routes
    • Rate Limiting
    • Proxy Caching
    • Key Authentication
    • Load-Balancing
  • Kong in Production
    • Deployment Topologies
      • Overview
      • Kubernetes Topologies
      • Hybrid Mode
        • Overview
        • Deploy Kong Gateway in Hybrid mode
      • DB-less Deployment
      • Traditional
    • Installation Options
      • Overview
      • Kubernetes
        • Overview
        • Install Kong Gateway
        • Configure the Admin API
        • Install Kong Manager
        • Install Developer Portal
      • Docker
        • Using docker run
        • Build your own Docker images
      • Linux
        • Amazon Linux
        • Debian
        • Red Hat
        • Ubuntu
      • Post-installation
        • Set up a data store
        • Apply Enterprise license
        • Enable Kong Manager (Enterprise)
    • Running Kong
      • Running Kong as a non-root user
      • Securing the Admin API
      • Using systemd
    • Access Control
      • Start Kong Gateway Securely
      • Programmatically Creating Admins
      • Enabling RBAC
    • Licenses
      • Overview
      • Download your License
      • Deploy Enterprise License
      • Using the License API
      • Monitor Licenses Usage
    • Networking
      • Default Ports
      • DNS Considerations
      • Network and Firewall
      • CP/DP Communication through a Forward Proxy
      • PostgreSQL TLS
        • Configure PostgreSQL TLS
        • Troubleshooting PostgreSQL TLS
    • Kong Configuration File
    • Environment Variables
    • Serving a Website and APIs from Kong
    • Monitoring
      • Overview
      • Prometheus
      • StatsD
      • Datadog
      • Health Check Probes
    • Tracing
      • Overview
      • Writing a Custom Trace Exporter
      • Tracing API Reference
    • Resource Sizing Guidelines
    • Security Update Process
    • Blue-Green Deployments
    • Canary Deployments
    • Clustering Reference
    • Logging
      • Log Reference
      • Dynamic log level updates
      • Customize Gateway Logs
    • Configure a gRPC service
    • Use the Expressions Router
    • Upgrade and Migration
      • Upgrading Kong Gateway 3.x.x
      • Backup and Restore
      • Upgrade Strategies
        • Dual-Cluster Upgrade
        • In-Place Upgrade
        • Blue-Green Upgrade
        • Rolling Upgrade
      • Upgrade from 2.8 LTS to 3.4 LTS
      • Migrate from OSS to Enterprise
      • Migration Guidelines Cassandra to PostgreSQL
      • Breaking Changes
  • Kong Gateway Enterprise
    • Overview
    • Kong Vitals
      • Overview
      • Metrics
      • Analytics with InfluxDB
      • Analytics with Prometheus
      • Estimate Analytics Storage in PostgreSQL
    • Secrets Management
      • Overview
      • Getting Started
      • Advanced Usage
      • Backends
        • Overview
        • Environment Variables
        • AWS Secrets Manager
        • Google Cloud Secret Manager
        • HashiCorp Vault
      • How-To
        • Securing the Database with AWS Secrets Manager
      • Reference Format
    • Dynamic Plugin Ordering
      • Overview
      • Get Started with Dynamic Plugin Ordering
    • Dev Portal
      • Overview
      • Enable the Dev Portal
      • Publish an OpenAPI Spec
      • Structure and File Types
      • Themes Files
      • Working with Templates
      • Using the Editor
      • Authentication and Authorization
        • Basic Auth
        • Key Auth
        • OIDC
        • Sessions
        • Adding Custom Registration Fields
        • Manage Developers
        • Developer Roles and Content Permissions
      • Application Registration
        • Authorization Provider Strategy
        • Enable Application Registration
        • Enable Key Authentication for Application Registration
        • Enable External Authentication
          • External OAuth2 Support
          • Set up Okta and Kong for External Oauth
          • Set up Azure AD and Kong for External Authentication
        • Manage Applications
      • Customize Dev Portal
        • Theme Editing
        • Migrating Templates Between Workspaces
        • Markdown Rendering Module
        • Customizing Portal Emails
        • Adding and Using JavaScript Assets
        • Single Page App in Dev Portal
        • Alternate OpenAPI Renderer
      • SMTP
      • Workspaces
      • Helpers CLI
      • Portal API Documentation
    • Audit Logging
    • Keyring and Data Encryption
    • Workspaces
    • Consumer Groups
    • Event Hooks
    • Configure Data Plane Resilience
    • About Control Plane Outage Management
    • FIPS 140-2
      • Overview
      • Install the FIPS Compliant Package
    • Authenticate your Kong Gateway Amazon RDS database with AWS IAM
  • Kong Manager
    • Overview
    • Enable Kong Manager
    • Get Started with Kong Manager
      • Services and Routes
      • Rate Limiting
      • Proxy Caching
      • Authentication with Consumers
      • Load Balancing
    • Authentication and Authorization
      • Overview
      • Create a Super Admin
      • Workspaces and Teams
      • Reset Passwords and RBAC Tokens
      • Basic Auth
      • LDAP
        • Configure LDAP
        • LDAP Service Directory Mapping
      • OIDC
        • Configure OIDC
        • OIDC Authenticated Group Mapping
      • Sessions
      • RBAC
        • Overview
        • Enable RBAC
        • Add a Role and Permissions
        • Create a User
        • Create an Admin
    • Networking Configuration
    • Workspaces
    • Create Consumer Groups
    • Sending Email
  • Develop Custom Plugins
    • Overview
    • File Structure
    • Implementing Custom Logic
    • Plugin Configuration
    • Accessing the Data Store
    • Storing Custom Entities
    • Caching Custom Entities
    • Extending the Admin API
    • Writing Tests
    • (un)Installing your Plugin
    • Plugin Development Kit
      • Overview
      • kong.client
      • kong.client.tls
      • kong.cluster
      • kong.ctx
      • kong.ip
      • kong.jwe
      • kong.log
      • kong.nginx
      • kong.node
      • kong.request
      • kong.response
      • kong.router
      • kong.service
      • kong.service.request
      • kong.service.response
      • kong.table
      • kong.tracing
      • kong.vault
      • kong.websocket.client
      • kong.websocket.upstream
    • Plugins in Other Languages
      • Go
      • Javascript
      • Python
      • Running Plugins in Containers
      • External Plugin Performance
  • Kong Plugins
    • Overview
    • Authentication Reference
    • Allow Multiple Authentication Plugins
    • Plugin Queuing
      • Overview
      • Plugin Queuing Reference
  • Admin API
    • Overview
    • Information Routes
    • Health Routes
    • Tags
    • Debug Routes
    • Services
    • Routes
    • Consumers
    • Plugins
    • Certificates
    • CA Certificates
    • SNIs
    • Upstreams
    • Targets
    • Vaults
    • Keys
    • Licenses
    • Workspaces
    • RBAC
    • Admins
    • Developers
    • Consumer Groups
    • Event Hooks
    • Keyring and Data Encryption
    • Audit Logs
    • Status API
  • Reference
    • kong.conf
    • Injecting Nginx Directives
    • CLI
    • Key Management
    • Performance Testing Framework
    • The Expressions Language
      • Overview
      • Language References
      • Performance Optimizations
    • Rate Limiting Library
    • FAQ
enterprise-switcher-icon Switch to OSS
On this pageOn this page
  • Add a User
  • Retrieve a User
  • List Users
  • Update a User
  • Delete a User
  • Add a Role
  • Retrieve a Role
  • List Roles
  • Update or Create a Role
  • Update a Role
  • Delete a Role
  • Add a Role Endpoint Permission
  • Retrieve a Role Endpoint Permission
  • List Role Endpoints Permissions
  • Update a Role Endpoint Permission
  • Delete a Role Endpoint Permission
  • Add a Role Entity Permission
  • Retrieve a Role Entity Permission
  • List Entity Permissions
  • Update an Entity Permission
  • Delete an Entity Permission
  • List Role Permissions
  • Add a User to a Role
  • List a User’s Roles
  • Delete a Role from a User
  • List a User’s Permissions
You are browsing documentation for an older version. See the latest documentation here.

RBAC Reference
Available with Kong Gateway Enterprise subscription - Contact Sales

Kong Kong Gateway’s RBAC feature is configurable through Kong’s Admin API or via the Kong Manager.

There are 4 basic entities involving RBAC.

  • User: The entity interacting with the system. Can be associated with zero, one or more roles. Example: user bob has token 1234.
  • Role: Set of permissions (role_endpoint and role_entity). Has a name and can be associated with zero, one or more permissions. Example: user bob is associated with role developer.
  • role_endpoint: A set of enabled or disabled (see negative parameter) actions (read, create, update, delete) endpoint. Example: Role developer has 1 role_endpoint: read & write to endpoint /routes
  • role_entity: A set of enabled or disabled (see negative parameter) actions (read, create, update, delete) entity. Example: Role developer has 1 role_entity: read & write & delete to entity 283fccff-2d4f-49a9-8730-dc8b71ec2245.

Add a User

Endpoint

/rbac/users

Request Body

Attribute Description
name The RBAC user name.
user_token The authentication token to be presented to the Admin API. The value will be hashed and cannot be fetched in plaintext.
enabled
optional
A flag to enable or disable the user. By default, users are enabled.
comment
optional
A string describing the RBAC user object.

Response

HTTP 201 Created
{
  "comment": null,
  "created_at": 1557522650,
  "enabled": true,
  "id": "fa6881b2-f49f-4007-9475-577cd21d34f4",
  "name": "doc_knight",
  "user_token": "$2b$09$Za30VKAAAmyoB9zF2PNEF.9hgKcN2BdKkptPMCubPK/Ps08lzZjYG",
  "user_token_ident": "4d870"
}

Retrieve a User

Endpoint

/rbac/users/{name_or_id}
Attribute Description
name_or_id The RBAC user name or UUID.

Response

HTTP 200 OK
{
  "created_at": 1557522650,
  "enabled": true,
  "id": "fa6881b2-f49f-4007-9475-577cd21d34f4",
  "name": "doc_lord",
  "user_token": "$2b$09$Za30VKAAAmyoB9zF2PNEF.9hgKcN2BdKkptPMCubPK/Ps08lzZjYG",
  "user_token_ident": "4d870"
}

List Users

Endpoint

/rbac/users/

Response

HTTP 200 OK
{
  "data": [
    {
      "comment": null,
      "created_at": 1557512629,
      "enabled": true,
      "id": "f035f120-a95e-4327-b2ae-8fa264601d75",
      "name": "doc_lord",
      "user_token": "$2b$09$TIMneYcTosdG9WbzRsqcweAS2zote8g6I8HqXAtbFHR1pds2ymsh6",
      "user_token_ident": "88ea3"
    },
    {
      "comment": null,
      "created_at": 1557522650,
      "enabled": true,
      "id": "fa6881b2-f49f-4007-9475-577cd21d34f4",
      "name": "doc_knight",
      "user_token": "$2b$09$Za30VKAAAmyoB9zF2PNEF.9hgKcN2BdKkptPMCubPK/Ps08lzZjYG",
      "user_token_ident": "4d870"
    }
  ],
  "next": null
}

⚠️ Note: RBAC Users associated with Admins will not be listed with GET /rbac/users. Instead, use GET /admins to list all Admins.


Update a User

Endpoint

/rbac/users/{name_or_id}
Attribute Description
name_or_id The RBAC user name or UUID.

Request Body

Attribute Description
user_token
optional
The authentication token to be presented to the Admin API. If this value is not present, the token will automatically be generated.
enabled
optional
A flag to enable or disable the user. By default, users are enabled.
comment
optional
A string describing the RBAC user object.

Response

HTTP 200 OK
{
  "comment": "this comment came from a patch request",
  "created_at": 1557522650,
  "enabled": true,
  "id": "fa6881b2-f49f-4007-9475-577cd21d34f4",
  "name": "donut_lord",
  "user_token": "$2b$09$Za30VKAAAmyoB9zF2PNEF.9hgKcN2BdKkptPMCubPK/Ps08lzZjYG",
  "user_token_ident": "4d870"
}

Delete a User

Endpoint

/rbac/users/{name_or_id}
Attribute Description
name_or_id The RBAC user name or UUID.

Response

HTTP 204 No Content

Add a Role

Endpoint

/rbac/roles
Attribute Description
name The RBAC role name.
comment
optional
A string describing the RBAC user object.

Response

HTTP 201 Created
{
  "comment": null,
  "created_at": 1557532241,
  "id": "b5c5cfd4-3330-4796-9b7b-6026e91e3ad6",
  "is_default": false,
  "name": "service_reader"
}

Retrieve a Role

Endpoint

/rbac/roles/{name_or_id}
Attribute Description
name_or_id The RBAC role name or UUID.

Response

HTTP 200 OK
{
  "created_at": 1557532241,
  "id": "b5c5cfd4-3330-4796-9b7b-6026e91e3ad6",
  "is_default": false,
  "name": "service_reader"
}

List Roles

Endpoint

/rbac/roles

Response

HTTP 200 OK
{
  "data": [
    {
      "comment": "Full access to all endpoints, across all workspaces—except RBAC Admin API",
      "created_at": 1557506249,
      "id": "38a03d47-faae-4366-b430-f6c10aee5029",
      "name": "admin"
    },
    {
      "comment": "Read access to all endpoints, across all workspaces",
      "created_at": 1557506249,
      "id": "4141675c-8beb-41a5-aa04-6258ab2d2f7f",
      "name": "read-only"
    },
    {
      "comment": "Full access to all endpoints, across all workspaces",
      "created_at": 1557506249,
      "id": "888117e0-f2b3-404d-823b-dee595423505",
      "name": "super-admin"
    },
    {
      "comment": null,
      "created_at": 1557532241,
      "id": "b5c5cfd4-3330-4796-9b7b-6026e91e3ad6",
      "name": "doc_lord"
    }
  ],
  "next": null
}

Update or Create a Role

Endpoint

/rbac/roles/{name_or_id}

Request Body

Attribute Description
name The RBAC role name.
comment
optional
A string describing the RBAC user object.

The behavior of PUT endpoints is the following: if the request payload does contain an entity’s primary key, the payload will “replace” the entity specified by the given primary key. If the primary key is not that of an existing entity, the entity will be created with the given payload.

Response

If creating the entity:

HTTP 201 Created

If replacing the entity:

HTTP 200 OK
{
  "comment": "the best",
  "created_at": 1557532566,
  "id": "b5c5cfd4-3330-4796-9b7b-6026e91e3ad6",
  "is_default": false,
  "name": "doc_lord"
}

Update a Role

Endpoint

/rbac/roles/{name_or_id}
Attribute Description
name_or_id The RBAC role or UUID.

Request Body

Attribute Description
comment
optional
A string describing the RBAC role object.

Response

HTTP 200 OK
{
  "comment": "comment from patch request",
  "created_at": 1557532566,
  "id": "b5c5cfd4-3330-4796-9b7b-6026e91e3ad6",
  "is_default": false,
  "name": "service_reader"
}

Delete a Role

Endpoint

/rbac/roles/{name_or_id}
Attribute Description
name The RBAC role name.

Response

HTTP 204 No Content

Add a Role Endpoint Permission

Endpoint

/rbac/roles/{name_or_id}/endpoints
Attribute Description
name_or_id The RBAC role name.

Request Body

Attribute Description
workspace Workspace tied to the endpoint. Defaults to the default permission. Special value of “*” means all workspaces are affected
endpoint Endpoint associated with this permission.
negative If true, explicitly disallow the actions associated with the permissions tied to this endpoint. By default this value is false.
actions One or more actions associated with this permission. This is a comma separated string (read,create,update,delete)
comment
optional
A string describing the RBAC permission object.

endpoint must be the path of the associated endpoint. They can be exact matches, or contain wildcards, represented by *.

  • Exact matches:
    • /services/
    • /services/foo
  • Wildcards:
    • /services/*
    • /services/*/plugins

Where * replaces exactly one segment between slashes (or the end of the path).

Note that wildcards can be nested (/rbac/*, /rbac/*/*, /rbac/*/*/* would refer to all paths under /rbac/)

Response

HTTP 201 Created
{
  "actions": [
    "delete",
    "create",
    "update",
    "read"
  ],
  "created_at": 1557764505,
  "endpoint": "/consumers",
  "negative": false,
  "role": {
    "id": "23df9f20-e7cc-4da4-bc89-d3a08f976e50"
  },
  "workspace": "default"
}

Retrieve a Role Endpoint Permission

Endpoint

/rbac/roles/{name_or_id}/endpoints/{workspace_name_or_id}/{endpoint}
Attribute Description
name_or_id The RBAC role name or UUID.
workspace_name_or_id The workspace name or UUID.
endpoint The endpoint associated with this permission.

Response

HTTP 200 OK
{
  "actions": [
    "delete",
    "create",
    "update",
    "read"
  ],
  "created_at": 1557764505,
  "endpoint": "/consumers",
  "negative": false,
  "role": {
    "id": "23df9f20-e7cc-4da4-bc89-d3a08f976e50"
  },
  "workspace": "default"
}

List Role Endpoints Permissions

Endpoint

/rbac/roles/{role_name_or_id}/endpoints
Attribute Description
role_name_or_id The RBAC role name or UUID.

Response

HTTP 200 OK
{
  "data": [
    {
      "actions": [
        "delete",
        "create",
        "update",
        "read"
      ],
      "created_at": 1557764505,
      "endpoint": "/consumers",
      "negative": false,
      "role": {
        "id": "23df9f20-e7cc-4da4-bc89-d3a08f976e50"
      },
      "workspace": "default"
    },
    {
      "actions": [
        "read"
      ],
      "created_at": 1557764438,
      "endpoint": "/services",
      "negative": false,
      "role": {
        "id": "23df9f20-e7cc-4da4-bc89-d3a08f976e50"
      },
      "workspace": "default"
    }
  ]
}

Update a Role Endpoint Permission

Endpoint

/rbac/roles/{name_or_id}/endpoints/{workspace_name_or_id}/{endpoint}
Attribute Description
name_or_id The RBAC role name or UUID.
workspace_name_or_id The workspace name or UUID.
endpoint The endpoint associated with this permission.

Request Body

Attribute Description
negative If true, explicitly disallow the actions associated with the permissions tied to this resource. By default this value is false.
actions One or more actions associated with this permission.

Response

HTTP 200 OK
{
  "actions": [
    "delete",
    "create",
    "update",
    "read"
  ],
  "created_at": 1557764438,
  "endpoint": "/services",
  "negative": false,
  "role": {
    "id": "23df9f20-e7cc-4da4-bc89-d3a08f976e50"
  },
  "workspace": "default"
}

Delete a Role Endpoint Permission

Endpoint

/rbac/roles/{name_or_id}/endpoints/{workspace_name_or_id}/{endpoint}
Attribute Description
name_or_id The RBAC role name or UUID.
workspace_name_or_id The workspace name or UUID.
endpoint The endpoint associated with this permission.

Response

HTTP 204 No Content

Add a Role Entity Permission

Endpoint

/rbac/roles/{name_or_id}/entities
Attribute Description
name_or_id The RBAC role name or UUID.

Request Body

Attribute Description
negative If true, explicitly disallow the actions associated with the permissions tied to this resource. By default this value is false.
entity_id id of the entity associated with this permission.
entity_type Type of the entity of a given entity_id.
actions One or more actions associated with this permission.
comment
optional
A string describing the RBAC permission object

entity_id must be the ID of an entity in Kong; if the ID of a workspace is given, the permission will apply to all entities in that workspace. Future entities belonging to that workspace will get the same permissions. A wildcard * will be interpreted as all entities in the system.

Response

HTTP 201 Created
{
  "actions": [
    "delete",
    "create",
    "read"
  ],
  "created_at": 1557771505,
  "entity_id": "*",
  "entity_type": "wildcard",
  "negative": false,
  "role": {
    "id": "bba049fa-bf7e-40ef-8e89-553dda292e99"
  }
}

Retrieve a Role Entity Permission

Endpoint

/rbac/roles/{name_or_id}/entities/{entity_id}
Attribute Description
name_or_id The RBAC permission name or UUID.
entity_id id of the entity associated with this permission.

Response

HTTP 200 Ok
{
  "actions": [
    "delete",
    "create",
    "read"
  ],
  "created_at": 1557771505,
  "entity_id": "*",
  "entity_type": "wildcard",
  "negative": false,
  "role": {
    "id": "bba049fa-bf7e-40ef-8e89-553dda292e99"
  }
}

List Entity Permissions

Endpoint

/rbac/roles/{name_or_id}/entities
Attribute Description
name_or_id The RBAC permission name or UUID.

Response

HTTP 200 Ok
{
  "data": [
    {
      "actions": [
        "delete",
        "create",
        "read"
      ],
      "created_at": 1557771505,
      "entity_id": "*",
      "entity_type": "wildcard",
      "negative": false,
      "role": {
        "id": "bba049fa-bf7e-40ef-8e89-553dda292e99"
      }
    }
  ]
}

Update an Entity Permission

Endpoint

/rbac/roles/{name_or_id}/entities/{entity_id}
Attribute Description
name_or_id The RBAC role name or UUID.
entity_id The entity name or UUID.

Request Body

Attribute Description
negative If true, explicitly disallow the actions associated with the permissions tied to this resource. By default this value is false.
actions One or more actions associated with this permission.

Response

HTTP 200 OK
{
  "actions": [
    "update"
  ],
  "created_at": 1557771505,
  "entity_id": "*",
  "entity_type": "wildcard",
  "negative": false,
  "role": {
    "id": "bba049fa-bf7e-40ef-8e89-553dda292e99"
  }
}

Delete an Entity Permission

Endpoint

/rbac/roles/{name_or_id}/entities/{entity_id}
Attribute Description
name_or_id The RBAC role name or UUID.
entity_id The entity name or UUID.

Response

HTTP 204 No Content

List Role Permissions

Endpoint

/rbac/roles/{name_or_id}/permissions/
Attribute Description
name_or_id The RBAC role name or UUID.

Response

HTTP 200 OK
{
  "endpoints": {
    "*": {
      "*": {
        "actions": [
          "delete",
          "create",
          "update",
          "read"
        ],
        "negative": false
      },
      "/*/rbac/*": {
        "actions": [
          "delete",
          "create",
          "update",
          "read"
        ],
        "negative": true
      }
    }
  },
  "entities": {}
}

Add a User to a Role

Endpoint

/rbac/users/{name_or_id}/roles
Attribute Description
name_or_id The RBAC user name or UUID.

Request Body

Attribute Description
roles Comma-separated list of role names to assign to the user.

Response

HTTP 201 Created
{
  "roles": [
    {
      "created_at": 1557772263,
      "id": "aae80073-095f-4553-ba9a-bee5ed3b8b91",
      "name": "doc-knight"
    }
  ],
  "user": {
    "comment": null,
    "created_at": 1557772232,
    "enabled": true,
    "id": "b65ca712-7ceb-4114-87f4-5c310492582c",
    "name": "gruce-wayne",
    "user_token": "$2b$09$gZnMKK/mm/d2rAXN7gL63uL43mjdX/62iwMqdyCQwLyC0af3ce/1K",
    "user_token_ident": "88ea3"
  }
}

List a User’s Roles

Endpoint

/rbac/users/{name_or_id}/roles
Attribute Description
name_or_id The RBAC user name or UUID.

Response

HTTP 200 OK

{
  "roles": [
    {
      "comment": "Read access to all endpoints, across all workspaces",
      "created_at": 1557765500,
      "id": "a1c810ee-8366-4654-ba0c-963ffb9ccf2e",
      "name": "read-only"
    },
    {
      "created_at": 1557772263,
      "id": "aae80073-095f-4553-ba9a-bee5ed3b8b91",
      "name": "doc-knight"
    }
  ],
  "user": {
    "comment": null,
    "created_at": 1557772232,
    "enabled": true,
    "id": "b65ca712-7ceb-4114-87f4-5c310492582c",
    "name": "gruce-wayne",
    "user_token": "$2b$09$gZnMKK/mm/d2rAXN7gL63uL43mjdX/62iwMqdyCQwLyC0af3ce/1K",
    "user_token_ident": "88ea3"
  }
}

Delete a Role from a User

Endpoint

/rbac/users/{name_or_id}/roles
Attribute Description
name_or_id The RBAC user name or UUID.

Request Body

Attribute Description
roles Comma-separated list of role names to assign to the user.

Response

HTTP 204 No Content

List a User’s Permissions

Endpoint

/rbac/users/{name_or_id}/permissions
Attribute Description
name_or_id The RBAC user name or UUID.

Response

HTTP 200 OK
{
  "endpoints": {
    "*": {
      "*": {
        "actions": [
          "read"
        ],
        "negative": false
      }
    }
  },
  "entities": {}
}

Thank you for your feedback.
Was this page useful?
Too much on your plate? close cta icon
More features, less infrastructure with Kong Konnect. 1M requests per month for free.
Try it for Free
  • Kong
    Powering the API world

    Increase developer productivity, security, and performance at scale with the unified platform for API management, service mesh, and ingress controller.

    • Products
      • Kong Konnect
      • Kong Gateway Enterprise
      • Kong Gateway
      • Kong Mesh
      • Kong Ingress Controller
      • Kong Insomnia
      • Product Updates
      • Get Started
    • Documentation
      • Kong Konnect Docs
      • Kong Gateway Docs
      • Kong Mesh Docs
      • Kong Insomnia Docs
      • Kong Konnect Plugin Hub
    • Open Source
      • Kong Gateway
      • Kuma
      • Insomnia
      • Kong Community
    • Company
      • About Kong
      • Customers
      • Careers
      • Press
      • Events
      • Contact
  • Terms• Privacy• Trust and Compliance
© Kong Inc. 2025