Skip to content
Kong Logo | Kong Docs Logo
search
  • We're Hiring!
  • Docs
    • Kong Gateway
    • Kong Konnect
    • Kong Mesh
    • Plugin Hub
    • decK
    • Kubernetes Ingress Controller
    • Insomnia
    • Kuma

    • Docs contribution guidelines
  • Plugin Hub
  • Support
  • Community
  • Kong Academy
Get a Demo Start Free Trial
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Plugin Hub
  • decK
  • Kubernetes Ingress Controller
  • Insomnia
  • Kuma

  • Docs contribution guidelines
  • 3.2.x (latest)
  • 3.1.x
  • 3.0.x
  • 2.8.x
  • 2.7.x
  • 2.6.x
  • Older Enterprise versions (2.1-2.5)
  • Older OSS versions (2.1-2.5)
  • Archive (pre-2.1)
    • Overview of Kong Gateway
      • Version Support Policy
      • Supported Installation Options
      • Supported Linux Distributions
    • Stability
    • Release Notes
      • Services
        • Overview
        • Configure Routes with Expressions
      • Upstreams
      • Plugins
      • Routing Traffic
      • Load Balancing
      • Health Checks and Circuit Breakers
      • Kong Performance Testing
    • Glossary
    • Get Kong
    • Services and Routes
    • Rate Limiting
    • Proxy Caching
    • Key Authentication
    • Load-Balancing
      • Overview
        • Overview
        • Deploy Kong Gateway in Hybrid mode
      • DB-less Deployment
      • Traditional
      • Overview
        • Helm
        • OpenShift with Helm
        • kubectl apply
        • Kubernetes Deployment Options
        • Using docker run
        • Build your own Docker images
        • Amazon Linux
        • Debian
        • Red Hat
        • Ubuntu
      • Running Kong as a non-root user
      • Securing the Admin API
      • Using systemd
      • Start Kong Gateway Securely
      • Programatically Creating Admins
      • Enabling RBAC
      • Overview
      • Download your License
      • Deploy Enterprise License
      • Using the License API
      • Monitor Licenses Usage
      • Default Ports
      • DNS Considerations
      • Network and Firewall
      • CP/DP Communication through a Forward Proxy
    • Kong Configuration File
    • Environment Variables
    • Serving a Website and APIs from Kong
      • Overview
      • Prometheus
      • StatsD
      • Datadog
      • Overview
      • Writing a Custom Trace Exporter
      • Tracing API Reference
    • Resource Sizing Guidelines
    • Security Update Process
    • Blue-Green Deployments
    • Canary Deployments
    • Clustering Reference
      • Log Reference
      • Dynamic log level updates
      • Customize Gateway Logs
      • Upgrade Kong Gateway 3.1.x
      • Migrate from OSS to Enterprise
    • Overview
      • Overview
      • Metrics
      • Analytics with InfluxDB
      • Analytics with Prometheus
      • Estimate Analytics Storage in PostgreSQL
      • Overview
      • Getting Started
      • Advanced Usage
        • Overview
        • Environment Variables
        • AWS Secrets Manager
        • Google Secrets Manager
        • Hashicorp Vault
        • Securing the Database with AWS Secrets Manager
      • Reference Format
      • Overview
      • Get Started with Dynamic Plugin Ordering
      • Overview
      • Enable the Dev Portal
      • Publish an OpenAPI Spec
      • Structure and File Types
      • Themes Files
      • Working with Templates
      • Using the Editor
        • Basic Auth
        • Key Auth
        • OIDC
        • Sessions
        • Adding Custom Registration Fields
        • Manage Developers
        • Developer Roles and Content Permissions
        • Authorization Provider Strategy
        • Enable Application Registration
        • Enable Key Authentication for Application Registration
          • External OAuth2 Support
          • Set up Okta and Kong for External Oauth
          • Set up Azure AD and Kong for External Authentication
        • Manage Applications
        • 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
    • FIPS 140-2
    • Overview
    • Enable Kong Manager
      • Services and Routes
      • Rate Limiting
      • Proxy Caching
      • Authentication with Consumers
      • Load Balancing
      • Overview
      • Create a Super Admin
      • Workspaces and Teams
      • Reset Passwords and RBAC Tokens
      • Basic Auth
        • Configure LDAP
        • LDAP Service Directory Mapping
        • Configure OIDC
        • OIDC Authenticated Group Mapping
      • Sessions
        • Overview
        • Enable RBAC
        • Add a Role and Permissions
        • Create a User
        • Create an Admin
    • Networking Configuration
    • Workspaces
    • Create Consumer Groups
    • Sending Email
    • 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
      • 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
      • Go
      • Javascript
      • Python
      • Running Plugins in Containers
      • External Plugin Performance
    • Overview
        • Overview
        • OpenID Connect with Curity
        • OpenID Connect with Azure AD
        • OpenID Connect with Google
        • OpenID Connect with Okta
        • OpenID Connect with Auth0
        • OpenID Connect with Cognito
      • Authentication Reference
      • Allow Multiple Authentication Plugins
    • Rate Limiting Plugin
      • Add a Body Value
    • GraphQL
      • gRPC Plugins
      • Configure a gRPC service
    • 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
    • kong.conf
    • Injecting Nginx Directives
    • CLI
    • File Permissions Reference
    • Key Management
    • Performance Testing Framework
    • Router Expressions Language
    • FAQ

github-edit-pageEdit this page

report-issueReport an issue

enterprise-switcher-iconSwitch to OSS

On this page
  • Securing your Gateway installation
  • Prerequisites
  • Create a workspace
    • Log into Kong Manager
    • Create the workspace
  • Create an admin
    • Invite a new admin
    • Register the admin manually
  • Verify the new admin
Kong Gateway
3.1.x
  • Home
  • Kong Gateway
  • Kong Manager
  • Authentication and Authorization
  • Access Control with Workspaces and Teams
You are browsing documentation for an outdated version. See the latest documentation here.

Access Control with Workspaces and Teams

In this topic, you’ll learn how to manage and configure user authorization using workspaces and teams in Kong Gateway with Kong Manager.

Securing your Gateway installation

At a high level, securing Kong Gateway administration is a two-step process:

  1. Turn on RBAC.
  2. Create a workspace and an admin for segregated administration.

In the following sections, you will need the kong_admin account’s password to log in to Kong Gateway, and the kong_admin_uri needs to be configured to avoid getting CORS errors.

Prerequisites

  • RBAC is enabled
  • You are logged in as the super admin or a user that has /admins and /rbac read and write access.

Create a workspace

For this example, start by creating a simple workspace called SecureWorkspace.

Log into Kong Manager

  1. Go to Kong Manager, or reload the page if you already have it open to see a login screen.
  2. Log in to Kong Manager with the built-in Super Admin account, kong_admin, and its password.

    Remember, this is the initial KONG_PASSWORD you used when you ran migrations during installation.

  3. If you have logged in successfully, then you can start administering your Kong Gateway cluster.

    If this step did not work, and you know the credentials are correct, then something is likely wrong with your Kong Gateway configuration. Double-check the settings. If the cause of the problem still isn’t clear, work with your Kong Konnect account team and Kong Support for assistance.

Create the workspace

  1. Access your Kong Manager instance.
  2. On the workspaces tab, click on New Workspace.
  3. Create a workspace named SecureWorkspace and select a color or image for the workspace avatar.

    Workspace names are case sensitive (“Payments” and “payments” are not equal), so it is recommended you give your workspaces unique names regardless of letter case to prevent confusion.


    Additionally, do not give a workspace the same name as any of these major routes in Kong Manager:

    Admins APIs Certificates Consumers
    Plugins Portal Routes Services
    SNIs Upstreams Vitals PermalinkStep
  4. Click Create New Workspace to open a new workspace dashboard.
  5. Click the Teams tab.
  6. From the Teams page, click the Roles tab.
  7. Select SecureWorkspace to view the default roles that come with Kong Gateway.

    By default, each new workspace has the following roles and privileges:

    Role Description
    workspace-admin Full access to all endpoints in the workspace except the RBAC Admin API.
    workspace-portal-admin Full access to Dev Portal related endpoints in the workspace.
    workspace-read-only Read access to all endpoints in the workspace.
    workspace-super-admin Full access to all endpoints in the workspace.

Notes:

  • Caution Granting access to the default workspace gives access to all workspaces in the organization.

  • The default workspace only has three roles: workspace-admin, workspace-super-admin, and workspace-read-only. Every other workspace will have the four roles mentioned above.

  • You can also create custom roles by clicking on the Add Role button and specifying the endpoints that the administrator with the role will be able to interact with.

Create an admin

Next, create an admin for the SecureWorkspace, granting them permissions to manage only that workspace.

Invite a new admin

  1. From the Teams > Admins tab, click Invite Admin.
  2. Enter the new administrator’s Email address , Username, and Custom Id.
  3. Ensure that Enable RBAC Token is enabled.

    This setting allows the new admin to use the Admin API as well as Kong Manager.

  4. Click Add/Edit Roles.
  5. In the Workspace Access dialog, select the SecureWorkspace.
  6. Select the workspace-admin role, which makes this user the workspace administrator for the SecureWorkspace.

    When you are done adding roles, you are redirected back to the Invite Admin dialog.

    Important: Before you proceed, ensure the Enable RBAC Token checkbox is checked. The RBAC token is what allows the new admin to use the Admin API to configure the system programmatically.

  7. Click Invite Admin to send the invite.

    If you have SMTP set up, Kong Manager sends an email with a registration link.

    If you don’t have SMTP enabled, the following instructions guide you to generate a registration link manually.

Register the admin manually

  1. Back on the Teams page, click the administrator you just created.
  2. Click the Generate registration link button.

    Using this link, the new administrator can go to a web browser and paste it in to initiate his/her account and create an initial password. Again, normally, this would happen through SMTP, and the user would get this link through an email.

  3. Click the copy icon to copy the registration link, then save it.

  4. Send the registration link to the new administrator, or use it yourself to test the login in the following steps.

  5. Open a different browser or an incognito tab in the current browser.
  6. Enter the registration link you copied previously into the browser to log in with the new administrator.

    If the registration link has expired, you can generate a new one by logging in with your kong_admin administrator and generating a new link.

  7. Enter a new password for your new administrator (save this in a secure place) and click the Register button.

    If everything went well, you should see an “Account Setup Success” message.

Verify the new admin

  1. Click the Login button to be taken to a new screen to log in with your new administrator.
  2. Enter the Username and Password of your new administrator and click Login again.

    Once you log in, you’ll notice that you can only see the SecureWorkspace.

  3. You can also verify that this user’s administration rights are limited. As this user, if you open the Teams tab and try to add new administrators, Admin API users (RBAC users), groups, or roles, you won’t have the permissions to do so.

You are now controlling access to Kong Gateway administration with RBAC.

Thank you for your feedback.
Was this page useful?
  • Kong
    THE CLOUD CONNECTIVITY COMPANY

    Kong powers reliable digital connections across APIs, hybrid and multi-cloud environments.

    • Company
    • Customers
    • Events
    • Investors
    • Careers Hiring!
    • Partners
    • Press
    • Contact
  • Products
    • Kong Konnect
    • Kong Gateway
    • Kong Mesh
    • Get Started
    • Pricing
  • Resources
    • eBooks
    • Webinars
    • Briefs
    • Blog
    • API Gateway
    • Microservices
  • Open Source
    • Install Kong Gateway
    • Kong Community
    • Kubernetes Ingress
    • Kuma
    • Insomnia
  • Solutions
    • Decentralize
    • Secure & Govern
    • Create a Dev Platform
    • API Gateway
    • Kubernetes
    • Service Mesh
Star
  • Terms•Privacy
© Kong Inc. 2023