Auth0 is a flexible, drop-in solution to add authentication and authorization services to your applications. It is a 3rd party managed service and can't be self-hosted. Auth0 is the right choice if you don't want to manage an Identity Provider (IDP) instance on your own.
If you prefer to have full control over authentication and authorization of your NetBird network, there are good self-hosted alternatives to the managed Auth0 service like Keycloak.
Step 1: Create Auth0 account
To create an Auth0 account, sign up at https://auth0.com.
There are five properties of the
setup.env file that we will configure in this guide:
Step 2: Create and configure Auth0 application
This Auth0 application will be used to authorize access to NetBird Dashboard (Web UI).
Follow the steps in the Auth0 React SDK Guide up until "Install the Auth0 React SDK".
Allowed Callback URLs,
Allowed Logout URLs,
Allowed Web Origins,
Allowed Origins (CORS)
Make sure that
Token Endpoint Authentication Methodis set to
Client IDto set
NETBIRD_AUTH_CLIENT_IDproperty in the
NETBIRD_AUTH_OIDC_CONFIGURATION_ENDPOINTproperty in the
setup.envfile like so:
Double-check if the endpoint returns a JSON response by calling it from your browser.
Step 3: Create and configure Auth0 API
This Auth0 API will be used to access NetBird Management Service API.
- Follow the steps in the Auth0 Create An API.
- Use API
NETBIRD_AUTH_AUDIENCEproperty in the
Step 4: Enable Interactive SSO Login (Optional)
You can enable it by following these steps:
- Log in to your Auth0 account https://manage.auth0.com/
- Go to
Create Applicationbutton (top right)
- Fill in the form with the following values:
- Application type:
- Scroll down to the
Step 4: Continue with the self-hosting guide
You can now continue with the NetBird Self-hosting Guide.