Skip to content

docs(authentication): add authentication layer enhancement#52

Open
chadcrum wants to merge 11 commits into
dcm-project:mainfrom
chadcrum:flpath-4194-idm-iam-enhancement
Open

docs(authentication): add authentication layer enhancement#52
chadcrum wants to merge 11 commits into
dcm-project:mainfrom
chadcrum:flpath-4194-idm-iam-enhancement

Conversation

@chadcrum

@chadcrum chadcrum commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Enhancement proposal for DCM's authentication layer — FLPATH-4194.

Targets the control-plane monolith architecture: one binary (dcm-server), one database, in-process domain calls. All technical claims cross-checked against the control-plane codebase.

  • Auth proxy via oauth2-proxy — standalone reverse proxy + JWT validator in front of dcm-server. No separate API gateway needed.
  • Actor middleware — Chi router middleware resolves X-Forwarded-User → actor DB lookup → request context (ActorID, TenantID, ActorType) with LRU cache (60s TTL).
  • Tenant isolationTenantScope() GORM query middleware with merge-blocking CI lint rule from day one.
  • Built-in local user store — username/password → DCM-issued ES256 JWT for bootstrap and testing. Default: disabled (DCM_BUILTIN_AUTH).
  • Actor/tenant lifecycle — active, suspended, deactivated states with middleware enforcement.
  • CLI authenticationdcm login via OIDC Device Authorization Grant + token file for CI/CD.
  • Keycloak as V1 identity provider, with Kuadrant/Authorino documented as a deferred alternative.

Jira

FLPATH-4194 (epic: FLPATH-3254)

🤖 Generated with Claude Code

@chadcrum chadcrum changed the title docs(authentication): add authentication layer enhancement proposal [DRAFT] docs(authentication): add authentication layer enhancement proposal May 21, 2026
Introduce the IDM/IAM authentication layer enhancement for DCM,
targeting the control-plane monolith architecture. Defines oauth2-proxy
as the auth gateway, actor/tenant data models, tenant isolation via
TenantScope() query middleware, and CLI authentication via OIDC device
flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
@chadcrum chadcrum force-pushed the flpath-4194-idm-iam-enhancement branch from e2a98dd to 686a0a9 Compare June 17, 2026 20:42
@chadcrum chadcrum changed the title [DRAFT] docs(authentication): add authentication layer enhancement proposal docs(authentication): add authentication layer enhancement Jun 17, 2026
@chadcrum

Copy link
Copy Markdown
Contributor Author

Ready for review

@gabriel-farache gabriel-farache left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good overall but there are too many implementation details mixes with the global auth architecture.
We can have "implementation orientation" sections but it should not be mixed with the rest of the doc

Comment thread enhancements/authentication/authentication.md
Comment thread enhancements/authentication/authentication.md
Comment thread enhancements/authentication/authentication.md
Comment thread enhancements/authentication/authentication.md Outdated
Comment thread enhancements/authentication/authentication.md Outdated
Comment thread enhancements/authentication/authentication.md
Comment thread enhancements/authentication/authentication.md Outdated
Comment thread enhancements/authentication/authentication.md Outdated
Comment thread enhancements/authentication/authentication.md
Comment on lines +551 to +553
- **Operational complexity:** Adds Keycloak as an external dependency for
production deployments. Mitigated by the built-in local provider as a
fallback and by reusing existing Red Hat SSO infrastructure.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the built-in local provider

is that defined anywhere? And is that something we want? IMO we should have keycloak as a pre-requisites

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The built-in provider is defined in Section 1 under "V1 Implementations." It's there for bootstrap (first admin account before Keycloak is configured) and integration tests.

That said — if we make Keycloak a hard prerequisite, we could drop the built-in provider entirely and seed the initial admin via a DB migration instead. Deploy-time config provides the Keycloak admin's sub claim (e.g., DCM_ADMIN_SUBJECT), and the migration creates the default tenant + admin actor + identity binding. No custom token endpoint, no password hashing, no extra attack surface.

Trade-off is integration tests would need a Keycloak container in CI or a test-only signing key, but that's probably more realistic anyway.

What do you think — Keycloak as a prerequisite with seed migration, or keep the built-in provider for bootstrap/testing flexibility?

@gabriel-farache gabriel-farache Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trade-off is integration tests would need a Keycloak container in CI or a test-only signing key, but that's probably more realistic anyway.

My thoughts exactly

I would have Keycloak as a prerequisite, what @dcm-project/team-dcm thinks about it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree to have keycloak as prerequisite.

chadcrum and others added 6 commits June 18, 2026 09:58
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
@chadcrum

Copy link
Copy Markdown
Contributor Author

good overall but there are too many implementation details mixes with the global auth architecture.
We can have "implementation orientation" sections but it should not be mixed with the rest of the doc

Agreed — we've started trimming Go-specific implementation details in this review round (removed some code-level references, simplified several sections). I'll continue separating the architecture from implementation as the doc evolves. The data models, sequence diagrams, and API-level integration points stay; the Go function/package references get moved or removed.

Replace Go code constructs (TenantScope(), router.Use(), Chi router,
context.Context, GORM, LRU, oapi-codegen, argon2id, ES256, http.Client,
buildHTTPClient, go-jose) with architecture-level descriptions. Keeps
data models, sequence diagrams, and API-level integration points.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Comment thread enhancements/authentication/authentication.md Outdated
Comment thread enhancements/authentication/authentication.md Outdated
Comment thread enhancements/authentication/authentication.md Outdated
chadcrum and others added 3 commits June 18, 2026 15:08
Links to SP Registration Flow, SP Resource Manager, State Management,
and ACM Cluster SP are already in the see-also front matter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Reviewer feedback — capitalize the project name for readability.
GitHub URL kept lowercase (case-sensitive).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Too much implementation detail for the enhancement doc. The version
pinning and CVE references can be revisited during implementation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants