Forgeplane secret management
Forgeplane treats secrets as governed project resources, not as free-form run inputs. The model separates three concerns:
- a logical secret that has a stable name, classification, policy, and lifecycle;
- a secret source that defines where the value is resolved; and
- a template binding that connects a declared secret input to the logical secret.
This separation lets teams change a source or binding without changing the template’s input contract. Secret values stay out of ordinary environment variables, template source, and normal API or UI resource fields.
Logical secrets
Section titled “Logical secrets”A logical secret is the stable object you govern over time. Its key properties include:
| Property | Values |
|---|---|
| Lifecycle state | draft, active, degraded, blocked, archived |
| Classification | low, medium, high, critical |
| Value contract | opaque_string, json_string, pem_certificate |
| Policy severity | none, warn, block |
Use classification and policy to express how the secret should be handled. A logical secret is not the same thing as the provider record that supplies its current value.
Secret sources
Section titled “Secret sources”A source points to the backend from which Forgeplane resolves a value. Supported source kinds include:
builtin_stored_valuevaultaws_secrets_managergcp_secret_managerazure_key_vault
Source behavior also records:
- selector mode:
fixedorfloating; - ownership mode:
referencedormanaged; and - health status:
unknown,healthy,degraded, orunhealthy.
A managed source is operated through Forgeplane’s governed lifecycle. A referenced source remains owned by its external system. Keep the source’s credentials and backend policy in the deployment’s secret-management boundary.
AWS Secrets Manager sources use only the explicit AWS Connection credential. Stored keys/session credentials, stored-key assume-role, and stored-token web identity are supported; coordinator profiles and ambient credentials are not. Malformed credentials fail local validation even for a pinned version. Provider rejection fails checks and materialization without falling back to another identity. Existing ambient-dependent connections require correction and fresh source/binding validation under the hard-cutover procedure.
GCP Secret Manager sources use the explicit GCP Connection identity: an inline service-account key or explicitly selected operator-owned workload ADC. Connection-supplied federation/user/impersonation JSON and custom endpoints are unsupported; explicit credential failures never fall back to ADC. Pinned GCP version resolution is metadata-only, not credential qualification. Latest source/binding checks and value acquisition enforce the boundary. Correct unsupported profiles and revalidate affected sources and bindings before admitting new runs under the hard-cutover procedure.
Replace an unavailable credential with a built-in value
Section titled “Replace an unavailable credential with a built-in value”Use this flow only where the target coordinator declares the
/api/v1/secrets/{id}/builtin-replacements operations in /api/docs.
Check the runtime API contract before use; this guide does
not establish availability in an installed release.
An authorized principal can supply a new built-in credential without reading old material or calling the old source plugin. Replacement changes the active source of the shared logical secret, not one binding: all future eligible uses select the replacement. Existing Run pins, old sources, history, and lease cleanup remain unchanged. Replacement does not revoke the provider credential or bypass normal binding validation, permissions, approvals, or readiness.
Use an authenticated client over the protected administrative API. Supply the
new value only in the write-only new_value JSON property, never in a URL,
browser form, shell argument, or retained request log. Responses and the review
page contain metadata only; normal authentication and CSRF requirements apply.
GET /api/v1/secrets/{id}/builtin-replacementsreturnsexpected, the current secret/source/value selection. An active source is required.POSTto the same path with unchangedexpectedandnew_valueprepares an inactive, fixed built-in source in the existing encrypted value store. Saveprepared_idandexpected; preparation does not switch sources.- In Edit secret → Prepared replacement, enter the prepared ID and select Review replacement. The preparing principal must also commit it.
- Select Use replacement, or
POSTthe savedexpectedin a JSON object to/api/v1/secrets/{id}/builtin-replacements/{prepared_id}/commit. Activation, audit evidence, and the committed receipt are atomic. - Perform normal binding validation before starting new work.
Preparation and commit recheck current secret-update and applicable old Connection-use permission, credentials, ownership, and exact selection revisions. Both user-owned and team-owned service accounts can perform this replacement with their own authority; creator records identify the actual service account, not its owner. This does not change the separate template-run creation limits. Ordinary source activation cannot activate an uncommitted replacement.
Conflicts, retries, and rollback
Section titled “Conflicts, retries, and rollback”A stale selection or changed ownership conflicts without switching sources.
Use Refresh receipt, or
GET /api/v1/secrets/{id}/builtin-replacements/{prepared_id}, to inspect the
original preparation. can_commit requires the active selection and exact
prepared source/value to remain eligible; commit rechecks them.
After a lost commit response, an authorized identical commit retry returns the original committed receipt without reactivating a source that has since been replaced. A committed receipt records historical success, not current provider validity. Inspection still requires current authority; revoked access does not prove that an earlier commit failed.
Preparation is not idempotent: a lost response may leave an inactive staged source, and another preparation creates a separate one. Keep the preparation ID when available and do not automatically retry preparation.
Migration 000053 preserves historical User creators and records service-account
creators with restrictive foreign keys. Its down migration refuses rollback
while service-account-created sources or values exist. Do not delete or relabel
history to force rollback; plan a forward repair or separate restoration.
This replacement flow does not grant commercial exit-remediation authority,
automatically switch backends, or implement guided migration-out.
Bind secrets to templates
Section titled “Bind secrets to templates”A template input becomes a secret slot only when a direct top-level input property has the boolean annotation x-forgeplane-secret: true. The guided editor’s Bind through secret catalog option emits this marker. Root, nested-object, array-item, and conditional-branch slot declarations are rejected. Ordinary nested inputs remain valid.
Sensitivity does not imply secret binding. The boolean flags sensitive, secret, writeOnly, x-sensitive, x-secret, and x-forgeplane-secret control redaction, but only x-forgeplane-secret: true creates a catalog-bound slot and rejects inline values. x-secret and writeOnly are redaction-only annotations. Non-boolean known flags are rejected.
Bindings connect a marked template slot to a logical secret at either project or environment scope. A binding is either bound or disabled.
Use Environments for deployment-specific bindings and policy. Do not place secret values in environment variables or ordinary input defaults.
Runtime flow
Section titled “Runtime flow”For a scheduled run:
- the coordinator validates the template schema, binding scope, and trust state for required and configured optional slots;
- the coordinator resolves the source and materializes the payload for the execution bundle;
- the worker validates the bundle’s trust metadata before tool execution; and
- the run fails closed when a required or configured optional secret is not eligible.
An optional slot is omitted only when it is unconfigured or explicitly disabled. A configured optional slot with a missing, unhealthy, expired, or policy-blocked source blocks readiness and execution. Infrastructure and credential-resolution failures are explicit errors, not ordinary stale-validation blockers.
Readiness evaluates recorded trust evidence and connection metadata; it does not resolve connection credentials or prove they remain usable. Source validation and protected materialization still resolve credentials under current authority and fail explicitly if they are unavailable.
Resolved plaintext is used for tool execution. It is not returned as an ordinary API or UI field. See Connections for non-secret provider configuration and encrypted connection credentials.
Retry established selections
Section titled “Retry established selections”Successful materialization establishes the run’s Secret, source, version, and any omitted slots. Requeue keeps those selections: replacing, removing, or disabling the current binding affects new runs, not an already established pin. A failed fetch or confirmed rollback establishes no new selection. An unconfirmed commit returns an error and no values, but may have persisted the selection; retry reads the existing evidence. Missing or inconsistent selection evidence fails explicitly rather than falling back to today’s binding.
Retries still recheck current Secret/source availability, connection state, dependency trust, and the platform-wide floating-selector disable policy. A newer floating version or its acknowledgment requirement does not replace an otherwise eligible older pin.
Trust expires at the earliest applicable source or original-binding deadline, including validation TTLs, and the worker independently enforces it. Existing authorized validation can renew only the unchanged original context, not a replacement binding or another version. If that context cannot be renewed, repair and validate the current binding and start a new run.
Rollback compensation of newly fetched dynamic leases is best effort: process loss, a lost provider response, or failed revocation still requires lease maintenance or provider expiry.
Managed actions and approval
Section titled “Managed actions and approval”Destructive managed-source operations use a dedicated approval workflow rather than an immediate mutation. For example, delete_source uses these approval states:
pendingapprovedrejectedapplied
Timeouts and defaults are controlled by secret_approval_* system settings. Approval authorizes the specific managed action; it does not expose the secret value.
For a managed external source, delete_source approval and source archival are
local Forgeplane operations, not provider-entry deletion. An approved request
is not yet an applied action: complete the existing source archival flow and
check for applied. Built-in stored values need no external-source approval;
referenced external sources detach without that approval. Provider entries are
never deleted by source archival or Project deletion.
Project deletion
Section titled “Project deletion”Before deleting a Project:
- Fully archive every logical secret: both its lifecycle and archive timestamp must record archival. Active, draft and incompletely archived secrets block deletion.
- Archive/deactivate managed external sources through the existing source flow,
with an
applieddelete_sourceapproval. Approval alone is not application. - Let the existing materialization/reconciler workflow clear all lease metadata. Expired leases, leases without an expiry, and pending or orphaned revocation still block deletion. Expiry or a best-effort cleanup return does not prove revocation; resolve orphaned leases without discarding their cleanup ownership.
An uncleared lease or another failed eligibility check refuses the deletion atomically, preserving the catalog and existing cleanup ownership. Project deletion performs no provider operations, lease-cleanup retries or orphan resolution.
Successful Project deletion atomically purges the local logical secrets, bindings, stored-value versions and ciphertext, source configuration, checks and approval working rows. Completed Runs and canonical audit history remain, with value-free per-slot provenance: original materialization, secret and source IDs, slot, resolved version, source kind and creation time. No encrypted stored value or catalog tombstone remains. Deleting an Environment does not retire the Project’s secret catalog.
See Deleting core parents for active-work blockers and the original deletion-outcome flow.
Governance settings
Section titled “Governance settings”Secret governance defaults include:
secret_approval_self_approval_default_enabledsecret_approval_pending_timeout_minutessecret_approval_maintenance_*secret_floating_behavior_modesecret_floating_drift_default_reactionsecret_floating_require_acksecret_approval_independent_min_classification
See System settings for exact defaults and valid ranges. Use the Permissions and roles reference to check which identities may manage, use, or approve secret-related operations.
Plugin resource references
Section titled “Plugin resource references”Opted-in Host-1.6 plugins can expose a resource-level logical-reference panel. This is separate from Template bindings and the runtime flow above: reference readiness is metadata only, not a plugin protected-materialization or provider delivery promise. Settings authority grants no Project-secret discovery.