Skip to content
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

github oauth configuration guide for admins #342

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/pages/kb/open-source/admin-guide/env-vars-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ The follow is a list of settings and what they control:
| `REDASH_MULTI_ORG` | | false |
| `REDASH_GOOGLE_CLIENT_ID` | | |
| `REDASH_GOOGLE_CLIENT_SECRET` | | |
| `REDASH_GITHUB_CLIENT_ID` | | |
| `REDASH_GITHUB_CLIENT_SECRET` | | |
| `REDASH_REMOTE_USER_LOGIN_ENABLED` | | false |
| `REDASH_REMOTE_USER_HEADER` | | X-Forwarded-Remote-User |
| `REDASH_LDAP_LOGIN_ENABLED` | | false |
Expand Down
23 changes: 23 additions & 0 deletions src/pages/kb/open-source/admin-guide/github-application-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
category: admin-guide
parent_category: open-source
title: How to Create a Github Application
slug: github-application-setup
---

1. Sign into the Github and open Developer settings / OAuth Apps.
2. Likely you will need to create a new application in Github, so click [`New OAuth App`](https://github.com/settings/applications/new).
![Create new application](/assets/images/docs/github_oauth_1.png)
3. Give your application a name, like "Redash",
In the Authorized redirect URIs section, put the address of your Redash instance suffixed by `/oauth/github_callback` (i.e. `https://redash.acme.com/oauth/github_callback`).
Click create.
![Give application name](/assets/images/docs/github_oauth_2.png)

4. Copy your client ID and secret.
![Copy Client ID and Secret](/assets/images/docs/github_oauth_3.png)

5. Add the following to your environment variables (`.env` file or Docker
configuration):

- `REDASH_GITHUB_CLIENT_ID`: Github client Id. **[Required]**
- `REDASH_GITHUB_CLIENT_SECRET`: Github client secret. **[Required]**
11 changes: 11 additions & 0 deletions src/pages/kb/open-source/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ Once updated, restart the web server (`docker-compose up -d server`). Once enabl

![](/assets/images/docs/redash_google_oauth_domain.png)

### Github OAuth Setup

If you want to use Github OAuth to authenticate users, you need to create a Github application (see [instructions]({% link _kb/open-source/admin-guide/github-application-setup.md %}) and then add the needed configuration in the `/opt/redash/env` file:

* `REDASH_GITHUB_CLIENT_ID` (Github OAuth Client ID)
* `REDASH_GITHUB_CLIENT_SECRET` (Github OAuth Client Secret)

Once updated, restart the web server (`docker-compose up -d server`). Once enabled, Redash will use Github OAuth to authenticate _existing_ user accounts. To enable automatic user creation who belong to a specific domain name, you can add this domain (or more) in the setting page:

![](/assets/images/docs/redash_github_oauth_domain.png)

### Other Configuration Options

Redash uses environment variables for configuration. For a full list of environment variables, see the [settings article]({% link _kb/open-source/admin-guide/env-vars-settings.md %}).
Expand Down
4 changes: 3 additions & 1 deletion src/pages/kb/user-guide/users/authentication-options.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
category: users
parent_category: user-guide
title: Authentication Options (SSO, Google OAuth, SAML)
title: Authentication Options (SSO, Google OAuth, Github OAuth, SAML)
slug: authentication-options
---

Expand All @@ -17,6 +17,8 @@ There are 3 authentication related settings here:

1. Enable/disable password based login.
2. Google SSO: add Google Apps based domains to allow login from. Any user with a Google account from these domain(s) will be able to login. If they don't have an account yet, an account will be automatically created.

Github SSO: add email domains to allow login from. Any user with a github account from these domain(s) will be able to login.
3. Enable/disable SAML support.

Once you enable SAML, additional settings will appear:
Expand Down
Binary file added static/assets/images/docs/github_oauth_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/docs/github_oauth_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/images/docs/github_oauth_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.