Add RBAC role table, OIDC login flow, user admin API examples, and new configuration properties to HOWTO.md. Update CLAUDE.md with RBAC roles, OIDC support, and user persistence. Add user repository to ARCHITECTURE.md component table. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.7 KiB
2.7 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project
Cameleer3 Server — observability server that receives, stores, and serves Camel route execution data and route diagrams from Cameleer3 agents. Pushes config and commands to agents via SSE.
Related Project
- cameleer3 (
https://gitea.siegeln.net/cameleer/cameleer3) — the Java agent that instruments Camel applications - Protocol defined in
cameleer3-common/PROTOCOL.mdin the agent repo - This server depends on
com.cameleer3:cameleer3-common(shared models and graph API)
Modules
cameleer3-server-core— domain logic, storage, agent registrycameleer3-server-app— Spring Boot web app, REST controllers, SSE, static resources
Build Commands
mvn clean compile # Compile all modules
mvn clean verify # Full build with tests
Run
java -jar cameleer3-server-app/target/cameleer3-server-app-1.0-SNAPSHOT.jar
Key Conventions
- Java 17+ required
- Spring Boot 3.4.3 parent POM
- Depends on
com.cameleer3:cameleer3-commonfrom Gitea Maven registry - Jackson
JavaTimeModuleforInstantdeserialization - Communication: receives HTTP POST data from agents, serves SSE event streams for config push/commands
- Maintains agent instance registry with states: LIVE → STALE → DEAD
- Storage: ClickHouse for structured data, text index for full-text search
- Security: JWT auth with RBAC (AGENT/VIEWER/OPERATOR/ADMIN roles), Ed25519 config signing, bootstrap token for registration
- OIDC: Optional external identity provider support (token exchange pattern). Configured via
CAMELEER_OIDC_*env vars - User persistence: ClickHouse
userstable, admin CRUD at/api/v1/admin/users
CI/CD & Deployment
- CI workflow:
.gitea/workflows/ci.yml— build → docker → deploy on push to main - Build step skips integration tests (
-DskipITs) — Testcontainers needs Docker daemon - Docker: multi-stage build (
Dockerfile),$BUILDPLATFORMfor native Maven on ARM64 runner, amd64 runtime REGISTRY_TOKENbuild arg required forcameleer3-commondependency resolution- Registry:
gitea.siegeln.net/cameleer/cameleer3-server(container images) - K8s manifests in
deploy/— ClickHouse StatefulSet + server Deployment + NodePort Service (30081) - Deployment target: k3s at 192.168.50.86, namespace
cameleer - Secrets managed in CI deploy step (idempotent
--dry-run=client | kubectl apply):cameleer-auth,clickhouse-credentials,CAMELEER_JWT_SECRET - K8s probes: server uses
/api/v1/health, ClickHouse uses/ping - Docker build uses buildx registry cache +
--provenance=falsefor Gitea compatibility