docs: add grafana integration docs

This commit is contained in:
Jens Langhammer 2020-12-29 20:38:38 +01:00
parent 7a403613b2
commit bbd0ff24d8
5 changed files with 74 additions and 7 deletions

View File

@ -0,0 +1,66 @@
---
title: Grafana
---
## What is Grafana
From https://en.wikipedia.org/wiki/Grafana
:::note
Grafana is a multi-platform open source analytics and interactive visualization web application. It provides charts, graphs, and alerts for the web when connected to supported data sources, Grafana Enterprise version with additional capabilities is also available. It is expandable through a plug-in system.
:::
## Preparation
The following placeholders will be used:
- `grafana.company` is the FQDN of the Grafana install.
- `authentik.company` is the FQDN of the authentik install.
Create an application in authentik. Create an OAuth2/OpenID provider with the following parameters:
- Client Type: `Confidential`
- JWT Algorithm: `RS256`
- Scopes: OpenID, Email and Profile
- RSA Key: Select any available key
- Redirect URIs: `https://grafana.company/login/generic_oauth`
Note the Client ID and Client Secret values. Create an application, using the provider you've created above. Note the slug of the application you've created.
## Grafana
If your Grafana is running in docker, set the following environment variables:
```yaml
environment:
GF_AUTH_GENERIC_OAUTH_ENABLED: "true"
GF_AUTH_GENERIC_OAUTH_NAME: "authentik"
GF_AUTH_GENERIC_OAUTH_CLIENT_ID: "<Client ID from above>"
GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET: "<Client Secret from above>"
GF_AUTH_GENERIC_OAUTH_SCOPES: "openid profile email"
GF_AUTH_GENERIC_OAUTH_AUTH_URL: "https://authentik.company/application/o/authorize/"
GF_AUTH_GENERIC_OAUTH_TOKEN_URL: "https://authentik.company/application/o/token/"
GF_AUTH_GENERIC_OAUTH_API_URL: "https://authentik.company/application/o/userinfo/"
GF_AUTH_SIGNOUT_REDIRECT_URL: "https://authentik.company/application/o/<Slug of the application from above>/end-session/"
# Optionally enable auto-login
GF_AUTH_OAUTH_AUTO_LOGIN: "true"
```
If you are using a config-file instead, you have to set these options:
```ini
[auth]
signout_redirect_url = https://authentik.company/application/o/<Slug of the application from above>/end-session/
# Optionally enable auto-login
oauth_auto_login = true
[auth.generic_oauth]
name = authentik
enabled = true
client_id = <Client ID from above>
client_secret = <Client Secret from above>
scopes = openid email profile
auth_url = https://authentik.company/application/o/authorize/
token_url = https://authentik.company/application/o/token/
api_url = https://authentik.company/application/o/userinfo/
```

View File

@ -17,13 +17,14 @@ The following placeholders will be used:
- `harbor.company` is the FQDN of the Harbor install. - `harbor.company` is the FQDN of the Harbor install.
- `authentik.company` is the FQDN of the authentik install. - `authentik.company` is the FQDN of the authentik install.
Create an application in authentik. Create an OpenID provider with the following parameters: Create an OAuth2/OpenID provider with the following parameters:
- Client Type: `Confidential` - Client Type: `Confidential`
- Response types: `code (Authorization Code Flow)`
- JWT Algorithm: `RS256` - JWT Algorithm: `RS256`
- Redirect URIs: `https://harbor.company/c/oidc/callback` - Redirect URIs: `https://harbor.company/c/oidc/callback`
- Scopes: `openid` - Scopes: OpenID, Email and Profile
Note the Client ID and Client Secret values. Create an application, using the provider you've created above.
## Harbor ## Harbor

View File

@ -51,12 +51,11 @@ Under _Sources_, click _Edit_ and ensure that "Autogenerated Active Directory Ma
### Step 3 ### Step 3
Under _Providers_, create an OAuth2/OpenID Provider with these settings: Under _Providers_, create an OAuth2/OpenID provider with these settings:
- Client Type: Confidential - Client Type: Confidential
- JWT Algorithm: RS256 - JWT Algorithm: RS256
- Redirect URI: `https://vcenter.company/ui/login/oauth2/authcode` - Redirect URI: `https://vcenter.company/ui/login/oauth2/authcode`
- Post Logout Redirect URIs: `https://vcenter.company/ui/login`
- Sub Mode: If your Email address Schema matches your UPN, select "Based on the User's Email...", otherwise select "Based on the User's UPN...". - Sub Mode: If your Email address Schema matches your UPN, select "Based on the User's Email...", otherwise select "Based on the User's UPN...".
- Scopes: Select the Scope Mapping you've created in Step 1 - Scopes: Select the Scope Mapping you've created in Step 1

View File

@ -101,6 +101,7 @@ module.exports = {
"integrations/services/aws/index", "integrations/services/aws/index",
"integrations/services/awx-tower/index", "integrations/services/awx-tower/index",
"integrations/services/gitlab/index", "integrations/services/gitlab/index",
"integrations/services/grafana/index",
"integrations/services/harbor/index", "integrations/services/harbor/index",
"integrations/services/home-assistant/index", "integrations/services/home-assistant/index",
"integrations/services/nextcloud/index", "integrations/services/nextcloud/index",

View File

@ -121,8 +121,8 @@ function Home() {
<h2>Utmost flexibility</h2> <h2>Utmost flexibility</h2>
<p> <p>
You can adopt authentik to your environment, You can adopt authentik to your environment,
regardless of your requirements. Need an Active- regardless of your requirements. Need an Active-Directory
Directory integrated SSO Provider? Do you want integrated SSO Provider? Do you want
to implement a custom enrollment process for your to implement a custom enrollment process for your
customers? Are you developing an application and customers? Are you developing an application and
don't want to deal with User verification and recovery? don't want to deal with User verification and recovery?