Skip to content

feat(deploy): add OPA + KMS docker-compose stack#995

Open
serene-kitfisto-8899 wants to merge 2 commits into
developfrom
feat_deploy_opa
Open

feat(deploy): add OPA + KMS docker-compose stack#995
serene-kitfisto-8899 wants to merge 2 commits into
developfrom
feat_deploy_opa

Conversation

@serene-kitfisto-8899

Copy link
Copy Markdown
Contributor

Summary

Add a self-contained deploy/opa/ Docker Compose stack that demonstrates Cosmian KMS running alongside Open Policy Agent (OPA) for RBAC policy evaluation.

Services

Service Image Port
OPA openpolicyagent/opa:0.68.0 8181
KMS ghcr.io/cosmian/kms:latest 9998

Key choices

  • OPA serves the default RBAC Rego policy (deploy/opa/opa/policy/) with anonymous telemetry disabled (--disable-telemetry)
  • KMS uses SQLite backend (no external database required) with its embedded Regorus RBAC engine pointing at the same policy bundle
  • KMS_FORCE_DEFAULT_USERNAME=true enables the built-in admin identity without an external IdP — add JWT/mTLS for production

Quick start

cd deploy/opa
docker compose up -d
curl http://localhost:9998/health

serene-kitfisto-8899 and others added 2 commits June 10, 2026 11:12
Add deploy/opa/ with a self-contained Docker Compose stack that demonstrates
Cosmian KMS running alongside Open Policy Agent (OPA):

- OPA serves the default RBAC Rego policy on port 8181
  with anonymous telemetry disabled (--disable-telemetry)
- KMS uses SQLite backend, embedded Regorus RBAC engine
  pointing at the same policy bundle as OPA
- KMS_FORCE_DEFAULT_USERNAME=true enables the built-in admin
  identity without requiring an external IdP

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- deploy/opa: OPA + KMS stack with --disable-telemetry
- deploy/rbac: full RBAC stack with step-ca TLS, Keycloak, OPA, KMS
  - Keycloak realm 'kms' with 4 users/roles and audience mapper
  - JWT authentication wired to Keycloak OIDC
  - TLS certs issued by step-ca for all services
  - smoke-test script (20/20 passing)
- fix(jwt): UserClaim serde: add #[serde(default)] to aud field so
  tokens without an audience claim deserialize correctly

Co-authored-by: Copilot <223556219+Copilot@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.

1 participant