Commit graph

76 commits

Author SHA1 Message Date
Till Wegmueller
39eb8206a1
docs: Add comprehensive mdbook documentation
Complete documentation site covering all aspects of Barycenter:
Getting Started, Authentication, OAuth 2.0/OIDC, Authorization
Policy Engine, Administration, Deployment, Security, Development,
and Reference sections (96 markdown files).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 17:59:55 +01:00
Till Wegmueller
1e3bb668e8
chore: Release 2026-02-14 17:11:08 +01:00
Till Wegmueller
89a7902116
Run Clippy fix
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-02-08 20:31:48 +01:00
Till Wegmueller
4f0dac7645
Fix formatting
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-02-08 20:30:52 +01:00
Till Wegmueller
df57dda960
Add Claude settings
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-02-08 18:58:06 +01:00
Till Wegmueller
7bc8f513ac
Add Kubernetes deployment support for authorization policy service
Expose authz API port (8082) in Dockerfile and create /app/policies
directory. Extend Helm chart with configurable authz section: inline
KDL policy ConfigMap, existing ConfigMap reference, policies volume
mount, Service port, and a NetworkPolicy restricting the authz port
to same-namespace traffic while leaving the OIDC port unrestricted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:55:54 +01:00
Till Wegmueller
1385403e1a
Add original research document and claude settings
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-02-08 18:34:42 +01:00
Till Wegmueller
e0ca87f867
Implement file-driven authorization policy service (ReBAC + ABAC)
Add a Zanzibar-style relationship-based access control engine with
OPA-style ABAC condition evaluation. Policies, roles, resources, and
grants are defined in KDL files loaded from a configured directory at
startup. Exposes a read-only REST API (POST /v1/check, /v1/expand,
GET /healthz) on a dedicated port when authz.enabled = true.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:34:14 +01:00
Till Wegmueller
95a55c5f24
chore: Release 2026-01-06 23:06:56 +01:00
Till Wegmueller
113eb2a211
Format
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 22:24:47 +01:00
Till Wegmueller
badb5dd18e
Implement device flow and client autoregistration
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 22:24:09 +01:00
Till Wegmueller
3cf557d310
chore: Release 2026-01-06 20:10:30 +01:00
Till Wegmueller
31423c2a7f
Update claude settings
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 20:09:57 +01:00
Till Wegmueller
782a319164
ci: Add Docker build check to catch Dockerfile issues early
- Add docker-build job that runs on every push/PR
- Builds only amd64 platform for speed (vs multi-platform in release)
- Uses GitHub Actions cache for faster builds
- Prevents Dockerfile issues from reaching release workflow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 19:17:52 +01:00
Till Wegmueller
1fc229f582
fix(docker): Add missing client-wasm directory and update Rust version
- Add COPY client-wasm to Dockerfile to include workspace member
- Update Rust base image from 1.91 to 1.92
- Fixes CI build failure: "failed to load manifest for workspace member client-wasm"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 18:44:46 +01:00
Till Wegmueller
2d14ef000c
chore: Release 2026-01-06 17:08:37 +01:00
Till Wegmueller
3f2a30cf97
format code
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 16:50:22 +01:00
Till Wegmueller
0fcd924105
Implement consent workflow
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 16:49:49 +01:00
Till Wegmueller
eb9c71a49f
Implement more tests
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 12:39:19 +01:00
Till Wegmueller
a949a3cbdb
Format
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 12:31:51 +01:00
Till Wegmueller
ecd6b00a1e
Implement Passkey classification features
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 12:31:22 +01:00
Till Wegmueller
d39c757be5
Fix tests
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 11:17:38 +01:00
Till Wegmueller
2b4922a69f
Fix tests
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 11:09:02 +01:00
Till Wegmueller
86c88d8aee
Commit work in progress
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2026-01-06 10:56:23 +01:00
Till Wegmueller
d7bdd51164
WIP Passkey implementation. Needs fixing storage.rs and more tests
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-12-07 13:18:22 +01:00
Till Wegmueller
47d9d24798
chore: bump chart version
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-12-02 22:08:01 +01:00
Till Wegmueller
304196ead9
chore: release 0.2.0-alpha.15 2025-12-02 21:47:11 +01:00
Till Wegmueller
629cfc1c92
fix: include migration directory in Docker build
Add COPY instruction for migration directory to Dockerfile to fix
build failure. The migration crate is a path dependency required
by the main barycenter package.

Fixes Docker build error:
  error: failed to get `migration` as a dependency of package `barycenter`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 21:46:47 +01:00
Till Wegmueller
8e0107cd33
chore: release 0.2.0-alpha.14 2025-12-02 21:43:30 +01:00
Till Wegmueller
b6bf4ceee0
feat: migrate from raw SQL to SeaORM migrations
Replace raw SQL CREATE TABLE statements with proper SeaORM migration
system. This eliminates verbose SQL logs on startup and provides
proper migration tracking and rollback support.

Changes:
- Add sea-orm-migration dependency and migration crate
- Create initial migration (m20250101_000001) with all 8 tables
- Update storage::init() to only connect to database
- Run migrations automatically in main.rs on startup
- Remove unused detect_backend() function and imports

The migration system properly handles both SQLite and PostgreSQL
backends with appropriate type handling (e.g., BIGSERIAL vs INTEGER
for auto-increment columns).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 21:42:58 +01:00
Till Wegmueller
2a865b2ba4
feat: add full Kubernetes env var support to Helm chart
Add support for valueFrom in environment variables for both main
container and user-sync init container. This enables injecting
values from secrets, configMaps, fieldRefs, and resourceFieldRefs
instead of only hardcoded values.

Updated deployment template to use toYaml for env rendering,
allowing full Kubernetes env var specifications. Added comprehensive
documentation and examples in values.yaml.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 21:42:37 +01:00
Till Wegmueller
be4e0f8e71
fix: set config path for Helm chart containers
Add --config flag to both main container and user-sync init container
to explicitly specify the mounted config file path at /app/config/config.toml.
This fixes deserialization errors when the application couldn't find the
config file in the default working directory.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 14:23:52 +01:00
Till Wegmueller
e8a060d7c3
chore: formatting
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-12-01 00:01:11 +01:00
Till Wegmueller
06bff60122
fix: enable public registration for tests and fix env prefix
- Enable public registration in integration tests via environment variable
  BARYCENTER__SERVER__ALLOW_PUBLIC_REGISTRATION=true
- Fix environment variable prefix from CRABIDP to BARYCENTER to match
  documentation in CLAUDE.md
- All 4 integration tests now pass successfully

Fixes:
- test_oauth2_authorization_code_flow
- test_openidconnect_authorization_code_flow
- test_security_headers
- test_token_endpoint_cache_control

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 18:47:51 +01:00
Till Wegmueller
57a0df9080
feat: add user sync init container support to Helm chart
- Add userSync configuration to values.yaml (existingSecret only)
- Add conditional init container to deployment.yaml
- Create comprehensive README.md with:
  - Installation and configuration instructions
  - User sync workflow and examples
  - Troubleshooting guide
  - Security best practices
- Add examples/user-sync-secret.yaml with sample users
- Support declarative user management for Kubernetes/GitOps

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 18:44:18 +01:00
Till Wegmueller
f2f7f4be00
chore: release 0.2.0-alpha.13 2025-11-30 18:13:48 +01:00
Till Wegmueller
a1056bb237
feat: add admin GraphQL API, background jobs, and user sync CLI
Major Features:
- Admin GraphQL API with dual endpoints (Seaography + custom)
- Background job scheduler with execution tracking
- Idempotent user sync CLI for Kubernetes deployments
- Secure PUT /properties endpoint with Bearer token auth

Admin GraphQL API:
- Entity CRUD via Seaography at /admin/graphql
- Custom job management API at /admin/jobs
- Mutations: triggerJob
- Queries: jobLogs, availableJobs
- GraphiQL playgrounds for both endpoints

Background Jobs:
- tokio-cron-scheduler integration
- Automated cleanup of expired sessions (hourly)
- Automated cleanup of expired refresh tokens (hourly)
- Job execution tracking in database
- Manual job triggering via GraphQL

User Sync CLI:
- Command: barycenter sync-users --file users.json
- Idempotent user synchronization from JSON
- Creates new users with hashed passwords
- Updates existing users (enabled, email_verified, email)
- Syncs custom properties per user
- Perfect for Kubernetes init containers

Security Enhancements:
- PUT /properties endpoint requires Bearer token
- Users can only modify their own properties
- Public registration disabled by default
- Admin API on separate port for network isolation

Database:
- New job_executions table for job tracking
- User update functions (update_user, update_user_email)
- PostgreSQL + SQLite support maintained

Configuration:
- allow_public_registration setting (default: false)
- admin_port setting (default: main port + 1)

Documentation:
- Comprehensive Kubernetes deployment guide
- User sync JSON schema and examples
- Init container and CronJob examples
- Production deployment patterns

Files Added:
- src/admin_graphql.rs - GraphQL schema builders
- src/admin_mutations.rs - Custom mutations and queries
- src/jobs.rs - Job scheduler and tracking
- src/user_sync.rs - User sync logic
- src/entities/ - SeaORM entities (8 entities)
- docs/kubernetes-deployment.md - K8s deployment guide
- users.json.example - User sync example

Dependencies:
- tokio-cron-scheduler 0.13
- seaography 1.1.4
- async-graphql 7.0
- async-graphql-axum 7.0

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 18:06:50 +01:00
Till Wegmueller
06ff10dda9
chore: release 0.2.0-alpha.12 2025-11-29 20:52:42 +01:00
Till Wegmueller
0c9f8144bb
fix: add attestations write permission for manifest job 2025-11-29 20:52:06 +01:00
Till Wegmueller
3afdb6308e
chore: release 0.2.0-alpha.11 2025-11-29 20:46:00 +01:00
Till Wegmueller
80a56a137a
fix: extract manifest digest correctly for attestation 2025-11-29 20:45:04 +01:00
Till Wegmueller
6ef8f0b266
chore: release 0.2.0-alpha.10 2025-11-29 20:30:58 +01:00
Till Wegmueller
ececa59084
fix: use correct ARM64 runner label ubuntu-24.04-arm 2025-11-29 20:29:32 +01:00
Till Wegmueller
c381e00c37
chore: release 0.2.0-alpha.9 2025-11-29 17:36:59 +01:00
Till Wegmueller
656bdb5531
fix: move attestation to multi-platform manifest creation 2025-11-29 17:36:35 +01:00
Till Wegmueller
6e0fb3cb68
chore: release 0.2.0-alpha.8 2025-11-29 17:22:01 +01:00
Till Wegmueller
d3f6b47fdb
chore: add claude memory for the repo
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
2025-11-29 17:21:40 +01:00
Till Wegmueller
609f39813f
feat: use native ARM64 runners with matrix strategy for faster builds 2025-11-29 17:21:07 +01:00
Till Wegmueller
876c659292
chore: release 0.2.0-alpha.7 2025-11-29 16:41:28 +01:00
Till Wegmueller
94767f5554
fix: use platform-specific build caches to avoid race conditions 2025-11-29 16:41:06 +01:00