Skip to content

Commit 3154f5b

Browse files
authored
Add documentation for self-hosted pocketid integration (#432)
1 parent d5d5dc0 commit 3154f5b

File tree

3 files changed

+93
-0
lines changed

3 files changed

+93
-0
lines changed
86.4 KB
Loading
155 KB
Loading

src/pages/selfhosted/identity-providers.mdx

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,99 @@ NETBIRD_AUTH_PKCE_DISABLE_PROMPT_LOGIN=true
601601
#### Step 6: Continue with the NetBird Self-hosting Guide
602602
You've configured all required resources in Authentik. You can now continue with the [NetBird Self-hosting Guide](/selfhosted/selfhosted-guide#step-4-disable-single-account-mode-optional).
603603

604+
### PocketID
605+
606+
This guide is a part of the [NetBird Self-hosting Guide](/docs/selfhosted/selfhosted-guide) and explains how to integrate
607+
**self-hosted** NetBird with [PocketID](https://pocket-id.org/).
608+
609+
<Note>
610+
PocketID is a simplified identity management solution designed for self hosted environments.
611+
It is secure and effective, but makes some tradeoffs in terms of features and usability.
612+
Notably, it does not allow scoping the access of API Tokens.
613+
This isn't an issue per se, but it does mean that you should keep careful track of the token used by NetBird for management.
614+
</Note>
615+
616+
#### Step 1. Create and configure PocketID application
617+
In this step, we will create and configure NetBird application in pocketid.
618+
619+
Create new PocketID OIDC Client
620+
- Navigate to pocketid console
621+
- Click the `Administration` dropdown in the left hand bar, then select `OIDC Clients`
622+
- Fill in the form with the following values and click `Continue`
623+
- Name: `NetBird`
624+
- Client Launch URL: `https://<domain>`
625+
- Callback URL's:
626+
- `http://localhost:53000`
627+
- `https://<domain>/auth`
628+
- `https://<domain>/silent-auth`
629+
- Logout Callback URL: `https://<domain>/`
630+
- Public Client: On
631+
- PKCE: On
632+
- Click `Save`
633+
634+
<p>
635+
<img src="/docs-static/img/integrations/identity-providers/self-hosted/pocketid-create-oidc-client.png" alt="high-level-dia" className="imagewrapper-big"/>
636+
</p>
637+
638+
- Copy `Client ID` will be used later in the `setup.env`
639+
640+
#### Step 2: Application Token Configuration
641+
642+
To configure the application token you need to:
643+
644+
- Click `Administration` dropdown in the left hand bar, then select `API Keys`
645+
- Click `Add API Key`
646+
- Enter the following values and click `Save`
647+
- Name: 'NetBird Management Token'
648+
- Expires At: Pick a date in the future
649+
- Description: 'NetBird Management Token'
650+
- Click `Save`
651+
652+
<p>
653+
<img src="/docs-static/img/integrations/identity-providers/self-hosted/pocketid-create-api-token.png" alt="high-level-dia" className="imagewrapper-big"/>
654+
</p>
655+
656+
- Copy `API Key` will be used later in the `setup.env`
657+
658+
659+
Your authority OIDC configuration will be available under:
660+
661+
```bash
662+
https://<YOUR_POCKETID_HOST_AND_PORT>/.well-known/openid-configuration
663+
```
664+
665+
:::caution
666+
Double-check if the endpoint returns a JSON response by calling it from your browser.
667+
:::
668+
669+
- Set properties in the `setup.env` file:
670+
```json
671+
NETBIRD_AUTH_OIDC_CONFIGURATION_ENDPOINT="https://<YOUR_POCKETID_HOST_AND_PORT>/.well-known/openid-configuration"
672+
NETBIRD_USE_AUTH0=false
673+
NETBIRD_AUTH_CLIENT_ID="<CLIENT_ID>"
674+
NETBIRD_AUTH_SUPPORTED_SCOPES="openid profile email groups"
675+
NETBIRD_AUTH_AUDIENCE="<CLIENT_ID>"
676+
NETBIRD_AUTH_REDIRECT_URI="/auth"
677+
NETBIRD_AUTH_SILENT_REDIRECT_URI="/silent-auth"
678+
NETBIRD_TOKEN_SOURCE="idToken"
679+
680+
NETBIRD_AUTH_DEVICE_AUTH_PROVIDER="none"
681+
NETBIRD_AUTH_DEVICE_AUTH_CLIENT_ID="<CLIENT_ID>"
682+
NETBIRD_AUTH_DEVICE_AUTH_AUDIENCE="<CLIENT_ID>"
683+
NETBIRD_AUTH_DEVICE_AUTH_SCOPE="openid profile email groups"
684+
NETBIRD_AUTH_DEVICE_AUTH_USE_ID_TOKEN=true
685+
686+
NETBIRD_MGMT_IDP="pocketid"
687+
NETBIRD_IDP_MGMT_CLIENT_ID="netbird"
688+
NETBIRD_IDP_MGMT_EXTRA_MANAGEMENT_ENDPOINT="https://<YOUR_POCKETID_HOST_AND_PORT>"
689+
NETBIRD_IDP_MGMT_EXTRA_API_TOKEN="<API_TOKEN>"
690+
691+
```
692+
693+
#### Step 3: Continue with the NetBird Self-hosting Guide
694+
You've configured all required resources in PocketID. You can now continue with the [NetBird Self-hosting Guide](/selfhosted/selfhosted-guide#step-4-disable-single-account-mode-optional).
695+
696+
604697
## Managed IDPs
605698

606699
### Azure AD (Microsoft Entra ID)

0 commit comments

Comments
 (0)