Remediation
Remediation APIs and packages
Use the API and SDK compatible with the installed Service artifact. The build-specific OpenAPI covers ordinary endpoint/interlay management; matching source contracts also describe runtime-mounted native and package resources. Management calls use the existing organization authentication under /api/v1. A method in a source table does not enable a disabled feature.
Declarative configuration
POST /api/v1/interlays and PATCH /api/v1/interlays/{interlay} accept a supported settings.remediation declaration with Configure permission. PATCH replaces the entire settings object: first read existing settings and retain unrelated fields. A harmless example of the remediation value is:
{
"version": 1,
"profile": "http-structure-v1",
"policy": {
"version": 1,
"rules": [{
"scope": {"methods": ["POST"], "path": "/records"},
"require": {"kind": "json_members_absent", "members": ["debug_override"]}
}]
}
}This refuses the selected root member; it does not remove it. This fragment is not the complete PATCH body. Prefer importing a package and publishing its exact returned configuration so the running revision has a package identity.
Read GET /api/v1/interlays/{interlay} with X-Eden-Verbose: true for local remediation_status. This single-interlay GET requires Configure in the reference source. Verify a running listener, desired/effective digests and runtime revision, not only saved settings. Read-only package/inventory resources are listed below. Interrupted shard delivery can leave desired state saved without current readiness.
Standard immutable packaging
Native and API/declarative patches use the same schema-2 package. It contains namespace/name/release, publisher/visibility, applicability, license/limitations, compatibility and exact payload/README identities. A package release, archive SHA-256, payload SHA-256, schema, native ABI and engine version are distinct.
The canonical SDK producer uses this create-only command from matching source:
cargo run --locked -p eden-gateway-remediation --features native-modules \
--example package -- manifest.json README.md patch.tar module.soFor native_policy, omit module.so; the producer derives the declarative payload. For rust_module, supply separately compiled optimized native code and its actual producing manifest. The package manifest's signatures must be []: new envelope-signature verification is deferred, and unsupported nonempty values refuse. Native executable admission still requires its existing signatures and independent host approval.
| Operation | Required permission and result |
|---|---|
PUT /api/v1/interlays/{interlay}/patch-packages/{package_sha256} | Configure; exact raw archive; new import 201, exact duplicate 200. |
GET /api/v1/interlays/{interlay}/patch-packages/{package_sha256} | Read; exact retained archive bytes and archive-hash ETag. |
PUT /api/v1/interlays/{interlay}/native-artifacts/{artifact_sha256} | Configure; legacy raw executable and X-Eden-Native-Manifest; no activation or invented release metadata. |
For an authorized installed CLI context:
eden api request PUT "/api/v1/interlays/$INTERLAY/patch-packages/$PACKAGE_SHA" \
--body-file patch.tar --content-type application/vnd.eden.patch-package.v2+tar --confirm
eden api request GET "/api/v1/interlays/$INTERLAY/patch-packages/$PACKAGE_SHA" > exact-package.tarCompare the download with the expected archive SHA. Registry delivery obtains the exact authorized release and sends these same verified bytes to the import API; Service does not fetch an arbitrary caller URL. Publisher ownership, entitlement and registry-host authentication remain separate from content claims. Shared adapter qualification does not imply a deployed Marketplace or provider KMS integration.
Import returns package and package-bound configuration, with explicit activation still required. Use that configuration unchanged. A new release can reuse a binary, but an existing namespace/name/release cannot be overwritten with different archive bytes. Attach its package reference before native signing.
Signed native lifecycle
The qualified native host is single-node Linux x86-64 with a private artifact root and separately configured host approver principals. Tenant permissions alone cannot grant native host authority; HA refuses this profile. Use its actual installation contract, not an ad hoc development identity.
All actions below are JSON POSTs to /api/v1/interlays/{interlay}/native-authority:
| Action | Fields besides action | Permission |
|---|---|---|
enroll_key | key: immutable publisher public key DTO | Configure + Grant |
revoke_key | key UUID | Configure + Grant |
inventory | sha256, optional software, expected_revision, valid_seconds | Host principal; Configure + Grant |
inspect | configuration | Configure |
approve | key, grant, configuration, valid_seconds | Host principal; Configure + Grant |
revoke_approval | grant | Host principal; Configure + Grant |
admit | typed signed activation, configuration | Configure + Promote |
activate | operation UUID | Configure + Promote |
revoke | operation UUID | Configure + Promote |
reclaim | retired operation UUID | Configure + Promote |
receipt | operation UUID | Read |
The sequence is public-key enrollment and trusted actual software inventory, inert import, inspection, independent host approval, typed publisher signing, admission and activation. inspect derives actual code/manifest/dependency, policy, capability, ABI and host bindings without mapping code. The host approval binds those exact inspected inputs. Approval/inventory validity is 1–86,400 seconds. Version-scoped v3 enforcement requires actual typed product/version inventory; a legacy digest alone is insufficient.
Use NativeActivationStatement::signing_bytes() from the matching SDK. The signature uses fixed-domain Ed25519 over typed Borsh bytes, not JSON or JWT. The signed statement binds the actual scope, host/process, package-bound policy, operation, predecessor, capabilities and validity. No private signing material belongs in an API request or published evidence.
Admission prepares a candidate; activation publishes its desired revision and observes shard delivery. Responses include receipt and serving_now. A 202, admitted, loading or desired phase is not current effective protection. Require the exact expected shard acknowledgments and actual current scope. Read the original operation receipt if a command's response is lost; do not silently launch a second executable load.
Revocation retains required protection and fails closed. Disabling that intent requires an explicitly approved signed replacement (mode: "telemetry", required: false), not just revoke. Neither operation undoes prior effects. reclaim attempts physical collection of an eligible retired closed-lifetime image; only actual fully_reclaimed evidence permits credit. Uncertain/held or default pinned images stay charged. Restart does not restore native preparation: new approval and a signed operation must bind the new process incarnation.
Atomically read the machine inventory
Read-authorized clients use:
GET /api/v1/interlays/patch-packages/running.toml
GET /api/v1/interlays/patch-packages/manifest.json?generation=NFirst retain the TOML response's X-Eden-Inventory-Generation and strong SHA-256 ETag. Request the manifest with that generation, verify its ETag and the manifest digest embedded in TOML, and cross-check tenant, node, process incarnation and entry states. Both resources accept the generation parameter.
They are one committed database bundle, not two independently renamed files. If a concurrent change produces a coded conflict, discard that attempted pair and start a new pair deliberately. Historical generations are not served by this current-state endpoint. Two unpinned GETs can straddle a change.
The view distinguishes desired, effective, unavailable/stopped and retired awaiting reclamation. Legacy metadata is legacy_unknown; it has no invented package release. A local ready entry does not prove fleet coverage, future availability or the outcome of a particular vulnerability request.
Errors and telemetry
Use central eden-core EpError codes and their HTTP status. Service failures retain the existing coded plain-text contract rather than a new JSON envelope. Examples include 400/E040C unsupported profile, 400/E1A62 package digest mismatch, 400/E1A64 unavailable envelope-signature verification, 409/E1A6A immutable release conflict and 409/E1A51 stale permission. Preserve raw error responses before interpreting them.
Correlate operation/revision identities through payload-safe logs and traces. Metrics use bounded lifecycle/outcome/error labels. Export counters, queue/loss accounting and independent backend observations qualify telemetry claims; a shared trace alone is not one-to-one request causality or lossless delivery.
See the pinned native authority contract, actual action DTOs and package/inventory contract.