From d085c7ebc0add4a3c343bb5d4c1239a52f55b072 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Thu, 7 Jun 2018 19:12:14 -0700 Subject: [PATCH 1/3] formatting api key content --- .../v2.x/en/concepts/api-keys/_index.md | 18 +++------- .../v2.x/en/tasks/miscellaneous/_index.md | 35 ++++++++++++++++--- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/content/rancher/v2.x/en/concepts/api-keys/_index.md b/content/rancher/v2.x/en/concepts/api-keys/_index.md index bf3777cb822..9b1e8e84f75 100644 --- a/content/rancher/v2.x/en/concepts/api-keys/_index.md +++ b/content/rancher/v2.x/en/concepts/api-keys/_index.md @@ -4,22 +4,12 @@ weight: 2400 draft: true --- -## API Keys +Some users may want to access their Rancher clusters and projects through the Rancher API. Before you can access Rancher through the API, you must generate API keys so that you can authenticate with Rancher externally. -Access to the Rancher API requires API keys. You need to first obtain API keys before you can use the Rancher CLI or write a program to call the Rancher API. +Before you can use the Rancher CLI or write a program that calls the Rancher API, you must obtain API keys using the Rancher UI. ### API Keys and User Authentication -After loggin in, authenticated user can generate API keys for accessing Rancher later on. API keys are typically assigned to an application or a project. It is safer to distribute API keys than passwords. The user can revoke access by deleting the API key. +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. -### API Key Creation - -You can create an API key from the UI by clicking the user icon on the top right corner and selecting the "API & Keys" menu item. - -1. Click the "Add Key" button on the top of the page. -2. Provide a description of the API key and select an expiration period. For maximum security select as short an expiration period as possible. -3. Click "Create" and you will see the API endpoint, access key, secret key, and the bearer token printed on the screen. Bearer token is simply a concatenation of access key and secret key. You need to take note of the information on this screen. Once the screen is dismissed, you will not be able to recover the tokens and keys. - -### Delete API Keys - -A good practice is to set expiration period as short as possible. You can always delete API keys you no longer need or have been compromised. +For instructions on how to create an API key, see [Creating an API Key]({{< baseurl >}}/rancher/v2.x/en/tasks/miscellaneous/). diff --git a/content/rancher/v2.x/en/tasks/miscellaneous/_index.md b/content/rancher/v2.x/en/tasks/miscellaneous/_index.md index 526c54f9de2..01723b339f9 100644 --- a/content/rancher/v2.x/en/tasks/miscellaneous/_index.md +++ b/content/rancher/v2.x/en/tasks/miscellaneous/_index.md @@ -1,14 +1,39 @@ --- -title: Miscellaneous +title: Miscellaneous Tasks weight: 3725 draft: true --- -Coming Soon + -## Creating an API Key +Because sometimes there's just no logical place `¯\_(ツ)_/¯`. -Coming Soon +### 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. + + 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. + +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: + +- That have expired. +- That may have been compromised. + +To delete an API, select the stale key and click **Delete**. \ No newline at end of file From bcd13c593dddd2c51dfa1ee8d9bfc11c5e53083b Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Fri, 8 Jun 2018 13:12:46 -0700 Subject: [PATCH 2/3] updates per Denise's feedback --- .../v2.x/en/concepts/api-keys/_index.md | 2 +- .../tasks/{miscellaneous => api-key}/_index.md | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) rename content/rancher/v2.x/en/tasks/{miscellaneous => api-key}/_index.md (75%) diff --git a/content/rancher/v2.x/en/concepts/api-keys/_index.md b/content/rancher/v2.x/en/concepts/api-keys/_index.md index 9b1e8e84f75..0f09c8a73ac 100644 --- a/content/rancher/v2.x/en/concepts/api-keys/_index.md +++ b/content/rancher/v2.x/en/concepts/api-keys/_index.md @@ -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/). diff --git a/content/rancher/v2.x/en/tasks/miscellaneous/_index.md b/content/rancher/v2.x/en/tasks/api-key/_index.md similarity index 75% rename from content/rancher/v2.x/en/tasks/miscellaneous/_index.md rename to content/rancher/v2.x/en/tasks/api-key/_index.md index 01723b339f9..35f00169b37 100644 --- a/content/rancher/v2.x/en/tasks/miscellaneous/_index.md +++ b/content/rancher/v2.x/en/tasks/api-key/_index.md @@ -1,7 +1,9 @@ --- -title: Miscellaneous Tasks +title: Creating an API Key weight: 3725 draft: true +alias: + -/rancher/v2.x/en/tasks/miscellaneous --- -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**. \ No newline at end of file From a4be0e77f255ef48eb3cf97b89faf4f8417d4b82 Mon Sep 17 00:00:00 2001 From: Mark Bishop Date: Fri, 8 Jun 2018 13:54:35 -0700 Subject: [PATCH 3/3] added new section for user settings menu. Added node-template management placeholder --- content/rancher/v2.x/en/tasks/user-settings/_index.md | 6 ++++++ .../v2.x/en/tasks/{ => user-settings}/api-key/_index.md | 7 ------- .../v2.x/en/tasks/user-settings/node-templates/_index.md | 6 ++++++ 3 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 content/rancher/v2.x/en/tasks/user-settings/_index.md rename content/rancher/v2.x/en/tasks/{ => user-settings}/api-key/_index.md (91%) create mode 100644 content/rancher/v2.x/en/tasks/user-settings/node-templates/_index.md diff --git a/content/rancher/v2.x/en/tasks/user-settings/_index.md b/content/rancher/v2.x/en/tasks/user-settings/_index.md new file mode 100644 index 00000000000..e9c127b9fdd --- /dev/null +++ b/content/rancher/v2.x/en/tasks/user-settings/_index.md @@ -0,0 +1,6 @@ +--- +title: User Settings +weight: 3725 +--- + +Within Rancher, each user has a number of settings associated with their login: personal preferences, API keys, etc. You can configure these settings by choosing from the **User Settings** menu. You can open this menu by clicking your avatar, located within the main menu. \ No newline at end of file diff --git a/content/rancher/v2.x/en/tasks/api-key/_index.md b/content/rancher/v2.x/en/tasks/user-settings/api-key/_index.md similarity index 91% rename from content/rancher/v2.x/en/tasks/api-key/_index.md rename to content/rancher/v2.x/en/tasks/user-settings/api-key/_index.md index 35f00169b37..c1883de49d0 100644 --- a/content/rancher/v2.x/en/tasks/api-key/_index.md +++ b/content/rancher/v2.x/en/tasks/user-settings/api-key/_index.md @@ -2,14 +2,7 @@ title: Creating an API Key weight: 3725 draft: true -alias: - -/rancher/v2.x/en/tasks/miscellaneous --- - 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. diff --git a/content/rancher/v2.x/en/tasks/user-settings/node-templates/_index.md b/content/rancher/v2.x/en/tasks/user-settings/node-templates/_index.md new file mode 100644 index 00000000000..5feebac55ad --- /dev/null +++ b/content/rancher/v2.x/en/tasks/user-settings/node-templates/_index.md @@ -0,0 +1,6 @@ +--- +title: Managing Node Templates +weight: 3725 +draft: true +--- +