Forward-auth SSO doesn't work on Compose domains
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 65/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker, typescript
- Domain
- authentication, devops, frontend
Research direction
Start with packages/server/src/services/proprietary/forward-auth.ts and the referenced traefik/domain.ts and docker/domain.ts paths, then inspect the Application domain UI containing HandleForwardAuth. Trace current authorization, label generation, and middleware naming before checking related tests or deployment flows. Done means Compose domains expose the toggle, authorize correctly, attach the existing forward-auth middleware, and retain stable names across redeploys.
Written by the indexing model from the issue text.
Description
Forward-auth SSO doesn't work on Compose domains
Application Authentication (forward-auth SSO) only works on application domains. Docs already admit it:
Application Authentication is currently only supported on application domains. Docker Compose service domains are not supported.
That's a real gap — most non-trivial deployments are Compose stacks, not a single application. Right now there's no way to put an internal tool or staging service behind SSO without converting it to an application first, which isn't always an option (multi-service stacks, existing compose templates, etc).
Checked open issues/PRs, nothing tracks this yet.
Why it's Application-only today
Not an arbitrary limit — Compose just never got wired into the forward-auth code path, because the two domain types route completely differently:
- Application: dedicated per-app dynamic Traefik config file (
traefik/domain.ts→manageDomain). Forward-auth middleware is written to the sharedmiddlewares.ymland referenced from there (traefik/forward-auth.ts→createForwardAuthMiddleware). - Compose: no per-service config file — routing is pure Docker labels on the target service inside
docker-compose.yml(docker/domain.ts→addDomainToCompose/createDomainLabels).
And the access/enable code hard-rejects anything without an applicationId:
// packages/server/src/services/proprietary/forward-auth.ts:305-335
const resolveApplicationDomain = async (domainId: string) => {
const domain = await findDomainById(domainId);
if (!domain.applicationId) {
throw new TRPCError({ code: "BAD_REQUEST", message: "..." });
}
...
};
Same guard in assertApplicationDomainAccess. And the UI toggle (HandleForwardAuth) is only rendered on the Application domain screen — the Compose one doesn't have it at all.
Proposed fix
The middleware itself doesn't need to change — it already lives in a shared, app-agnostic middlewares.yml. Just need a second way to attach it and a second way to authorize it:
- Add a Compose counterpart to
resolveApplicationDomain/assertApplicationDomainAccessthat resolves viadomain.composeIdinstead, usingcheckServicePermissionAndAccessagainst the compose. - In
createDomainLabels(docker/domain.ts), emittraefik.http.routers.<router>.middlewares=...,forward-auth-<name>@filewhendomain.forwardAuthEnabled. - Widen
forwardAuthMiddlewareNameto includeserviceName, not justappName— one Compose stack can have several services with independent domains, names must not collide. - Add the
HandleForwardAuthtoggle to the Compose domain UI. - Check
isolatedDeployment/randomizedon't drift the middleware name between redeploys of the same domain.
Alternatives considered
- Convert the service to an
application— not always possible. - Custom Traefik basic-auth middleware in front — works today, but it's a shared password, not real SSO/OIDC identity.
Context
- Forward-auth SSO landed in #4555, merged 2026-06-06 (closed #123). The Application-only limit was part of the original design, not a regression.
- Related but not duplicate: #4284, #4408, #4415.
- Dominant language
- TypeScript
- Stars
- 38.2k
- Forks
- 3.1k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 65
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Dokploy/dokploy
-
needs-triage🔍
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Dokploy/dokploy#5836 · 1 comment ·
Maintainers usually reply within 1 day
-
Server threshold (CPU/Memory) alerts for the main Dokploy server never reach any notificationPossibly taken @ghazy2001 claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Dokploy/dokploy#5830 · 1 comment ·
Maintainers usually reply within 1 day
-
Add a "System" option to the dark/light mode setting (follow OS appearance)Possibly taken @fabianfrankwerner claimed this 23 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Dokploy/dokploy#5638 · 1 comment ·
Maintainers usually reply within 1 day
-
compose.search omits services missing from member accessedServices, even for owners/adminsPossibly taken @imrja8 claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Dokploy/dokploy#5361 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
[Feature Request] Show usage example for File Mounts created in the UIPossibly taken @jereok91 claimed this 46 days ago. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Dokploy/dokploy#5147 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
kunchenguid/gh-axi#247 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lidge-jun/opencodex#8101 · 2 comments ·
Maintainers usually reply within 1 day
-
effort:S P3 refactor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nightscout/nocturne#3243 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
JuliusBrussee/caveman#1449 ·
Maintainers usually reply within 1 day