Skip to content

Commit 4cfa295

Browse files
author
Justice
authored
Merge pull request #4009 from replicatedhq/justice/sc-137182/no-api-to-rebind-service-account-to-different
docs(api-tokens): note that service account policy is fixed at creation
2 parents bf25efc + 329643e commit 4cfa295

1 file changed

Lines changed: 16 additions & 29 deletions

File tree

docs/vendor/replicated-api-tokens.md

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ Using the Replicated CLI and Vendor API V3 requires an API token for authorizati
1414

1515
The following types of tokens are available:
1616

17-
- [Service Accounts](#service-accounts)
18-
- [User API Tokens](#user-api-tokens)
17+
- [Service accounts](#service-accounts)
18+
- [User API tokens](#user-api-tokens)
1919

2020
<TeamTokenNote/>
2121

2222
### Service accounts
2323

24-
Service accounts are assigned a token and associated with an RBAC policy. Users with the proper permissions can create, retrieve, or revoke service account tokens. Admin users can assign any RBAC policy to a service account. Non-admin users can only assign their own RBAC policy when they create a service account.
24+
Service accounts are assigned a token and an RBAC policy. Users with the proper permissions can create, view, and revoke service accounts.
2525

2626
Service accounts are useful for operations that are not tied to a particular user, such as CI/CD or integrations.
2727

28-
Updates to a service account's RBAC policy are automatically applied to its associated token. When a service account is removed, its tokens are also invalidated.
28+
When a service account is removed, its tokens are also invalidated.
2929

3030
### User API tokens
3131

@@ -35,44 +35,31 @@ Updates to a user's RBAC role are applied to all of the tokens belonging to that
3535

3636
Revoking a user token immediately invalidates that token. When a user account is deleted, its user tokens are also deleted.
3737

38-
## Generate tokens
38+
## Create a service account
3939

40-
To use the Replicated CLI or the Vendor API v3, you need a User API token or a Service Account token. Existing team API tokens also continue to work.
41-
42-
### Generate a service account
43-
44-
To generate a service account:
45-
46-
1. Log in to the Vendor Portal, and select [**Team > Service Accounts**](https://vendor.replicated.com/team/serviceaccounts).
47-
1. Select **New Service Account**. If one or more service accounts already exist, you can add another by selecting **New Service Account**.
40+
To create a service account:
4841

42+
1. In the Vendor Portal, go to [**Team > Service Accounts**](https://vendor.replicated.com/team/serviceaccounts).
43+
1. Click **Create Service Account**.
4944
1. Edit the fields in the **New Service Account** dialog:
5045

51-
<img alt="New Service Accounts Dialog" src="/images/service-accounts.png" width="400px"/>
52-
53-
[View a larger version of this image](/images/service-accounts.png)
54-
55-
1. For **Nickname**, enter a name the token. Names for service accounts must be unique within a given team.
46+
1. For **Nickname**, enter a name for the service account. Service account names must be unique within the team.
5647

57-
1. For **RBAC**, select the RBAC policy from the dropdown list. The token must have `Admin` access to create new releases.
48+
1. For **RBAC**, select an RBAC policy to assign to the service account. For more information about how to create custom RBAC policies, see [Configure RBAC Policies](team-management-rbac-configuring).
5849

59-
This list includes the Vendor Portal default policies `Admin` and `Read Only`. Any custom policies also display in this list. For more information, see [Configure RBAC Policies](team-management-rbac-configuring).
50+
Note the following:
51+
* Admin users can assign any RBAC policy to a service account. Non-admin users can only assign an RBAC policy with their same level of access to avoid permission elevation.
52+
* After you create a service account, you can't change which RBAC policy is assigned to the service account. If you need to change the RBAC for an existing service account that uses a custom RBAC policy, then you can update the custom RBAC policy itself. Updates to the RBAC policy are automatically applied to the service account's associated token. Or, you can create a new service account and assign it a different RBAC policy.
6053

61-
Users with a non-admin RBAC role cannot select any other RBAC role when creating a token. They are restricted to creating a token with their same level of access to avoid permission elevation.
54+
1. (Optional) Select **Limit to read-only version of above policy** if you selected a custom RBAC policy that has Read/Write permissions but you want to limit this service account to read-only. This option lets you maintain one version of a custom RBAC policy and use it two ways: as read/write and as read-only.
6255

63-
1. (Optional) For custom RBAC policies, select the **Limit to read-only version of above policy** check box to if you want use a policy that has Read/Write permissions but limit this service account to read-only. This option lets you maintain one version of a custom RBAC policy and use it two ways: as read/write and as read-only.
64-
65-
1. Select **Create Service Account**.
56+
1. Click **Create Service Account**.
6657

6758
1. Copy the service account token and save it in a secure location. The token will not be available to view again.
6859

6960
1. (Recommended) Add the token to a Replicated authentication profile. See [Authenticate](/reference/replicated-cli-installing#auth) in _Installing the Replicated CLI_.
7061

71-
:::note
72-
To remove a service account, select **Remove** for the service account that you want to delete.
73-
:::
74-
75-
### Generate a user API token
62+
## Generate a user API token
7663

7764
To generate a user API token:
7865

0 commit comments

Comments
 (0)