moved authentication tasks and concepts to new folder, added aliases to index.md, deleted old folders

This commit is contained in:
Mark Bishop
2018-07-16 15:18:16 -07:00
parent a4de81281e
commit cd53d2e045
19 changed files with 473 additions and 42 deletions
@@ -0,0 +1,57 @@
---
title: Authentication
weight: 10
---
One of the key features that Rancher adds to Kubernetes is centralized user authentication. This feature allows your users to use one set of credentials to authenticate with any of your Kubernetes clusters.
This centralized user authentication is accomplished using the Rancher authentication proxy, which is installed along with the rest of Rancher. This proxy authenticates your users and forwards their requests to your Kubernetes clusters using a service account.
<!-- todomark add diagram -->
### External vs. Local Authentication
The Rancher authentication proxy integrates with the following external authentication services.
- Microsoft Active Directory
- Microsoft Azure AD
- GitHub
- FreeIPA
- OpenLDAP
However, Rancher also provides local authentication.
In most cases, you should use an external authentication service over local, as external authentication allows user management from a central location. However, you may want a few local authentication users for managing Rancher under rare circumstances, such as if Active Directory is down.
For more information on how to configure external authentication or local authentication, see [Authentication](../../../tasks/global-configuration/authentication/).
### External Authentication Configuration and Principal Users
Configuration of external authentication requires:
- A local user assigned the administrator role, called hereafter the _local principal_.
- An external user that can authenticate with your external authentication service, called hereafter the _external principal_.
Configuration of external authentication affects how principal users are managed within Rancher. Follow the list below to better understand these effects.
1. Sign into Rancher as the local principal and complete configuration of external authentication.
![Sign In]({{< baseurl >}}/img/rancher/sign-in.png)
2. Rancher associates the external principal with the local principal. These two users share the local principal's user ID.
![Principal ID Sharing]({{< baseurl >}}/img/rancher/principal-ID.png)
3. After you complete configuration, Rancher automatically signs out the local principal.
![Sign Out Local Principal]({{< baseurl >}}/img/rancher/sign-out-local.png)
4. Then, Rancher automatically signs you back in as the external principal.
![Sign In External Principal]({{< baseurl >}}/img/rancher/sign-in-external.png)
5. Because the external principal and the local principal share an ID, no unique object for the external principal displays on the Users page.
![Sign In External Principal]({{< baseurl >}}/img/rancher/users-page.png)
6. The external principal and the local principal share the same access rights.
@@ -2,5 +2,5 @@
title: Authentication
weight: 25
aliases:
-/rancher/v2.x/en/concepts/global-configuration/authentication/
---
@@ -0,0 +1,52 @@
---
title: Configuring Active Directory (AD)
weight: 51
---
In environments using Microsoft Active Directory (AD), you can configure Rancher to allow sign on using AD credentials.
>**Prerequisites:**
>
>- Have an Active Directory server configured.
>- Create a service account in Active Directory with `read-only` access. Rancher uses this account to verify group membership when a user makes a request using an API key.
>- Read [External Authentication Configuration and Principal Users]({{< baseurl >}}/rancher/v2.x/en/concepts/global-configuration/authentication/#external-authentication-configuration-and-principal-users).
1. Sign into Rancher using a local user assigned `administrator` global permissions (i.e., the _local principal_).
2. From the **Global** view, select **Security > Authentication** from the main menu.
3. Select **Active Directory**.
4. Complete the **Configure an Active Directory server** form.
You may need to log in to your domain controller to find the information requested in the form.
>**Using TLS?**
>If the certificate is self-signed or not from a recognized certificate authority, make sure you provide the complete chain. That chain is needed to verify the server's certificate.
<br/>
<br/>
>**User Search Base vs. Group Search Base**
>
>Search base allows Rancher to search for users and groups that are in your Active Directory. These fields are only for search bases and not for search filters.
>
>* If your users and groups are in the same search base, complete only the User Search Base.
>* If your groups are in a different search base, you can optionally complete the Group Search Base. This field is dedicated to searching groups, but is not required.
5. If your Active Directory deviates from the standard AD schema, complete the **Customize Schema** form to match it. Otherwise, skip this step.
>**Search Attribute** As of Rancher v2.0.1, the Search Attribute field defaults with three specific values: `sAMAccountName|sn|givenName`. After AD is configured, when a user enters text to add users or groups, Rancher automatically queries the AD server and attempts to match fields by sAMAccountName, last name, or first name. Rancher specifically searches for users/groups that begin with the text entered in the search field.
>
>The default field value `sAMAccountName|sn|givenName`, but you can configure this field to a subset of these fields. The pipe (`|`) between the fields separates these fields.
>
> * `sAMAccountName`: Username
> * `sn`: Last Name
> * `givenName`: First Name
>
> With this search attribute, Rancher creates search filters for users and groups, but you *cannot* add your own search filters in this field.
6. Enter your AD username and password in **Authenticate with Active Directory** to confirm that Rancher is configured to use AD authentication.
**Result:**
- Active Directory authentication is configured.
- You are signed into Rancher with your Active Directory account (i.e., the _external principal_).
@@ -1,6 +0,0 @@
---
title: Configuring Active Directory
weight: 50
aliases:
---
@@ -0,0 +1,188 @@
---
title: Configuring Azure Active Directory (Azure AD)
weight: 52
---
_Available as of v2.0.3_
If you have an instance of Active Directory (AD) hosted in Azure, you can configure Rancher to allow your users to log in using their AD accounts. Configuration of Azure AD external authentication requires you to make configurations in both Azure and Rancher.
>**Prerequisite:** Have an instance of Azure AD configured.
>**Note:** Most of this procedure, with the exception of [Configure Azure AD in Rancher](#configure-azure-ad-in-rancher), takes place from the [Microsoft Azure Portal](https://portal.azure.com/).
## Azure Active Directory Configuration Outline
Configuring Rancher to allow your users to authenticate with their Azure AD accounts involves multiple procedures. Review the outline below before getting started.
<a id="tip"></a>
>**Tip:** Before you start, we recommend creating an empty text file. You can use this file to copy values from Azure that you'll paste into Rancher later.
1. [Register Rancher with Azure](#1-register-rancher-with-azure)
Before enabling Azure AD within Rancher, you must register Rancher with Azure.
1. [Create an Azure API Key](#2-create-an-azure-api-key)
From the Azure portal, create an API key. Rancher will use this key to authenticate with AD.
1. [Set Required Permissions for Rancher](#3-set-required-permissions-for-rancher)
Next, set API permissions for Rancher within Azure.
1. [Copy Azure Application Data](#4-copy-azure-application-data)
As your final step in Azure, copy the data that you'll use to configure Rancher for Azure AD authentication.
1. [Configure Azure AD in Rancher](#5-configure-azure-ad-in-rancher)
From the Rancher UI, enter information about your AD instance hosted in Azure to complete configuration.
### 1. Register Rancher with Azure
Before enabling Azure AD within Rancher, you must register Rancher with Azure.
1. Log in to [Microsoft Azure](https://portal.azure.com/) as an administrative user. Configuration in future steps requires administrative access rights.
1. Use search to open the **App registrations** service.
![Open App Registrations]({{< baseurl >}}/img/rancher/search-app-registrations.png)
1. Click **New application registration** and complete the **Create** form.
![New App Registration]({{< baseurl >}}/img/rancher/new-app-registration.png)
1. Enter a **Name** (something like `Rancher`).
1. From **Application type**, make sure that **Web app / API** is selected.
1. In the **Sign-on URL** field, enter the URL of your Rancher Server.
1. Click **Create**.
### 2. Create an Azure API Key
From the Azure portal, create an API key. Rancher will use this key to authenticate with Azure AD.
1. Use search to open **App registrations** services. Then open the entry for Rancher that you created in the last procedure.
![Open Rancher Registration]({{< baseurl >}}/img/rancher/open-rancher-app.png)
**Step Result:** A new blade opens for Rancher.
1. Click **Settings**.
1. From the **Settings** blade, select **Keys**.
1. From **Passwords**, create an API key.
1. Enter a **Key description** (something like `Rancher`).
1. Select a **Duration** for the key. This drop-down sets the expiration date for the key. Shorter durations are more secure, but require you to create a new key after expiration.
1. Click **Save** (you don't need to enter a value—it will automatically populate after you save).
<a id="secret"></a>
1. Copy the key value and save it to an [empty text file](#tip).
You'll enter this key into the Rancher UI later as your **Application Secret**.
You won't be able to access the key value again within the Azure UI.
### 3. Set Required Permissions for Rancher
Next, set API permissions for Rancher within Azure.
1. From the **Settings** blade, select **Required permissions**.
![Open Required Permissions]({{< baseurl >}}/img/rancher/select-required-permissions.png)
1. Click **Windows Azure Active Directory**.
1. From the **Enable Access** blade, select the following **Delegated Permissions**:
<br/>
<br/>
- **Access the directory as the signed-in user**
- **Read directory data**
- **Read all groups**
- **Read all users' full profiles**
- **Read all users' basic profiles**
- **Sign in and read user profile**
1. Click **Save**.
1. From **Required permissions**, click **Grant permissions**. Then click **Yes**.
>**Note:** You must be signed in as an Azure administrator to successfully save your permission settings.
### 4. Copy Azure Application Data
As your final step in Azure, copy the data that you'll use to configure Rancher for Azure AD authentication and paste it into an empty text file.
1. Obtain your Rancher **Tenant ID**.
1. Use search to open the **Azure Active Directory** service.
![Open Azure Active Directory]({{< baseurl >}}/img/rancher/search-azure-ad.png)
1. From the **Azure Active Directory** menu, open **Properties**.
2. Copy the **Directory ID** and paste it into your [text file](#tip).
You'll paste this value into Rancher as your **Tenant ID**.
1. Obtain your Rancher **Application ID**.
1. Use search to open **App registrations**.
![Open App Registrations]({{< baseurl >}}/img/rancher/search-app-registrations.png)
1. Find the entry you created for Rancher.
1. Copy the **Application ID** and paste it to your [text file](#tip).
1. Obtain your Rancher **Graph Endpoint**, **Token Endpoint**, and **Auth Endpoint**.
1. From **App registrations**, click **Endpoints**.
![Click Endpoints]({{< baseurl >}}/img/rancher/click-endpoints.png)
2. Copy the following endpoints to your clipboard and paste them into your [text file](#tip) (these values will be your Rancher endpoint values).
- **Microsoft Azure AD Graph API Endpoint** (Graph Endpoint)
- **OAuth 2.0 Token Endpoint** (Token Endpoint)
- **OAuth 2.0 Authorization Endpoint** (Auth Endpoint)
### 5. Configure Azure AD in Rancher
From the Rancher UI, enter information about your AD instance hosted in Azure to complete configuration.
Enter the values that you copied to your [text file](#tip).
1. Log into Rancher. From the **Global** view, select **Security > Authentication**.
1. Select **Azure AD**.
1. Complete the **Configure Azure AD Account** form using the information you copied while completing [Copy Azure Application Data](#4-copy-azure-application-data).
>**Important:** When entering your Graph Endpoint, remove the tenant ID from the URL, like below.
>
>https://graph.windows.net/<del>abb5adde-bee8-4821-8b03-e63efdc7701c</del>
The following table maps the values you copied in the Azure portal to the fields in Rancher. ~~~~
Rancher Field | Azure Value
---------|----------
Tenant ID | Directory ID
Application ID | Application ID
Application Secret | Key Value
Endpoint | https://login.microsoftonline.com/
Graph Endpoint | Microsoft Azure AD Graph API Endpoint
Token Endpoint | OAuth 2.0 Token Endpoint
Auth Endpoint | OAuth 2.0 Authorization Endpoint
1. Click **Authenticate with Azure**.
**Result:** Azure Active Directory authentication is configured.
@@ -2,5 +2,5 @@
title: Configuring Azure AD
weight: 75
aliases:
-/rancher/v2.x/en/tasks/global-configuration/authentication/azure-ad/
---
@@ -1,6 +0,0 @@
---
title: Configuring Azure AD
weight: 75
aliases:
---
@@ -0,0 +1,54 @@
---
title: Configuring FreeIPA
weight: 55
---
_Available as of v2.0.5_
If your organization uses FreeIPA for user authentication, you can configure Rancher to allow your users to login using their FreeIPA credentials.
>**Prerequisites:**
>
>- You must have a [FreeIPA Server](https://www.freeipa.org/) configured.
>- Create a service account in FreeIPA with `read-only` access. Rancher uses this account to verify group membership when a user makes a request using an API key.
>- Read [External Authentication Configuration and Principal Users]({{< baseurl >}}/rancher/v2.x/en/concepts/global-configuration/authentication/#external-authentication-configuration-and-principal-users).
1. Sign into Rancher using a local user assigned the `administrator` role (i.e., the _local principal_).
2. From the **Global** view, select **Security > Authentication** from the main menu.
3. Select **FreeIPA**.
4. Complete the **Configure an FreeIPA server** form.
You may need to log in to your domain controller to find the information requested in the form.
>**Using TLS?**
>If the certificate is self-signed or not from a recognized certificate authority, make sure you provide the complete chain. That chain is needed to verify the server's certificate.
<br/>
<br/>
>**User Search Base vs. Group Search Base**
>
>Search base allows Rancher to search for users and groups that are in your FreeIPA. These fields are only for search bases and not for search filters.
>
>* If your users and groups are in the same search base, complete only the User Search Base.
>* If your groups are in a different search base, you can optionally complete the Group Search Base. This field is dedicated to searching groups, but is not required.
5. If your FreeIPA deviates from the standard AD schema, complete the **Customize Schema** form to match it. Otherwise, skip this step.
>**Search Attribute** The Search Attribute field defaults with three specific values: `uid|sn|givenName`. After FreeIPA is configured, when a user enters text to add users or groups, Rancher automatically queries the FreeIPA server and attempts to match fields by user id, last name, or first name. Rancher specifically searches for users/groups that begin with the text entered in the search field.
>
>The default field value `uid|sn|givenName`, but you can configure this field to a subset of these fields. The pipe (`|`) between the fields separates these fields.
>
> * `uid`: User ID
> * `sn`: Last Name
> * `givenName`: First Name
>
> With this search attribute, Rancher creates search filters for users and groups, but you *cannot* add your own search filters in this field.
6. Enter your FreeIPA username and password in **Authenticate with FreeIPA** to confirm that Rancher is configured to use FreeIPA authentication.
**Result:**
- FreeIPA authentication is configured.
- You are signed into Rancher with your FreeIPA account (i.e., the _external principal_).
@@ -2,5 +2,5 @@
title: Configuring FreeIPA
weight: 150
aliases:
-/rancher/v2.x/en/tasks/global-configuration/authentication/freeipa/
---
@@ -1,6 +0,0 @@
---
title: Configuring FreeIPA
weight: 150
aliases:
---
@@ -0,0 +1,51 @@
---
title: Configuring GitHub
weight: 53
---
In environments using GitHub, you can configure Rancher to allow sign on using GitHub credentials.
>**Prerequisites:** Read [External Authentication Configuration and Principal Users]({{< baseurl >}}/rancher/v2.x/en/concepts/global-configuration/authentication/#external-authentication-configuration-and-principal-users).
1. Sign into Rancher using a local user assigned the `administrator` role (i.e., the _local principal_).
2. From the **Global** view, select **Security > Authentication** from the main menu.
3. Select **GitHub**.
4. Follow the directions displayed to **Setup a GitHub Application**. Rancher redirects you to GitHub to complete registration.
>**What's an Authorization Callback URL?**
>
>The Authorization Callback URL is the URL where users go to begin using your application (i.e. the splash screen).
>When you use external authentication, authentication does not actually take place in your application. Instead, authentication takes place externally (in this case, GitHub). After this external authentication completes successfully, the Authorization Callback URL is the location where the user re-enters your application.
5. From GitHub, copy the **Client ID** and **Client Secret**. Paste them into Rancher.
>**Where do I find the Client ID and Client Secret?**
>
>From GitHub, select Settings > Developer Settings > OAuth Apps. The Client ID and Client Secret are displayed prominently.
6. Click **Authenticate with GitHub**.
7. Use the **Site Access** options to configure the scope of user authorization.
- **Allow any valid Users**
_Any_ GitHub user can access Rancher. We generally discourage use of this setting!
- **Allow members of Clusters, Projects, plus Authorized Users and Organizations**
Any GitHub user or group added as a **Cluster Member** or **Project Member** can log in to Rancher. Additionally, any GitHub user or group you add to the **Authorized Users and Organizations** list may log in to Rancher.
- **Restrict access to only Authorized Users and Organizations**
Only GitHub users or groups added to the Authorized Users and Organizations can log in to Rancher.
<br/>
8. Click **Save**.
**Result:**
- GitHub authentication is configured.
- You are signed into Rancher with your GitHub account (i.e., the _external principal_).
@@ -2,5 +2,5 @@
title: Configuring GitHub
weight: 100
aliases:
-/rancher/v2.x/en/tasks/global-configuration/authentication/github/
---
@@ -1,6 +0,0 @@
---
title: Configuring GitHub
weight: 100
aliases:
---
@@ -0,0 +1,10 @@
---
title: Configuring Local Authentication
weight: 56
---
Regardless of whether you use external authentication, you should create a few local authentication users so that you can continue using Rancher if you your external authentication service encounters issues.
1. From the **Global** view, select **Users** from the main menu.
2. Click **Add User**. Then complete the **Add User** form. Click **Create** when you're done.
@@ -2,5 +2,5 @@
title: Configuring Local Authentication
weight: 25
aliases:
-/rancher/v2.x/en/tasks/global-configuration/authentication/local-authentication/
---
@@ -1,6 +0,0 @@
---
title: Configuring Local Authentication
weight: 25
aliases:
---
@@ -0,0 +1,55 @@
---
title: Configuring OpenLDAP
weight: 54
---
_Available as of v2.0.5_
If your organization uses OpenLDAP for user authentication, you can configure Rancher to allow your users to login using their OpenLDAP credentials.
>**Prerequisites:**
>
>- You must have an [OpenLDAP Server](https://www.openldap.org/) configured.
>- Create a service account in OpenLDAP with `read-only` access. Rancher uses this account to verify group membership when a user makes a request using an API key.
>- Read [External Authentication Configuration and Principal Users]({{< baseurl >}}/rancher/v2.x/en/concepts/global-configuration/authentication/#external-authentication-configuration-and-principal-users).
1. Sign into Rancher using a local user assigned the `administrator` role (i.e., the _local principal_).
2. From the **Global** view, select **Security > Authentication** from the main menu.
3. Select **OpenLDAP**.
4. Complete the **Configure an OpenLDAP server** form.
You may need to log in to your domain controller to find the information requested in the form.
>**Using TLS?**
>If the certificate is self-signed or not from a recognized certificate authority, make sure you provide the complete chain. That chain is needed to verify the server's certificate.
<br/>
<br/>
>**User Search Base vs. Group Search Base**
>
>Search base allows Rancher to search for users and groups that are in your openLDAP. These fields are only for search bases and not for search filters.
>
>* If your users and groups are in the same search base, complete only the User Search Base.
>* If your groups are in a different search base, you can optionally complete the Group Search Base. This field is dedicated to searching groups, but is not required.
5. If your OpenLDAP deviates from the standard OpenLDAP schema, complete the **Customize Schema** form to match it. Otherwise, skip this step.
>**Search Attribute** The Search Attribute field defaults with three specific values: `uid|sn|givenName`. After openLDAP is configured, when a user enters text to add users or groups, Rancher automatically queries the openLDAP server and attempts to match fields by user id, last name, or first name. Rancher specifically searches for users/groups that begin with the text entered in the search field.
>
>The default field value `uid|sn|givenName`, but you can configure this field to a subset of these fields. The pipe (`|`) between the fields separates these fields.
>
> * `uid`: User ID
> * `sn`: Last Name
> * `givenName`: First Name
>
> With this search attribute, Rancher creates search filters for users and groups, but you *cannot* add your own search filters in this field.
6. Enter your OpenLDAP username and password in **Authenticate with OpenLDAP** to confirm that Rancher is configured to use OpenLDAP authentication.
**Result:**
- OpenLDAP authentication is configured.
- You are signed into Rancher with your OpenLDAP account (i.e., the _external principal_).
@@ -2,5 +2,5 @@
title: Configuring OpenLDAP
weight: 125
aliases:
-/rancher/v2.x/en/tasks/global-configuration/authentication/openLDAP/
---
@@ -1,6 +0,0 @@
---
title: Configuring OpenLDAP
weight: 125
aliases:
---