Files
ironclaw/profiles/server-multitenant.toml
firat.sertgoz 152e8b05fc feat: add extensible deployment profiles (IRONCLAW_PROFILE) (#2203)
* feat: add extensible deployment profiles (IRONCLAW_PROFILE)

Add a profile system that lets users select a deployment shape with a
single env var. Profiles are partial Settings TOML files merged onto
defaults before config.toml and DB overlays.

Built-in profiles: local, local-sandbox, server, server-multitenant.
Users can create custom profiles in ~/.ironclaw/profiles/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address review comments — path traversal, case normalization, override order, formatting

- Sanitize IRONCLAW_PROFILE to reject path traversal attempts (/, \, ..)
- Normalize profile name to lowercase for both user-path and built-in lookups
- Fix load_bootstrap_settings to use Settings::default() matching from_env() pattern
- Collapse .unwrap_or_default() onto one line to satisfy rustfmt
- Improve user_profile_overrides_builtin test to exercise actual merge logic
- Add path_traversal_rejected test with 5 malicious name patterns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 19:28:40 +03:00

30 lines
708 B
TOML

# IronClaw Profile: server-multitenant
#
# Multi-user SaaS deployment. Builds on the 'server' profile with higher
# concurrency limits.
#
# Required environment variables:
# DATABASE_URL=postgres://user:pass@host/db
# AGENT_MULTI_TENANT=true (env-only, cannot be set via profile)
#
# Recommended environment variables:
# MAX_COST_PER_USER_PER_DAY_CENTS=1000 (env-only cost controls)
# GATEWAY_AUTH_TOKEN=<secret> (env-only auth)
#
# Usage: set IRONCLAW_PROFILE=server-multitenant in your environment or .env file.
database_backend = "postgres"
[agent]
max_parallel_jobs = 10
[sandbox]
enabled = true
policy = "readonly"
[heartbeat]
enabled = true
[hygiene]
enabled = true