Runtime Profiles Draft

Conman Runtime Profiles (Draft)

1) Problem Statement

Conman currently models deployment environments and temporary databases, but the real operational unit is broader than a database:

This draft introduces a single abstraction to represent that unit consistently for permanent environments and temporary workspace/changeset environments.

1.1) Decisions Captured

2) Proposed Abstraction

Runtime Profile

A Runtime Profile is the full runtime configuration required to execute and validate an app build/release.

Suggested shape:

3) Mapping to Existing Model

4) Baseline for Workspace Temp DBs

Candidate default for v1:

Rationale:

5) Suggested V1 Scope

  1. Add runtime profile storage and references.
  2. Allow per-environment env vars + URL + DB config.
  3. Temp env provisioning chooses a base profile and clone strategy.
  4. Persist profile revisions (append-only) for auditability.
  5. Encrypt secrets at rest in Conman (no external dependency required for v1).
  6. Support changeset-bound profile overrides that can be released/promoted.
  7. Enforce override-key conflict detection during queue/release composition.
  8. Track applied migration metadata in Conman for drift and gating decisions.
  9. Support app-admin direct profile edits with audit and drift-triggered revalidation requirements.
  10. Support secret masking/reveal policy (app_admin plaintext only).

6) Non-Goals (Initial Draft)

7) Resolved v1 Policy

  1. Secret encryption model:
    • Envelope encryption in-app.
    • Service master key in config, manual key rollover in v1.
  2. Database clone strategy (MongoDB):
    • Snapshot clone by default, dump/restore fallback.
  3. URL generation:
    • Host pattern uses readable short IDs: {app}-{kind}-{word}.<domain>.
  4. Changeset-coupled profile overrides:
    • Stored in changeset_profile_overrides.
    • Auto-included on submit with submit summary.
  5. Validation gates:
    • submit: temp profile only.
    • release publish: environment profiles only.
    • deploy: target environment profile only.
  6. Secret visibility:
    • app_admin can reveal plaintext.
    • Other roles see masked values.
    • Masking policy:
      • length <= 8: show last 4 characters only.
      • length > 8: show first 4 and last 4.
  7. Drift remediation:
    • Deployment remains blocked until revalidation passes.
    • UX offers creation of a drift-fix changeset.

8) Implementation Direction (v1)