Auth Proxy Stack
Reference for SeaGit’s Auth Proxy template: one shared sign-in page for an environment, built on oauth2-proxy. Sign in once with your identity provider and every stack attached to it asks the Auth Proxy before letting a request through.
What the Auth Proxy Stack is
The Auth Proxy template deploys an oauth2-proxy into a cluster you choose, from a single form. It gets a fixed address such as https://auth.<environment domain>. Stacks that support it, such as MLflow, offer Use existing Auth Proxy stack as their sign-in choice. People sign in once; the session cookie is set on the environment domain, so it covers every attached app.
When to use it
- You run, or plan to run, more than one internal tool in an environment and want one sign-in for all of them.
- Your company already has an identity provider (Okta, Entra ID, Keycloak, Auth0, GitHub or Google Workspace) and you want access decided there.
- You want to limit an app to a group, for example only
ml-teamfor MLflow, without changing the app.
With a single app you can skip this stack: MLflow can run its own sign-in (New sign-in for this stack), with a host-only cookie.
The wizard estimates about 4 minutes. It needs a native (sgt-k8s) cluster and an environment with your own domain.
How it fits together
This is the whole path for a private MLflow behind an Auth Proxy. Notebooks, training jobs and CI skip the sign-in by using MLflow’s in-cluster address.
Browser
| https://mlflow.<domain>
v
ingress-nginx --- asks ---> Auth Proxy (auth.<domain>)
| |
| +--> your identity provider (sign-in)
| | |
| +<------+ cookie on .<domain>
v allowed, with identity headers
MLflow UI
Notebooks / training jobs / CI
| in-cluster tracking URI (no sign-in)
v
MLflow ---> Postgres (metadata)
`--> S3 bucket in your account (artifacts)Applications that sit behind the proxy receive the signed-in person’s identity as the headers X-Auth-Request-User, X-Auth-Request-Email and X-Auth-Request-Groups.
Deploy it
- Open Applications → Templates and choose Auth Proxy.
- Pick the environment and cluster, and the sign-in hostname (default
auth). - Choose the provider and fill in its details, who may sign in, and session storage.
- Deploy. Then copy Redirect URL to register from the Stack tab, or use the address the wizard showed, and register it with your provider. It is the sign-in address followed by
/oauth2/callback.
Providers
| Provider | What you provide | Who may sign in |
|---|---|---|
| Custom OIDC | Okta, Entra ID, Keycloak, Auth0 or any provider with an issuer URL. You give the issuer URL, client ID and client secret. | Allowed email domains or Allowed groups. Enter * for domains only if you mean to let in every account the provider signs in. |
| GitHub | A GitHub OAuth app. You give the client ID and secret, and the organization. | Organization members, optionally narrowed to one team. Groups are written org:team. |
| A Google OAuth client. You give the client ID and secret. | Google Workspace domains are required, because Google sign-in otherwise accepts any Google account. |
Each Auth Proxy stack uses one provider.
Wizard fields
| Field | What it does |
|---|---|
| Sign-in hostname | Default auth. The sign-in page is https://<hostname>.<environment domain>. The wizard shows the full address as you type. It cannot be changed after the stack is created. |
| Sign-in provider | Custom OIDC (default), GitHub or Google. One per stack. |
| OIDC issuer URL, Client ID, Client secret | The provider details. The issuer URL serves /.well-known/openid-configuration. The secret is stored encrypted and is not shown again. |
| Groups claim | OIDC only. The token claim that lists a person’s groups. Default groups. |
| Allowed email domains | OIDC only. Comma-separated, for example acme.com,acme.io. Set these or Allowed groups. |
| GitHub organization, GitHub team | GitHub only. The organization is required; the team is optional. |
| Google Workspace domains | Google only, required. Comma-separated with no spaces. |
| Allowed groups | OIDC and GitHub, optional. A rule for the whole stack; attached stacks can narrow it further. |
| API audience | OIDC only, optional. Lets machines call through with an identity provider token for this audience. Leave empty for browser sign-in only. |
| Session storage | Browser cookie (default), Redis: new, or Redis: existing stack (pick a Redis stack already running in the environment). |
| Session lifetime (hours) | How long a sign-in lasts. Default 8, from 1 to 168. |
Session storage
| Choice | What happens |
|---|---|
| Browser cookie | Nothing extra to run. The encrypted session lives in the browser, so a session cannot be ended early; it stays valid until it expires. |
| Redis: new | Creates a small Redis for this Auth Proxy. Sessions live on the server, so you can sign anyone out instantly. |
| Redis: existing stack | Uses a Redis stack you already run in this environment. Same benefits, nothing new to deploy. |
Choose Redis when any of these apply:
- You need to cut off access immediately. With a cookie a signed-in person keeps access until the session expires.
- Your users belong to many groups. Groups are stored in the session; too many make the cookie larger than browsers allow and pages fail with a “header too large” error.
- You do not want the provider’s refresh token in the browser. Redis keeps it on the server; the browser holds only a random session ID.
Stay with the browser cookie for the fewest moving parts, for example with GitHub or Google sign-in, or OIDC without group rules.
Outputs
The Stack tab shows these once the stack is running.
| Output | Value |
|---|---|
| Sign-in URL | The sign-in page, ending in /oauth2/start. |
| Auth check URL | The public address other stacks ask, ending in /oauth2/auth. |
| Internal auth check URL | The same check, as an in-cluster address on port 4180. |
| Cookie domain | .<environment domain> |
| Provider | The provider you chose. |
| Identity headers | X-Auth-Request-User, X-Auth-Request-Email, X-Auth-Request-Groups |
| Redirect URL to register | <sign-in address>/oauth2/callback. Register it with your provider. |
| Session storage | cookie or redis. |
| Cluster | The cluster the stack runs on. |
Attach another stack to it
- Deploy the Auth Proxy first, in the same environment as the stack you want to protect.
- In the other stack’s wizard, set Sign-in to Use existing Auth Proxy stack. It is preselected when one exists. Pick the Auth Proxy stack.
- Optionally set Allowed groups to restrict that app to some groups. Leave it empty to allow everyone the Auth Proxy lets in.
The attached app is exposed through ingress-nginx, which asks the Auth Proxy to approve each request. One sign-in then covers every attached app, because the cookie is set on .<domain>.
Machines and in-cluster services
- Services inside the cluster talk to an app by its in-cluster address and skip the proxy.
- With Custom OIDC, a bearer JWT issued by your provider for the API audience you set is accepted, so a machine can call through the public address without a browser sign-in.
Limits in this version
- You need the environment’s own domain. A shared Auth Proxy is refused on SeaGit’s shared domain, because its cookie would reach other customers’ apps.
- The hostname cannot be changed after the stack is created.
- One identity provider per Auth Proxy stack.
- The in-cluster address of an attached app has no sign-in, by design. Anything running in the cluster can use it.
- Custom OIDC must restrict sign-in by allowed email domains or allowed groups.