Skip to main content
Tailscale provides seamless OIDC authentication through tsidp. When accessing Omni through Tailscale, you can make use of this through the following steps.

Prerequisites

You will need:
  • A Tailscale account with the MagicDNS and HTTPS certificates features enabled.
  • A Linux host with Docker and Docker Compose.

Tailscale setup

Browse to https://login.tailscale.com/admin/acls/file to edit the access controls for your tailnet, and add the following JSON to the grants section:
tsidp-grant.json
On https://login.tailscale.com/admin/settings/keys, generate a new auth key. Make sure to select Reusable so it can be used for both tsidp and the Tailscale reverse proxy used for Omni. Finally, go to https://login.tailscale.com/admin/dns and note your Tailnet DNS name.

Prepare deployment

Before proceeding, set your Tailnet DNS name as a variable, it is referenced throughout the steps below:
Step 1: Set up your environment Create a .env file with your Tailscale auth key and the tsidp issuer URL:
Step 2: Generate the Omni encryption key Generate a GPG key used to encrypt data written to etcd at rest. The key has no passphrase, because Omni reads it at startup without a prompt:
Step 3: Configure the Tailscale reverse proxy Create serve-config.json. This tells the Tailscale sidecar which ports to expose over HTTPS and where to forward incoming traffic. Omni shares the network of the Tailscale sidecar, so traffic is forwarded to 127.0.0.1:
Step 4: Define the service stack Create docker-compose.yml. This defines three services:
  • tsidp: the OIDC provider.
  • omni-tailscale: the Tailscale sidecar. It connects to the tailnet, serves Omni over HTTPS, and resolves tailnet names such as tsidp.${TAILNET_DNS} with MagicDNS.
  • omni: Omni itself. It uses the network of omni-tailscale and starts after the sidecar’s health check passes. The machine API and the Kubernetes proxy listen on 127.0.0.1:8090 and 127.0.0.1:8100, the addresses that the Tailscale sidecar forwards to.
Replace the placeholders with your own values:
  • <your-admin-email>: the email address of the first Omni admin. Use the email address of your Tailscale account, because tsidp sends that address to Omni when you log in.
  • <your-name> and <your-email>: the name and email address that accept the End User License Agreement (EULA). Omni requires acceptance of the EULA to start.
The OIDC client secret is passed to Omni with the OMNI_AUTH_OIDC_CLIENT_SECRET environment variable. Alternatively, you can configure the OIDC authentication flags above using a configuration file instead. See OIDC in the Omni Configuration Examples. To accept the EULA in a configuration file, see eulaAccept.

OIDC client setup

At this point all that’s left to do is register Omni as an OIDC client in tsidp. Start only tsidp first:
Browse to https://tsidp.${TAILNET_DNS} and create a new client. For the redirect URI, use https://omni.${TAILNET_DNS}/oidc/consume. Copy the client ID and secret that tsidp generates, then append them to your .env file:
Now start the complete stack:
Browse to https://omni.${TAILNET_DNS}/. You should be prompted to log in with your Tailscale user and then taken to the Omni UI. If login fails with a message that the identity is not authorized for this instance, the email address in --initial-users does not match the one shown on the login screen. Omni reads --initial-users only the first time it starts, so changing it later has no effect on its own. To fix it, set --initial-users in docker-compose.yml to the email address shown on the login screen. Then remove Omni and its data volumes, and start it again:
This removes all Omni data, but tsidp and its OIDC client are kept.