Files
ironclaw/profiles/server.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

22 lines
438 B
TOML

# IronClaw Profile: server
#
# Single-user server deployment with PostgreSQL, web gateway, Docker sandbox,
# and proactive background features enabled.
#
# Required environment variables:
# DATABASE_URL=postgres://user:pass@host/db
#
# Usage: set IRONCLAW_PROFILE=server in your environment or .env file.
database_backend = "postgres"
[sandbox]
enabled = true
policy = "readonly"
[heartbeat]
enabled = true
[hygiene]
enabled = true