-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
55 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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,46 @@ | ||
--- | ||
title: "API keys" | ||
linkTitle: "API keys" | ||
weight: 50 | ||
layout: "docs" | ||
type: "docs" | ||
description: "Run control logic on a machine." | ||
images: ["/general/code.png"] | ||
date: "2024-01-13" | ||
--- | ||
|
||
API keys grant access to organizations, locations, and machines. | ||
|
||
To view all API keys in use for your organization and the locations and machines inside it, click on the organization dropdown in the top navigation bar and click on **Settings**. | ||
|
||
{{<imgproc src="/fleet/api-keys.png" resize="700x" declaredimensions=true alt="API Keys table">}} | ||
|
||
## Add an API key | ||
|
||
On your organization's page, click **Generate key** to generate a new key. | ||
Optionally, give the key a name. | ||
Click on the **Resource** menu and choose what organization, location, or machine you want the key to grant access to. | ||
If you select organization, your key grants access to all locations and machines contained within that organization. | ||
If you select location, your key grants access to all of the machines contained within that location. | ||
|
||
For **Role**, assign either an **Owner** or **Operator** role. | ||
See [Permissions](/manage/manage/rbac/) for information about the privilege each role entails at each resource level. | ||
|
||
## Change an API key's access | ||
|
||
To edit an API key, click on **Show details** in the key's row of the key table's **Resources** column. | ||
|
||
{{<imgproc src="/fleet/additional-details.png" resize="700x" declaredimensions=true alt="Additional details for a key">}} | ||
|
||
To edit the role, click on the dropdown menu next to the role and select **Owner** or **Operator**. | ||
See [Permissions](/manage/manage/rbac/) for information about the privilege each role entails at each resource level. | ||
|
||
To change the entities it is able to access, click **+ Grant additional access**. | ||
Select which organization, location, or machine you want the key to grant access to. | ||
Click **Choose** to confirm your selection. | ||
|
||
## Rotate an API key | ||
|
||
If you ever need to rotate an API key, click on the **Generate Key** button on the organization setting page to generate a new key. | ||
|
||
Viam supports flexible key rotation with up to two keys in use at one time. After generating a new secret key, update all references to the key in your code as soon as possible and then remove the old key. |
This file contains 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
2 changes: 1 addition & 1 deletion
2
static/include/app/apis/overrides/protos/app.GetRobotApiKeys.md
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
Gets the [API keys](/cloud/rbac/#api-keys) for the machine. | ||
Gets the [API keys](/operate/control/api-keys/) for the machine. |
This file contains 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 |
---|---|---|
@@ -1 +1 @@ | ||
Rotate an [API key](/manage/manage/access/#rotate-an-api-key). | ||
Rotate an [API key](/operate/control/api-keys/#rotate-an-api-key). |
This file contains 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