forked from rancher/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
58a9bdd
commit ef98fd8
Showing
6 changed files
with
496 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Auth Providers | ||
|
||
## Github | ||
|
||
### Developer Set up | ||
Follow the in-dashboard instructions when configuring a Github auth provider. | ||
|
||
### Multiple GitHub auth configs | ||
The auth system supports multiple GitHub auth URLs and using the appropriate one based on the Host header that a request comes in on. Configuring this is not exposed in the regular UI, but is particularly useful for development against a server that already has GitHub setup. | ||
|
||
In `management.cattle.io.authconfig`, edit the `github` entry. Add a `hostnameToClientId` map of Host header value -> GitHub client ID: | ||
|
||
```yaml | ||
hostnameToClientId: | ||
"localhost:8005": <your GitHub Client ID for localhost:8005> | ||
``` | ||
In the `secret`, namespace `cattle-global-data`, edit `githubconfig-clientsecret`. Add GitHub client ID -> base64-encoded client secret to the `data` section: | ||
|
||
```yaml | ||
data: | ||
clientsecret: <the normal client secret already configured> | ||
<your client id>: <your base64-encoded client secret for localhost:8005> | ||
``` | ||
|
||
## Keycloak | ||
|
||
### Developer Set Up | ||
Use the steps below to set up a Keycloak instance for dev environments and configure an Auth Provider for it. | ||
|
||
1. Bring up a local Keycloak instance in docker using the instructions at [here](https://www.keycloak.org/getting-started/getting-started-docker). | ||
|
||
> Ensure that the admin user has a first name, last name and email. These fields are referenced in the Keycloak client's mappers which are then referenced in the Rancher's auth provider config. | ||
|
||
> Double check the client has the correct checkboxes set, specifically the Mappers `group` entry. | ||
1. Using either the Ember or Vue UI set up the Keycloak auth provider by follow the instructions at [here](https://rancher.com/docs/rancher/v2.x/en/admin-settings/authentication/keycloak/) | ||
| Field | Value | | ||
|-------|-------| | ||
| Display Name Field | givenName | | ||
| User Name Field | email | | ||
| UID Field | email | | ||
| Groups Field| member | | ||
| Entity ID Field| Depending on Rancher API Url. For instance when running Dashboard locally `https://192.168.86.26:8005/v1-saml/keycloak/saml/metadata` | | ||
| Rancher API Host | Depending on Rancher API Url. For instance when running Dashboard locally `https://192.168.86.26:8005/`| | ||
| Private Key | For key and cert files, export the Client in the Keycloak UI via the `Clients` list page and extract & wrap the `saml.signing.certificate` and `saml.signing.private.key` as cert files (see [step 5](https://gist.github.com/PhilipSchmid/506b33cd74ddef4064d30fba50635c5b) for more info). | | ||
| Certificate | See Private Key section above| | ||
| Metadata | For the SAML Metadata, export the Client in the Keycloack UI via the `Installation` tab as `SAML Metadata SPSSODescriptor` and then follow the `NOTE` instructions regarding `EntitiesDescriptor` and `EntityDescriptor`. For a better set of instructions see [step 6](https://gist.github.com/PhilipSchmid/506b33cd74ddef4064d30fba50635c5b)| | ||
|
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,11 @@ | ||
# Getting Started | ||
|
||
This guide is intended for developers new to Rancher and the Dashboard. It will be expanded over time and we welcome contributions. | ||
|
||
First take some time to understand the [README](../../../README.md). This covers a lot of useful information that this document references and supplements. It's helpful reviewing the `README` once again after experience is gained and concepts are more familiar. | ||
|
||
## Contents | ||
|
||
1. [Terminology](./terminology.md) | ||
1. [Development Environment](./development_environment.md) | ||
1. [Development](./development.md) |
Oops, something went wrong.