-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add API key page #3845
Merged
Merged
Add API key page #3845
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we care that this shows the ID without a box over it? Not sure why that would matter without the key but just wondering how much we care about setting precedents and whether readers will wonder whether we meant to include it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this more as showing an example of what the the UI looks like rather than to show exactly where to find the button. So I think it's ok but if you want to add a box, that's fine too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant a redaction box--a solid grey box over the ID. Fine to leave if you're okay with it; just wanted to point it out in case we don't want to do this.