Skip to content

Commit 2a5d3e5

Browse files
Update Provider docs for 1.0.0 (#274)
* Add docs for Authentik #253 * Update Authelia guide #254 * Update Pocket ID guide #255
1 parent 3ba65ad commit 2a5d3e5

11 files changed

Lines changed: 170 additions & 93 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<br />
1616
<div align="center">
1717
<a href="https://github.com/christiaangoossens/hass-oidc-auth/">
18-
<img src="logo.png" alt="Logo" width="80" height="80">
18+
<img src="./docs/logo.png" alt="Logo" width="80" height="80">
1919
</a>
2020

2121
<h3 align="center">OpenID Connect for Home Assistant</h3>
@@ -81,6 +81,8 @@ Many configuration options are available through this method, but some advanced
8181
2. Click Add Integration and select **OpenID Connect/SSO Authentication**.
8282
3. Follow the prompts on screen carefully.
8383

84+
![UI Configuration GIF](./docs/ui-config-steps/ui-configuration.gif)
85+
8486
### Configuration by YAML
8587

8688
Alternatively, you can configure the integration using YAML. You can find a full configuration guide for YAML here: [YAML Configuration Guide](./docs/configuration.md).
File renamed without changes.
Lines changed: 53 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# Authelia
22

3-
## Public client configuration
3+
> [!TIP]
4+
> This guide describes configuring Authelia using the UI method. You can also configure Authelia by hand with YAML. Instructions for configuring any provider using YAML can be found here: [YAML Configuration Guide](../configuration.md).
5+
6+
7+
## Step 1. Install the integration
8+
9+
Make sure that you have fully installed the latest release of the integration. The easiest way to install the integration is through [the Home Assistant Community Store (HACS)](https://hacs.xyz/). You can find usage instructions for HACS here: https://hacs.xyz/docs/use/.
10+
11+
After installing HACS, search for "OpenID Connect" in the HACS search box or click the button below:
12+
13+
[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=christiaangoossens&repository=hass-oidc-auth&category=Integration)
14+
15+
## Step 2. Configure Authelia
16+
17+
You can choose between configuring Authelia as a public or confidential client.
18+
19+
### Public client configuration
420

521
> [!NOTE]
622
> This configuration strictly requires a HTTPS redirect uri.
@@ -17,24 +33,11 @@ identity_providers:
1733
public: true
1834
require_pkce: true
1935
pkce_challenge_method: 'S256'
20-
authorization_policy: 'two_factor'
2136
redirect_uris:
2237
- 'https://hass.example.com/auth/oidc/callback'
23-
scopes:
24-
- 'openid'
25-
- 'profile'
26-
- 'groups'
27-
id_token_signed_response_alg: 'RS256'
2838
```
2939
30-
Home Assistant `configuration.yaml`
31-
```yaml
32-
auth_oidc:
33-
client_id: "homeassistant"
34-
discovery_url: "https://auth.example.com/.well-known/openid-configuration"
35-
```
36-
37-
## Confidential client configuration:
40+
### Confidential client configuration:
3841
3942
Authelia `configuration.yml`
4043
```yaml
@@ -49,21 +52,43 @@ identity_providers:
4952
public: false
5053
require_pkce: true
5154
pkce_challenge_method: 'S256'
52-
authorization_policy: 'two_factor'
5355
redirect_uris:
5456
- 'https://hass.example.com/auth/oidc/callback'
55-
scopes:
56-
- 'openid'
57-
- 'profile'
58-
- 'groups'
59-
id_token_signed_response_alg: 'RS256'
6057
token_endpoint_auth_method: 'client_secret_post'
6158
```
6259

63-
Home Assistant `configuration.yaml`
64-
```yaml
65-
auth_oidc:
66-
client_id: "homeassistant"
67-
client_secret: "insecure_secret"
68-
discovery_url: "https://auth.example.com/.well-known/openid-configuration"
69-
```
60+
## Step 3. Home Assistant configuration
61+
62+
The recommended setup method for beginners is through the "Integrations" panel within the Home Assistant UI. You can also use YAML setup, for which you can find the configuration guide here: [YAML Configuration Guide](../configuration.md).
63+
64+
1. Open Home Assistant and go to **Settings -> Devices & Services**.
65+
2. Click Add Integration and select **OpenID Connect/SSO Authentication**.
66+
67+
![UI Configuration GIF](../ui-config-steps/ui-configuration.gif)
68+
69+
3. Now click "Authelia" and continue to the next screen
70+
4. Set the discovery URL to `https://<your Authelia URL>/.well-known/openid-configuration` and click **Submit**
71+
72+
![Picture of the relevant configuration screen: discovery-url](../ui-config-steps/discovery-url.png)
73+
74+
5. Your URL will be tested. You may see an error, such as the picture below. Check your URL and verify that Home Assistant can access your Authelia installation. Change the URL or retry.
75+
76+
![Picture of the relevant configuration screen: discovery-url-failure](../ui-config-steps/discovery-url-failure.png)
77+
78+
6. If your discovery URL is tested succesfully, you will see something like this and you can continue with the **Submit** button to continue.
79+
80+
81+
![Picture of the relevant configuration screen: discovery-url-success](../ui-config-steps/discovery-url-success.png)
82+
83+
7. You will then be prompted to fill in the client details, the **Client ID** and the **Client Secret** (if you used the Public Client type in the Authelia configuration, there is no Client Secret required). Paste them in the relevant input boxes and continue setup with **Submit**.
84+
85+
![Picture of the relevant configuration screen: client-details](../ui-config-steps/client-details.png)
86+
87+
8. You will then be asked about **Groups & Role Configuration** and **User Linking**. Configure these options as you wish or leave the defaults in place. You can also change these settings later by opening the integration settings and clicking the reconfiguration icon.
88+
89+
90+
![Reconfiguration Configuration GIF](../ui-config-steps/ui-reconfigure.gif)
91+
92+
## Done!
93+
94+
You should now automatically see the welcome screen upon opening your Home Assistant URL. On the welcome screen you can choose to either start login through SSO or to use an alternative login method, which will bring you back to the normal Home Assistant username/password login screen.
Lines changed: 63 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,63 @@
1-
# Authentik
2-
3-
## Public client configuration
4-
Under construction.
5-
6-
## Confidential client configuration
7-
8-
1. From the admin interface, go to `Applications > Providers` and click on `Create`
9-
2. Select `OAuth2/OpenID Provider` and click `Next`
10-
3. Fill the following details:
11-
- Name: `Home Assistant Provider`
12-
- Authorization flow: `default-provider-authorization-explicit-consent`
13-
- Client type: `Confidential`
14-
- Client ID: `homeassistant`
15-
- Client Secret: **Copy this value**
16-
- Redirect URIs/Origins: Click on `Add entry` (You can use either DNS, Internal/External IP or localhost)
17-
- Strict: https://hass.example.com/auth/oidc/callback
18-
4. Click `Finish` to save the provider configuration
19-
5. Open the created Provider
20-
6. On the Assigned to application section click on `Create`:
21-
- Name: `Home Assistant`
22-
- Slug: `home-assistant`
23-
- Provider: `Home Assistant Provider`
24-
25-
Then save the configuration
26-
27-
## Home Assistant configuration
28-
29-
> [!IMPORTANT]
30-
> For HTTPS configuration make sure to have a public valid SSL certificate (i.e. LetsEncrypt), if not, use HTTP instead (more insecure) or add your Authentik CA certificate to `network.tls_ca_path`.
31-
32-
After installing this HACS addon, edit your `configuration.yaml` file and add:
33-
```yaml
34-
auth_oidc:
35-
client_id: "homeassistant"
36-
client_secret: "client_secret"
37-
discovery_url: "https://auth.example.com/application/o/home-assistant/.well-known/openid-configuration"
38-
```
39-
40-
Restart Home Assistant and go to https://hass.example.com/auth/oidc/welcome
1+
# authentik
2+
3+
> [!TIP]
4+
> This guide describes configuring authentik using the UI method. You can also configure authentik by hand with YAML. Instructions for configuring any provider using YAML can be found here: [YAML Configuration Guide](../configuration.md).
5+
6+
7+
## Step 1. Install the integration
8+
9+
Make sure that you have fully installed the latest release of the integration. The easiest way to install the integration is through [the Home Assistant Community Store (HACS)](https://hacs.xyz/). You can find usage instructions for HACS here: https://hacs.xyz/docs/use/.
10+
11+
After installing HACS, search for "OpenID Connect" in the HACS search box or click the button below:
12+
13+
[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=christiaangoossens&repository=hass-oidc-auth&category=Integration)
14+
15+
## Step 2. Configure authentik
16+
17+
1. Log in to authentik as an administrator and open the authentik Admin interface.
18+
19+
2. Navigate to **Applications > Applications** and click **Create with Provider** to create an application and provider pair. (Alternatively you can first create a provider separately, then create the application and connect it with the provider.)
20+
21+
- **Application**: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings.
22+
- Choose a **Provider Type**: select **OAuth2/OpenID Connect** as the provider type.
23+
- **Configure the Provider**: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations.
24+
- Note the **Client ID**, **Client Secret**, and **slug** values because they will be required later.
25+
- Set a `Strict` redirect URI to `https://<your HA URL>/auth/oidc/callback`.
26+
- Select any available signing key (to use the RS256 `id_token_signing_alg`)
27+
- Configure Bindings (optional): you can create a binding (policy, group, or user) to manage the listing and access to applications on a user's **My applications** page.
28+
29+
## Step 3. Home Assistant configuration
30+
31+
The recommended setup method for beginners is through the "Integrations" panel within the Home Assistant UI. You can also use YAML setup, for which you can find the configuration guide here: [YAML Configuration Guide](../configuration.md).
32+
33+
1. Open Home Assistant and go to **Settings -> Devices & Services**.
34+
2. Click Add Integration and select **OpenID Connect/SSO Authentication**.
35+
36+
![UI Configuration GIF](../ui-config-steps/ui-configuration.gif)
37+
38+
3. Now click "Authentik" and continue to the next screen
39+
4. Set the discovery URL to `https://<your Authentik URL>/application/o/<application_slug>/.well-known/openid-configuration` using the **slug** from the earlier authentik configuration step and click **Submit**
40+
41+
![Picture of the relevant configuration screen: discovery-url](../ui-config-steps/discovery-url.png)
42+
43+
5. Your URL will be tested. You may see an error, such as the picture below. Check your URL and verify that Home Assistant can access your authentik installation. Change the URL or retry.
44+
45+
![Picture of the relevant configuration screen: discovery-url-failure](../ui-config-steps/discovery-url-failure.png)
46+
47+
6. If your discovery URL is tested succesfully, you will see something like this and you can continue with the **Submit** button to continue.
48+
49+
50+
![Picture of the relevant configuration screen: discovery-url-success](../ui-config-steps/discovery-url-success.png)
51+
52+
7. You will then be prompted to fill in the client details, the **Client ID** and the **Client Secret** (if you used the Public Client type in authentik, there is no Client Secret required). Paste them in the relevant input boxes and continue setup with **Submit**.
53+
54+
![Picture of the relevant configuration screen: client-details](../ui-config-steps/client-details.png)
55+
56+
8. You will then be asked about **Groups & Role Configuration** and **User Linking**. Configure these options as you wish or leave the defaults in place. You can also change these settings later by opening the integration settings and clicking the reconfiguration icon.
57+
58+
59+
![Reconfiguration Configuration GIF](../ui-config-steps/ui-reconfigure.gif)
60+
61+
## Done!
62+
63+
You should now automatically see the welcome screen upon opening your Home Assistant URL. On the welcome screen you can choose to either start login through SSO or to use an alternative login method, which will bring you back to the normal Home Assistant username/password login screen.
Lines changed: 51 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
11
# Pocket ID
22

3-
## Public client configuration
3+
> [!TIP]
4+
> This guide describes configuring Pocket ID using the UI method. You can also configure Pocket ID by hand with YAML. Instructions for configuring any provider using YAML can be found here: [YAML Configuration Guide](../configuration.md).
5+
6+
7+
## Step 1. Install the integration
8+
9+
Make sure that you have fully installed the latest release of the integration. The easiest way to install the integration is through [the Home Assistant Community Store (HACS)](https://hacs.xyz/). You can find usage instructions for HACS here: https://hacs.xyz/docs/use/.
10+
11+
After installing HACS, search for "OpenID Connect" in the HACS search box or click the button below:
12+
13+
[![Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=christiaangoossens&repository=hass-oidc-auth&category=Integration)
14+
15+
## Step 2. Configure Pocket ID
16+
17+
You can choose between configuring Pocket ID as a public or confidential client.
18+
19+
### Public client configuration
420

5-
### Pocket ID configuration
621
1. Login to Pocket ID and go to `OIDC Clients`
722

823
2. Click on `Add OIDC Client`
@@ -16,19 +31,8 @@
1631

1732
5. Click on `Show more details` and note down your `Client ID` and `OIDC Discovery URL` since you will need them later.
1833

19-
### Home Assistant configuration
20-
1. Add following configuration in Home Assistant's configuration.yaml:
21-
```yaml
22-
auth_oidc:
23-
client_id: <The Client ID you have noted down>
24-
discovery_url: <The OIDC Discovery URL you have noted down> (for example: https://id.example.com/.well-known/openid-configuration)
25-
```
26-
27-
2. Restart Home Assistant and go to your Home Assistant OIDC URL (for example: https://hass.example.com/auth/oidc/welcome)
28-
29-
## Confidential client configuration
34+
### Confidential client configuration:
3035

31-
### Pocket ID configuration
3236
1. Login to Pocket ID and go to `OIDC Clients`
3337

3438
2. Click on `Add OIDC Client`
@@ -43,16 +47,39 @@ auth_oidc:
4347
- `Client ID`
4448
- `Client secret`
4549
- `OIDC Discovery URL`
46-
47-
### Home Assistant configuration
48-
1. Add following configuration in Home Assistant's configuration.yaml:
49-
```yaml
50-
auth_oidc:
51-
client_id: <The Client ID you have noted down>
52-
client_secret: <The Client secret you have noted down>
53-
discovery_url: <The OIDC Discovery URL you have noted down> (for example: https://id.example.com/.well-known/openid-configuration)
54-
```
5550

56-
2. Restart Home Assistant and go to your Home Assistant OIDC URL (for example: https://hass.example.com/auth/oidc/welcome)
51+
## Step 3. Home Assistant configuration
52+
53+
The recommended setup method for beginners is through the "Integrations" panel within the Home Assistant UI. You can also use YAML setup, for which you can find the configuration guide here: [YAML Configuration Guide](../configuration.md).
54+
55+
1. Open Home Assistant and go to **Settings -> Devices & Services**.
56+
2. Click Add Integration and select **OpenID Connect/SSO Authentication**.
57+
58+
![UI Configuration GIF](../ui-config-steps/ui-configuration.gif)
59+
60+
3. Now click "Pocket ID" and continue to the next screen
61+
4. Set the discovery URL to `https://<your Pocket ID URL>/.well-known/openid-configuration` and click **Submit**
62+
63+
![Picture of the relevant configuration screen: discovery-url](../ui-config-steps/discovery-url.png)
64+
65+
5. Your URL will be tested. You may see an error, such as the picture below. Check your URL and verify that Home Assistant can access your Pocket ID installation. Change the URL or retry.
66+
67+
![Picture of the relevant configuration screen: discovery-url-failure](../ui-config-steps/discovery-url-failure.png)
68+
69+
6. If your discovery URL is tested succesfully, you will see something like this and you can continue with the **Submit** button to continue.
70+
71+
72+
![Picture of the relevant configuration screen: discovery-url-success](../ui-config-steps/discovery-url-success.png)
73+
74+
7. You will then be prompted to fill in the client details, the **Client ID** and the **Client Secret** (if you used the Public Client type in the Pocket ID configuration, there is no Client Secret required). Paste them in the relevant input boxes and continue setup with **Submit**.
75+
76+
![Picture of the relevant configuration screen: client-details](../ui-config-steps/client-details.png)
77+
78+
8. You will then be asked about **Groups & Role Configuration** and **User Linking**. Configure these options as you wish or leave the defaults in place. You can also change these settings later by opening the integration settings and clicking the reconfiguration icon.
79+
80+
81+
![Reconfiguration Configuration GIF](../ui-config-steps/ui-reconfigure.gif)
5782

83+
## Done!
5884

85+
You should now automatically see the welcome screen upon opening your Home Assistant URL. On the welcome screen you can choose to either start login through SSO or to use an alternative login method, which will bring you back to the normal Home Assistant username/password login screen.
52.4 KB
Loading
71.8 KB
Loading
55.5 KB
Loading
22.4 KB
Loading
1020 KB
Loading

0 commit comments

Comments
 (0)