-
Notifications
You must be signed in to change notification settings - Fork 305
Add documentation for Custom Roles feature #4293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
brianmacdonald-temporal
wants to merge
9
commits into
main
Choose a base branch
from
custom-roles
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4d798f2
Add documentation for Custom Roles feature
brianmacdonald-temporal dc03bae
Update docs/cloud/manage-access/custom-roles.mdx
brianmacdonald-temporal 2fad2fd
Update docs/cloud/manage-access/custom-roles.mdx
brianmacdonald-temporal 11fe9a4
Updates to Custom Roles documentation
brianmacdonald-temporal 869f6ca
Merge branch 'custom-roles' of https://github.com/temporalio/document…
brianmacdonald-temporal 3c9288d
Merge branch 'main' into custom-roles
brianmacdonald-temporal 9ce7dd0
Merge branch 'main' into custom-roles
brianmacdonald-temporal 0bfb41f
Removing duplicate file to fix bad link error
brianmacdonald-temporal 5a6a67e
Merge branch 'main' into custom-roles
brianmacdonald-temporal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| --- | ||
| id: custom-roles | ||
| title: Manage custom roles | ||
| sidebar_label: Manage custom roles | ||
| description: Custom roles enable users to create fine-grained authorization in Temporal Cloud. This will give you precise control over who can do what within your account. | ||
| slug: /cloud/manage-access/custom-roles | ||
| toc_max_heading_level: 4 | ||
| keywords: | ||
| - explanation | ||
| - feature | ||
| - manage access | ||
| - custom roles | ||
| - how to | ||
| tags: | ||
| - Temporal Cloud | ||
| - custom roles | ||
| - user management | ||
| --- | ||
|
|
||
| import Tabs from '@theme/Tabs'; | ||
| import TabItem from '@theme/TabItem'; | ||
|
|
||
| Temporal Cloud offers a set of predefined [account-level roles and Namespace-level permissions](https://docs.temporal.io/cloud/users#account-level-roles). | ||
| These roles are sufficient for many Temporal use cases, but can't cover all combinations of least privilege, delegation, and automation-safe permissions often required in large enterprises. | ||
|
|
||
| ## What are Custom Roles? | ||
|
|
||
| Custom Roles enable you to define your own roles as bundles of permission primitives (operations/actions) | ||
| scoped to applicable resources (namespaces or account objects) and assign them to any | ||
| principal (user, group, service account). | ||
|
|
||
| ## Why use Custom Roles? | ||
|
|
||
| Use Custom Roles if you want more fine-grained authentication than Temporal Cloud's predefined roles and permissions provide. | ||
|
|
||
| Use Custom Roles if your access model enforces least-privilege access to grant users and service accounts only the operations they explicitly need, and no more. | ||
|
|
||
| Using Custom Roles with [Service Accounts](/cloud/service-accounts) can make them more secure for automation purposes. | ||
|
|
||
| ## Custom Roles limits | ||
|
|
||
| For more information about the limits of Custom Roles, see [Custom Roles limits](/cloud/limits#custom-role-limits). | ||
|
|
||
| ## Defining Custom Roles | ||
|
|
||
| Custom Roles are made up of bundles of permission operations that map to Temporal Control Plane operations. | ||
| You can scope a permission to all resources of a type, or to specific resources. | ||
|
brianmacdonald-temporal marked this conversation as resolved.
|
||
|
|
||
| For example, the following JSON code defines a global, read-only Namespace role called `NamespaceGlobalReadOnly`, | ||
| to use for auditing and monitoring. | ||
| Users with this role will be able to retrieve information about any Namespace, but will not be able to modify them. | ||
| The `grants` field is an array of the available permission operations, in this case `cloud.namespace.list` and `cloud.namespace.get`. | ||
| The operations are limited to a `resourceType` of `Namespace`, and the scope is `all`. | ||
|
|
||
| You can scope roles to: | ||
| * All resources of a given type | ||
| * Specific resources by explicit ID list | ||
|
|
||
| ``` | ||
| { | ||
| "name": "NamespaceGlobalReadOnly", | ||
| "description": "Read-only access to all namespaces for monitoring and compliance", | ||
| "grants": [ | ||
| { | ||
| "operation": "cloud.namespace.list", | ||
| "resourceType": "Namespace", | ||
| "scope": { "all": true } | ||
| }, | ||
| { | ||
| "operation": "cloud.namespace.get", | ||
| "resourceType": "Namespace", | ||
| "scope": { "all": true } | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| ### Create Custom Roles from the Web UI | ||
|
|
||
| <!-- TBD: The UI is subject to change --> | ||
|
|
||
| To create a Custom Role from the Web UI, select Org Settings in the left sidebar, and then click the Custom Roles tab on the Settings page. | ||
|
|
||
| On the Custom Roles tab, you'll see a list of the roles that have already been defined for your account, 50 to a page. | ||
| Click the three dots menu to view details about an existing Custom Role, or to edit or delete that role. | ||
|
|
||
| Click the Create Custom Role button to create a new role. | ||
| On the Create Custom Role page, give the Custom Role a name, and optionally a description. | ||
| In the Permissions section, you'll assign the appropriate resources and its permissions. | ||
| Select the Resource Type from the drop-down; your choices are Namespace and Account. | ||
|
|
||
| If you select Namespace, search for the Namespace for which you want to add permissions, then click Add Resource. | ||
| The Namespace you selected appears in the Permissions By Resource list. | ||
|
|
||
| If you select Account, the permissions apply to the current account, so only the Add Resource button appears. | ||
| Click Add Resource, and the Account will be added to the Permissions By Resource list. | ||
|
|
||
| Once the Namespace or Account appears in the Permissions By Resource list, you can toggle individual permissions | ||
| on or off for that resource. | ||
| If you want to start with the permission set of one of the pre-defined Temporal roles, choose the role from | ||
| the Select Preset drop-down, and the appropriate permissions will be toggled for you. | ||
|
|
||
| <!-- TBD: If we choose to add info about available permissions, we should add a link or list here. --> | ||
|
|
||
| When you're done assiging permissions to resources, click Create Custom Role at the bottom of the page. | ||
|
|
||
| ### Create Custom Roles with the API | ||
|
|
||
| <!-- Need more information here. --> | ||
|
|
||
| ### Create Custom Roles with Terraform | ||
|
|
||
| <!-- Need more information here. --> | ||
|
|
||
| ## Assigning Custom Roles to users | ||
|
|
||
| Once you have created a Custom Role, it is available on the Identities page to assign to a user | ||
| or group, the same as the pre-defined Temporal permissions. See [How to update an account-level role in Temporal Cloud](/cloud/users#update-roles) | ||
| for more inforamtion. | ||
|
|
||
| ## Available permissions | ||
|
|
||
| Most of the Control Plane operations listed in the API references ([HTTP](https://saas-api.tmprl.cloud/docs/httpapi.html#description/introduction), | ||
| [GRPC](https://saas-api.tmprl.cloud/docs/grpcapi/)) can be assigned to a Custom Role. | ||
| For the operations that are supported by Custom Roles, you will see the naming specification available next to each API call description. | ||
|
|
||
| The following operations are not available to Custom Roles: | ||
|
|
||
| - Creating an API key or a service account. These operations are part of the pre-defined roles (admin or above) and cannot be assigned to other less-privileged roles. | ||
| - Operations that require additional role and permission validation, such as Create a Nexus Endpoint. | ||
| - Separating or splitting operations that are part of UpdateNamespace. | ||
|
|
||
| ## Modifying a Custom Role | ||
|
|
||
| <!-- Need more information here. --> | ||
|
|
||
| ## Deleting a Custom Role | ||
|
|
||
| <!-- Need more information here. --> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.