mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-24 20:18:18 +00:00
updates per Denise's feedback
This commit is contained in:
@@ -10,6 +10,6 @@ Before you can use the Rancher CLI or write a program that calls the Rancher API
|
||||
|
||||
### API Keys and User Authentication
|
||||
|
||||
After logging into Rancher, you can generate API keys for accessing Rancher externally using your user settings. Typically, you should assign API keys to an application or a project. Using API keys for authentication is more secure than using passwords. If you need to revoke access to the Rancher API, you can delete the API key.
|
||||
After logging into Rancher, you can generate API keys for accessing Rancher externally using your user settings. If you need to revoke access to the Rancher API, you can delete the API key.
|
||||
|
||||
For instructions on how to create an API key, see [Creating an API Key]({{< baseurl >}}/rancher/v2.x/en/tasks/miscellaneous/).
|
||||
|
||||
+9
-9
@@ -1,7 +1,9 @@
|
||||
---
|
||||
title: Miscellaneous Tasks
|
||||
title: Creating an API Key
|
||||
weight: 3725
|
||||
draft: true
|
||||
alias:
|
||||
-/rancher/v2.x/en/tasks/miscellaneous
|
||||
---
|
||||
<!-- Coming Soon
|
||||
|
||||
@@ -9,31 +11,29 @@ draft: true
|
||||
|
||||
Coming Soon -->
|
||||
|
||||
Because sometimes there's just no logical place `¯\_(ツ)_/¯`.
|
||||
|
||||
### Creating an API Key
|
||||
|
||||
Create a Rancher API key so that other applications can make requests to the Rancher API. You can create API keys using the Rancher UI.
|
||||
|
||||
1. From any Rancher view, select **User Avatar** > **API & Keys** from the menu on the upper-right.
|
||||
|
||||
2. Click **Add Key**.
|
||||
|
||||
3. **Optional:** Enter a description for the API key and select an expiration period.
|
||||
3. **Optional:** Enter a description for the API key and select an expiration period. We recommend setting an expiration date.
|
||||
|
||||
Shorter expiration periods are more secure.
|
||||
The API key won't be valid after expiration. Shorter expiration periods are more secure.
|
||||
|
||||
4. Click **Create**.
|
||||
|
||||
**Step Result:** Your API Key is created. Your API **Endpoint**, **Access Key**, **Secret Key**, and **Bearer Token** are displayed. The **Bearer Token** is your **Access Key** and **Secret Key** concatenated together.
|
||||
|
||||
Use the **Bearer Token** to authenticate with Rancher CLI.
|
||||
|
||||
5. Copy the information displayed to a secure location. This information is only displayed once, so if you lose your key, you'll have to make a new one.
|
||||
|
||||
### Deleting API Keys
|
||||
|
||||
As a security best practice, we recommend using the minimum viable expiration period. You should delete API keys:
|
||||
You should delete API keys:
|
||||
|
||||
- That have expired.
|
||||
- That may have been compromised.
|
||||
- That have expired.
|
||||
|
||||
To delete an API, select the stale key and click **Delete**.
|
||||
Reference in New Issue
Block a user