Configure Workspaces in Kong Manager

Workspaces enable an organization to segment traffic so that teams of admins sharing the same Kong cluster are only able to interact with entities from their groups. Within a workspace, it is possible to invite admins to a particular team and to enforce RBAC with roles and permissions that further delimit the types of actions and entities available to an admin.

Prerequisites

  • Authentication and RBAC are enabled
  • You are logged into Kong Manager as a super admin or a user that has /admins and /rbac read and write access

Default workspace

When the first Super Admin logs in, they begin in the workspace named default. From here, they may invite admins to manage the default or any other workspaces.

Navigating across workspaces in Kong Manager

To navigate between workspaces from the Overview page, click on any workspace displayed in the list of workspaces.

The list of workspaces may be rendered as cards or a table, depending on preference.

Create a Workspace

This guide describes how to create workspaces in Kong Manager. You can also use the Admin API /workspaces/ route to create a workspace.

  1. Log in as the Super Admin. On the Workspaces page, click the New Workspace button to see the Create Workspace form. Name and choose a color / icon for the new Workspace.

    Each workspace name should be unique, regardless of letter case. For example, naming one workspace “Payments” and another one “payments” will create two different workspaces that appear identical.

    Do not name workspaces the same as these major API names (paths) in Admin API:

    1. Admins
    2. Certificates
    3. Consumers
    4. Plugins
    5. Portal
    6. Routes
    7. Services
    8. SNIs
    9. Upstreams
    10. Vitals
  2. Click the Create New Workspace button. Upon creation, the application will navigate to the new Workspace’s dashboard.

Edit a workspace

  1. In the workspace you want to edit, navigate to the Dashboard page.

  2. Click the Settings button. This button takes you to the Edit Workspace page.

  3. Here, you can edit the workspace avatar and avatar background color.

  4. Click Update Workspace to save.

Delete a workspace

Caution: The following steps will also delete all entities in the workspace. Make sure that this is something you want to do before proceeding.

Choose one of the following methods.

Kong Manager

Admin API

Using Kong Manager, complete the following:

  1. Go to Workspaces and select the workspace you want to delete.

  2. Click Settings and then Delete.

  3. In the Delete Workspace dialog, enter the name of the workspace, select Confirm: delete all associated resources, and then click Delete.

This will automatically delete all entities (teams, roles, services, and routes, for example) associated with the workspace as well as the workspace itself.

Delete the workspace and all entities associated with the workspace:

  1. curl -i -X DELETE http://localhost:8001/{WORKSPACE_NAME}?cascade=true

If it is successful, you should see the following response:

  1. HTTP 204 No Content

Workspace Access

If a role does not have permission to access entire endpoints within a workspace, the admin assigned to that role will not be able to see the related navigation links.

To set up access:

  1. Open Kong Manager.
  2. Click the Admins link in the Security section.

If the sidebar is collapsed, hover over the security badge icon and click Admins.

The Admins page displays a list of current admins and roles. Four default roles specific to the new workspace are already visible, and new roles specific to the workspace can be assigned from this page.

For more information about admins and roles, see RBAC in Kong Manager.