Integration: Reverse proxy SSO

Let Your Proxy Sign People In

Where people already sign in at one place (Authelia, authentik, Keycloak with oauth2-proxy, a company's own gateway), the reverse proxy in front of qKVM signs them in and names them in a header. qKVM takes that header from that proxy and from nobody else.

How It Works

The account of that name

Whoever the proxy names is signed in as the qKVM account of that name, with its role and its machines. Somebody qKVM does not know is told so and sees nothing.

One proxy believed

The header counts only from the proxy named with --trusted-proxy, and only where it arrives once: not from a visitor, another machine or a program on the same computer.

No password to guess

The identity provider does the second step. An account without a password cannot be signed in to by typing anything, and a copy of the data folder holds nothing of it to guess at.

Live views end with it

A live view of somebody the proxy has not named on a request for ten minutes ends, and opens again with a click.

Set It Up

  1. The accountsSettings, Accounts, Add account, with the name the proxy sends and no password.
  2. Start qKVMqkvm --trusted-proxy 172.18.0.5 --sso-header Remote-User, with your proxy's address.
  3. The proxySets Remote-User itself, passes the live view on as a WebSocket, and sends X-Forwarded-For and X-Forwarded-Proto.
  4. No way around itNothing reaches qKVM's port but the proxy: publish it to the proxy's network only, or use --allow-from.

Good to Know

Taking access away
At the identity provider, or here, by suspending or removing the account, which ends its session at once.
Passwords too
Accounts with a password still sign in with it, the way in when the identity provider is down. Keep at least the first admin that way.
Not with a locked start
It cannot be had with --locked-start: whoever signs in elsewhere brings no password here, and without one qKVM could not open the saved device passwords.
Idle connections
A proxy that keeps connections to qKVM open has to let an idle one go sooner than qKVM does, 130 seconds after its last answer. The defaults of nginx (60), Traefik (90), cloudflared (90) and Caddy (two minutes) all do.
Or OpenID Connect
qKVM can also sign people in through the provider itself, with its groups as roles and no proxy in between.