Commit Graph

486 Commits

Author SHA1 Message Date
hsiegeln
bd8dfcf147 fix: use concrete ClickHouseDataSource return type to avoid bean ambiguity 2026-04-04 17:32:09 +02:00
hsiegeln
803b8c9876 feat: add Phase 3 dependencies and configuration
Add docker-java and ClickHouse JDBC dependencies, RuntimeConfig and
ClickHouseConfig Spring components, AsyncConfig with deployment thread
pool, and runtime/clickhouse config sections in application.yml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 17:29:06 +02:00
hsiegeln
c0fce36d4a chore: add .worktrees to .gitignore 2026-04-04 17:26:22 +02:00
hsiegeln
fa7853b02d docs: add Phase 3 Runtime Orchestration implementation plan
16-task plan covering environments, apps, deployments, Docker
runtime orchestrator, ClickHouse log ingestion, and CI updates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 17:24:20 +02:00
hsiegeln
0326dc6cce docs: add Phase 3 Runtime Orchestration spec
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 17:13:08 +02:00
5d14f78b9d Merge pull request 'Phase 2: Tenants + Identity + Licensing' (#32) from feature/phase-2-tenants-identity-licensing into main
All checks were successful
CI / build (push) Successful in 25s
CI / docker (push) Successful in 31s
Reviewed-on: #32
2026-04-04 15:58:07 +02:00
hsiegeln
eb4e0b2b07 fix: exclude TestContainers integration tests from CI
All checks were successful
CI / build (push) Successful in 59s
CI / build (pull_request) Successful in 59s
CI / docker (pull_request) Has been skipped
CI / docker (push) Successful in 2m39s
Build container has no Docker-in-Docker, so TestContainers can't
create PostgreSQL containers. Exclude integration tests in CI;
they run locally with Docker Desktop. Matches cameleer3-server
pattern of separating unit and integration tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 15:54:53 +02:00
hsiegeln
cd866ec7fe ci: retrigger pipeline with updated Java 21 build image
Some checks failed
CI / build (push) Failing after 1m19s
CI / docker (push) Has been skipped
CI / build (pull_request) Failing after 1m18s
CI / docker (pull_request) Has been skipped
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 15:50:37 +02:00
hsiegeln
b0eba3c709 feat: adopt cameleer build images for CI pipeline
Some checks failed
CI / build (push) Failing after 36s
CI / docker (push) Has been skipped
CI / build (pull_request) Failing after 1m28s
CI / docker (pull_request) Has been skipped
Use cameleer-build:1 (Maven 3.9 + Temurin 21) container instead of
setup-java. Use cameleer-docker-builder:1 for Docker image builds
with registry push. Aligns with cameleer3-server CI pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 15:40:49 +02:00
hsiegeln
d9f0da6e91 fix: set execute permission on Maven wrapper
Some checks failed
CI / build (pull_request) Failing after 1m43s
CI runner (Linux) requires mvnw to be executable.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 15:34:52 +02:00
hsiegeln
0e3d314dd1 fix: upgrade TestContainers to 1.21.4 for Docker 29 compatibility
Some checks failed
CI / build (pull_request) Failing after 57s
Docker Desktop 4.54 (Engine 29.1.2) raised minimum API from 1.24 to
1.44. TestContainers 1.20.5 defaults to 1.32 which gets rejected.
TC 1.21.4 handles API version negotiation natively.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 15:28:12 +02:00
hsiegeln
db7647f7f4 refactor: remove Phase 1 auth endpoints, switch to Logto OIDC
Auth is now handled by Logto. Removed AuthController, AuthService,
and related DTOs. Integration tests use Spring Security JWT mocks.
Ed25519 JwtService retained for machine token signing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:12:50 +02:00
hsiegeln
ab9ad1ab7f feat: add Docker Compose production stack with Traefik + Logto
7-service stack: Traefik (reverse proxy), PostgreSQL (shared),
Logto (identity), cameleer-saas (control plane), cameleer3-server
(observability), ClickHouse (traces). ForwardAuth middleware for
tenant-aware routing to cameleer3-server.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:09:49 +02:00
hsiegeln
42bd116af1 feat: add Logto Management API client for org provisioning
Creates Logto organizations when tenants are created. Authenticates
via M2M client credentials. Gracefully skips when Logto is not
configured (dev/test mode).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:07:43 +02:00
hsiegeln
0f3bd209a1 feat: add ForwardAuth endpoint for Traefik integration
GET /auth/verify validates JWT and returns X-User-Id, X-User-Email
headers for downstream service routing via Traefik middleware.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:05:13 +02:00
hsiegeln
e58e2caf8e feat: add tenant context resolution from Logto organization_id claim
TenantResolutionFilter extracts organization_id from Logto JWT and
resolves to local tenant via TenantService. ThreadLocal TenantContext
available throughout request lifecycle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:05:05 +02:00
hsiegeln
0d9c51843d feat: add OAuth2 Resource Server for Logto OIDC authentication
Dual auth: machine endpoints use Ed25519 JWT filter, all other API
endpoints use Spring Security OAuth2 Resource Server with Logto OIDC.
Mock JwtDecoder provided for test isolation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:03:06 +02:00
hsiegeln
9a575eaa94 feat: add license controller with generate and fetch endpoints
POST /api/tenants/{id}/license generates Ed25519-signed license JWT.
GET /api/tenants/{id}/license returns active license.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 15:00:31 +02:00
hsiegeln
d987969e05 feat: add license service with Ed25519 JWT signing and verification
Generates tier-aware license tokens with features/limits per tier.
Verifies signature and expiry. Audit logged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 14:58:56 +02:00
hsiegeln
a74894e0f1 feat: add license entity, repository, and database migration
Licenses table linked to tenants with JSONB features/limits, Ed25519
signed token storage, and revocation support.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 14:56:52 +02:00
hsiegeln
c1cae25db7 feat: add tenant service, controller, and DTOs with TDD
CRUD operations for tenants with slug-based lookup, tier management,
and audit logging. Integration tests verify 201/409/401 responses.
2026-04-04 14:53:58 +02:00
hsiegeln
119034307c feat: add tenant entity, repository, and database migration
Tenants table with slug, tier (LOW/MID/HIGH/BUSINESS), status
(PROVISIONING/ACTIVE/SUSPENDED/DELETED), Logto org reference, and
Stripe IDs.
2026-04-04 14:53:51 +02:00
hsiegeln
0a2d5970e4 feat: externalize Ed25519 keys with file-based loading
Keys are loaded from PEM files when CAMELEER_JWT_PRIVATE_KEY_PATH and
CAMELEER_JWT_PUBLIC_KEY_PATH are set. Falls back to ephemeral key
generation for development.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 14:48:20 +02:00
hsiegeln
24309eab94 docs: add dual deployment architecture spec and Phase 2 plan
Architecture spec covers Docker+K8s dual deployment with build-vs-buy
decisions (Logto, Traefik, Stripe, deferred Lago/Vault). Phase 2 plan
has 12 implementation tasks for tenants, identity, and licensing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 14:45:33 +02:00
hsiegeln
fcb372023f feat: add Dockerfile and Gitea Actions CI pipeline
Some checks failed
CI / build (push) Failing after 32s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:33:01 +02:00
hsiegeln
b5bd67fbd6 feat: add Spring Security with JWT filter, auth controller, and health endpoint
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:27:41 +02:00
hsiegeln
770f59500d feat: add login with password verification and audit logging
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:26:37 +02:00
hsiegeln
33c4a2991f feat: add Ed25519 JWT signing and verification
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:25:27 +02:00
hsiegeln
aff10704e0 feat: add user entity, registration, and RBAC model
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:23:59 +02:00
hsiegeln
cdd19e180e feat: add audit logging framework with immutable append-only log
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:22:33 +02:00
hsiegeln
d7cc3a3e04 feat: add Flyway migrations for users, roles, and permissions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:13:49 +02:00
hsiegeln
a7e28cab32 feat: add Docker Compose + TestContainers for PostgreSQL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:13:39 +02:00
hsiegeln
c113c2b38b feat: initialize Maven project with Spring Boot 3.4.3 + Java 21
Set up the foundational Spring Boot project structure:
- Root POM with web, security, JPA, Flyway, validation, AOP, actuator
- PostgreSQL + Testcontainers for test infrastructure
- Application YAML configs for default, dev, and test profiles
- Maven wrapper (3.9.9) for reproducible builds
- .gitignore for Maven/IDE/OS artifacts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 10:08:14 +02:00
hsiegeln
5e06d31cfb Add phase roadmap and Phase 1 implementation plan
Phase roadmap: 9 phases from foundation to frontend, each producing
working, testable software independently.

Phase 1 plan: Foundation + Auth — 10 tasks, ~60 steps covering:
- Maven project setup (Spring Boot 3.4.3, Java 21)
- PostgreSQL + Docker Compose + TestContainers
- Flyway migrations (users, roles, permissions, audit_log)
- Immutable audit logging framework
- User registration with bcrypt
- Ed25519 JWT signing (no third-party JWT library)
- Login with audit trail
- Spring Security JWT filter + RBAC
- Dockerfile + Gitea Actions CI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 23:58:25 +02:00
hsiegeln
2ed6430aea Add SaaS platform PRD
Comprehensive product requirements document covering:
- Four-tier structure (Low/Mid shared, High/Business dedicated)
- Modular monolith architecture (Spring Boot + React)
- Camel application runtime with agent auto-injection
- Flux CD GitOps provisioning, build-once-deploy-often pipeline
- Dual-mode license (SaaS API + air-gapped file)
- SOC 2 day-1 compliance, zero-trust tenant isolation
- Stripe billing (usage-based + committed resources)
- Platform self-monitoring (Prometheus/Grafana/Loki)
- Exchange Replay MOAT feature

Gitea epics: cameleer/cameleer-saas #1-#13

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 23:45:15 +02:00
hsiegeln
bd472be312 Add moat-strengthening features design spec
Comprehensive design document for three defensibility features:
- Live Route Debugger (replay-based, zero production impact)
- Payload Flow Lineage (targeted per-processor capture + diff)
- Cross-Service Trace Correlation + Topology Map (network effect)

Gitea issues: cameleer/cameleer3 #57-#72 (MOAT label)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 16:14:04 +02:00