Repository navigation
PRÆTORE v0.3.2
Post-hoc ingestion of safety actions that executors of AI-enabled systems
already ran (G1, format 2: #92, #94, #95; migrations 0016 to 0018), the
safety namespace manifest (G2), mission safety classes in policies (G7,
policy format 2), HighAssurance receipts in the Claude Code hook example,
the walkthrough demo, and the v0.3.1 follow-ups. GitHub release with
checksums only; nothing is published to crates.io.
Known limitations (planned for v0.3.3)
- R7: any role of the database can take a tenant's ingestion lock. The
per-tenant PostgreSQL advisory lock needs no privilege, so a session of
another tenant's ingester, of the gateway or of any other login can hold
it and keep that tenant'spraetore-safety-ingestfrom starting (denial
of service; it cannot read or write the tenant's records). The refusal
andpraetore-safety-ingest doctorname the holding session
(docs/operations.md, "Deployment"). - L95-1: a group-writable socket directory. With
PRAETORE_SAFETY_SOCKET_GROUPthe socket's parent directory may be
writable by that group. A member of the group can then remove or replace
the socket (executors would report to another process, and those events
would be lost; it cannot sign records) or entries the ingester creates
there at startup (which then fails). By replacing the temporary entry
the ingester binds in (.bind-<pid>) with a symbolic link, a member can
also make thechmod/chownof that startup apply to another file of the
ingester's user, for example its signing key (which would then be
readable by the group). Give the directory the sticky bit (chmod 1770)
or keep it writable by the ingester's user only (docs/operations.md,
"Deployment").
Changes
-
Post-hoc safety ingestion: format 2 and hardening (G1 follow-ups, #94,
#95). Changes the G1 format of #92 before its first release; records
written by an earlier build ofmain(format 1) cannot be read and must
be exported and removed first (docs/operations.md, "Source epochs").- Format 2: every event signs
source_epoch, the source's run (persisted
bypraetore_safety_client::EpochFile, which fails closed instead of
starting again from 1);source_seqstarts at 1 in each epoch and a
chain is a sequence of segments, one per epoch. Every record of a source
chain signshigh_waterandsource_epoch; the ingester resumes from
the last signed record only (SafetyIngestor::resume_heads, replacing
set_heads;IngestorConfig::headsis removed), andcommitnow
returns an error unless the records extend the current head. - New
rejectedreasonsseq_jump_too_large,stale_epochand
epoch_jump_too_large(bounded byPRAETORE_SAFETY_MAX_SEQ_JUMPand
PRAETORE_SAFETY_MAX_EPOCH_JUMP, which also bounds a chain's first
epoch); an
event far from the ingester's clock carriesclock_skew_seconds
(PRAETORE_SAFETY_MAX_CLOCK_SKEW_SECONDS). A chain head signed by an
unregistered ingestion key fails closed; previous keys of a rotation are
listed inPRAETORE_SAFETY_PREVIOUS_INGEST_PINS_FILE. - Rate limits per source (spent only by events that can advance the
chain) and for every other input, replays included
(PRAETORE_SAFETY_SOURCE_RATE/_BURST,
PRAETORE_SAFETY_REJECTED_RATE/_BURST), and on Linux a sender user id
check (PRAETORE_SAFETY_ALLOWED_UIDS,SCM_CREDENTIALS; refused at
startup on other platforms). What is not recorded one by one is added to
signed counts on_unattributed(lossreasonsrate_limited,
rejected_suppressed,duplicate,peer_refused). Decision
change: an exact duplicate no longer creates aduplicaterecord; it
is counted (aconflictis still recorded, and the verifier still
acceptsduplicaterecords). - Migration
0017_safety_records_followups: thesource_epochcolumn,
record_idunique per tenant, the columns checked against the signed
high_waterandsource_epoch, and the tenant registry
praetore.safety_ingest_tenants(one login role and one ingestion key
per tenant, registered by the schema owner). Row-level security on
safety_recordsfollows the registered role instead of the
praetore.tenant_idsetting, and the insert trigger accepts only
records naming the tenant's registered key. The ingester and the
exporter check the registration at startup. A documented manual
rollback of 0016 to 0018 (docs/rollback/g1-safety-records.sql) is
tested in CI. - Migration
0018_safety_audit_and_role_oids: registrations name the
login role by OID ('<role>'::regrole), so a role dropped and created
again with the same name is not registered; the read-only group
praetore_safety_auditandpraetore.safety_audit_tenantslet a login
role export and audit the tenants it is registered for, without write
access (verify_safety_audit_role_with). PRAETORE_SAFETY_MAX_EPOCH_JUMPbounds the step ofsource_epochand a
chain's first epoch. The ingester binds its socket without changing the
process umask.praetore journal-export --safety --from-seq N [--limit M]exports a
chain in ranges, each anchored on the record before it, and
praetore-verify safety-journal --range [--expected-anchor HEX]
verifies one. Without--expected-headthe verifier now warns
(head_not_anchored). It reports epochs anddropped_by_reason.- Known limitation: the per-tenant advisory lock needs no privilege,
so any role of the database can hold a tenant's lock and keep its
ingester from starting (denial of service only). The refusal and
praetore-safety-ingest doctorname the holding session. A lock that
only the tenant's registered role can take is planned for v0.3.3. - CI runs every ignored PostgreSQL test one by one
(scripts/postgres-ignored-tests.sh) and every G1 end-to-end test.
- Format 2: every event signs
-
Walkthrough demo.
make demo(orcargo run --locked -p praetore-core --example demo) runs three decisions of a simulated agent (allowed, denied
by a policy rule, outside its authority), exports the signed receipts as a
hash-linked chain, verifies it and rejects two altered copies;make demo-verifyre-checks the chain withpraetore-verify. Demonstration
configuration only: in-memory replay guard and a fixed freshness lease with
no revocation source. Seedocs/DEMO.md. Runs in CI (assurance.yml). -
Post-hoc safety ingestion (G1, SAF-09.5, #92). Safety actions that an
executor of an AI-enabled system already ran can be recorded, isolated from
the decision path. New modulepraetore_core::safety_ingest:
SafetyEvent(signed by aSafetySourceKeyunder
PRAETORE_SAFETY_EVENT_V1\0:source_id, monotonicsource_seq, the raw
action name,occurred_atby the source clock, optional boundedparams,
post_hoc: true),SafetyRecord(signed by aSafetyIngestKeyunder
PRAETORE_SAFETY_RECORD_V1\0, chained per source inside the signed
payload; statusesaccepted,undeclared,invalid_name,duplicate,
conflict,late,rejected,loss), theSafetyIngestorstate machine
andverify_safety_chain. Key ids usePRAETORE_SAFETY_SOURCE_KEY_V1\0ed25519\0
andPRAETORE_SAFETY_INGEST_KEY_V1\0ed25519\0. New crate
praetore-safety-client: one non-blocking Unix datagram per event, no
retry; on failure the event is dropped and counted locally. New binary
praetore-safety-ingest(inpraetore-cli;run,doctor,
public-key): its own process, database role and key; verifies the safety
namespace manifest and refuses any two roles with the same key at
startup, without a flag; a0600(or0660with a group) socket in a
directory it owns; a bounded queue whose overflow, like a database outage,
becomes a signed loss record; one ingester per tenant (advisory lock);
graceful shutdown. Migration0016_safety_records: table
praetore.safety_records(append-only by trigger, an insert trigger that
refuses a row that does not extend its chain or whose columns are not its
signed fields, forced row-level security per tenant) and the NOLOGIN group
praetore_safety_ingest(USAGEon the schema,SELECTon
schema_migrations,SELECT,INSERTonsafety_records); creating it
needsCREATEROLEin the migrating role, checked before any migration
(MigrationError::GroupRoleMissing).verify_safety_ingest_role_with
checks the ingester's role, andverify_runtime_rolenow refuses a
gateway role that can insert safety records
(RuntimeRoleError::RoleSeparation). New exportpraetore journal-export --safety --tenant UUID --source ID --ingest-pin HEX_FILE(verifies before
writing, never overwrites; readsPRAETORE_SAFETY_DATABASE_URL) and new
verifier commandpraetore-verify safety-journal --journal JSONL --ingest-pin HEX_FILE [--source-pins JSONL] [--expected-head HEX], which
checks record signatures, the chain,source_seqcontinuity (gaps covered
by loss records), duplicates and conflicts, event signatures and the head,
and reports the count of each status. Format:
docs/proposals/safety-ingestion-jsonl.md. New fuzz target
safety_ingest; new CI jobg1-mutation. Transport v1 is local only;
HTTP with mutual TLS is future work. -
Safety namespace manifest (G2). New module
praetore_core::safety_namespace.SafetyActionName::parseis the one
validator ofsafety:*names (exact ASCII prefixsafety:, printable
ASCII, a name that starts with an ASCII letter or digit, at most
MAX_SAFETY_ACTION_NAME_BYTES= 128 bytes), with the typed
SafetyNameError.Policy::validateuses it for everySafetyentry, so
aSafetyentry longer than 128 bytes now fails to load with the new
ActionClassError::SafetyNameTooLong(G7 accepted up to 1024 bytes).
SafetyNamespaceManifest(schema version 1) is a signed, canonical JSON
statement of theSafetynames of one format 2 policy, bound to its
digest, id and version, built deterministically by
SafetyNamespaceManifest::from_policy. It is signed by a dedicated
SafetyNamespaceKey(not the attester or issuer key) under the new domain
PRAETORE_SAFETY_NAMESPACE_V1\0, with key ids under
PRAETORE_SAFETY_NAMESPACE_KEY_V1\0ed25519\0.verifychecks it against a
pinned key,verify_matches_policyagainst a policy (digest and exact
list), andclassify_nameanswersDeclaredorUndeclaredfor the
ingestion path;ensure_distinct_keysrefuses the same key in the
namespace and attester or issuer roles (SameKeyForBothRoles). Only the
canonical encoding parses (from_json); a manifest file is that document
and one newline (to_file,from_file). New commands:praetore policy safety-manifest --policy P --key K --output NEW_FILE [--other-pin A]...
(never overwrites; writes a syncedO_TMPFILEor temporary file, links
it to the output name and checks the linked entry; needs a filesystem
with hard links; reads the key withO_NOFOLLOW, checks the open
descriptor and, on macOS, refuses extended ACLs) andpraetore-verify safety-manifest --manifest M --pin K [--policy P] [--other-pin A]...,
both with--format json|text;--other-pin(alias--attester-pin)
refuses a namespace key equal to an attester or issuer key. The manifest authorizes nothing and is not read on
the decision path. Golden vector
docs/golden/safety-namespace-manifest-v1.json; new fuzz target
safety_namespace. -
Claude Code hook example: HighAssurance receipts.
examples/claude-code-hooknow evaluates with
AuthorizationEngine::production(HighAssurance) instead ofstrict.
Every receipt it writes, theunclassifiedDENY included, records the
engine's signed decision time (decided_at), sopraetore-verify evidence --issuer-pinschecks the authority and the issuer pin at that instant and
--require-decision-timeaccepts it. Intents are signed v2 for the
audiencepraetore-claude-hook, valid for 60 s. The replay guard is a
durable local claim store in the hook state (replay/): one file per
request, created withcreate_new(O_CREAT|O_EXCL) andfsynced with
its directories; on every claim the store must be a real directory owned
by the current user with no group/other bits and (macOS) no extended ACL
entries, and the state directory must be owned by the user and not
group/other-writable; any store error denies without a receipt. The guard
records each signed request's claim once; it does not deduplicate tool
calls (each invocation builds a new request).receipts.jsonlis now
fsynced after each append (and its directory on creation); a claim can
remain without a receipt when that write fails, and the call is denied.
Each receipt signs Claude Code'stool_use_id(claude.tool_use_id, a
string or number up to 128 bytes; a longer one or another JSON type is
evaluated asunregisteredand recorded only aspraetore.claim_rejected;
a missing one is not recorded). Thereceipts.jsonlline carries an
unsigned copy only when the receipt signs one;verifyandexport
refuse an unsigned copy on a HighAssurance receipt that signs none, and
exporttakes it only from the signed context. Unparseable hook input is
denied with a fixed message that does not quote input values. The guard does not forge receipts and does not
deduplicate invocations: a re-delivered tool call is evaluated again, and
the hook'sverifywarns (without failing) abouttool_use_ids signed in
more than one receipt. An unanalyzable shell command is now denied (rule
deny-unanalyzable-command, signed receipt) instead of held for approval.
A DENY with a receipt shows only its reason class (capability,path,
unregistered,unclassified,unanalyzable_command, use simple commands) and the evidence id, never the rule id or text; a
RequireApproval message also includes the evidence id.
Freshness is
local (60 s lease, no revocation source).initcreatesreplay/; state
created before this change has none and is refused with a message that
points toinit(same pattern as the SAF-14 check). Profiles and
per-agent keys (SAF-14), G7 classification and declared Safety tools
(no decision, no receipt) are unchanged, and so is the receipt format.
The hook'sverifychecks the authority atdecided_atwhen a receipt
records it.verify.shtakes--require-decision-time;demo.shchecks
that the bundle it regenerates is HighAssurance. The committedbundle/
and sets 03, 04 and 05 are unchanged and verify as before (they fail
--require-decision-time, as expected).evidence/VERIFY.mdsection 7
describes how to record new sets 04 and 05 with this hook. The G7 hook
mutant (scripts/g7-mutants/hook.patch) is rebased onto the new code. -
Claude Code hook example: no subagent profile gets
process:executeby
default (GHSA-wg33-3h8v-xvqw). The hook sees a command's text, not what
it does when it runs, soBashunderprocess:executeis equivalent to
every other capability; the README now says so, and that the.claude/
write rule for subagents holds for Write/Edit only.coderloses
process:executeinPROFILES(the main session keeps it) and
agents/coder.mdno longer listsBash. State written by an earlier
initkeeps what it was issued; the README documents re-runninginit
into a new directory. As defense in depth, not a boundary, theBashscan
now also flags an analyzable command whose words name<root>/.claudeor
<root>/.git, a path outside the project root, or a common network tool,
and the default policy holds each for approval
(approval-command-touches-protected-path,approval-command-leaves-root,
approval-command-uses-network).initwrites the root to
project-rootin the state directory. The README documents running
Bashunder Claude Code's sandbox. Receipt format unchanged; committed
evidence not regenerated (bundle/predates the change). -
Claude Code hook example: client configuration is protected from
subagent writes (GHSA-wg33-3h8v-xvqw). Writes to the project paths Claude
Code lists as protected in its permission modes (.mcp.json,.vscode/,
.cargo/,.husky/,.envrc, shell startup files, and the rest of that
list) are denied to every profile exceptmain
(deny-subagent-client-config-writes), andmainneeds approval
(approval-main-client-config-writes); theBashscan flags the same
paths. The hook also denies commands (claude:exec) to every profile
exceptmainwhatever its authority grants, warns on stderr about state
withoutproject-rootor with a subagent holdingprocess:execute, fails
closed on an invalidproject-root, and mapsMonitorandPowerShellto
claude:exec(PowerShellis never analyzed, somainneeds approval).
The format-1 policy error now recommends a freshinit. -
Claude Code hook example: protected names compared after Unicode
folding; writes to them reserved tomainin the binary
(GHSA-wg33-3h8v-xvqw). Path components are compared after dropping
default-ignorable code points, NFKC and full case folding (caseless,
unicode-normalization, the versions praetore-mcp uses), and for every
profile exceptmaina write to a non-ASCII component that starts with
.or whose folded form differs from its ASCII lowercase form is denied
(mainneeds approval). A write that would complete a bare git repository
(HEAD,config,objects,refs) is held the same way. The hook now
denies, whatever the policy says, a write by a profile other thanmain
to client configuration,.claude,.gitor a path that failed its
check, evaluated asunregisteredwith a signed receipt; without
project-rootevery such write is denied. Anagent_idwithout an
agent_typeis evaluated asunregistered, the governance rules name
every profile exceptmain, and a write tool without its path parameter
is denied. -
Claude Code hook example: guard denials name the guard in the signed
receipt. A denial by the hook's exec or write guard records
praetore.hook_guard(exec_reserved_to_main,client_config_write,
governance_write,path_check_failed,no_project_root) and
praetore.requested_profilein the signed context;check-attribution.py
(run byverify.sh) requires them together on a Deny signed as
unregisteredand counts them apart, andtest-attribution.shchecks
them. A non-ASCII name now counts as a possible alias only if it starts
with.or folds to ASCII, so ordinary non-ASCII file names are writable
again;commondirandgitdirjoin the bare-repository names; a write
without its path parameter says so instead of naming a path rule. -
Claude Code hook example: guard denials and state warnings with
HighAssurance receipts. A denial by the hook's exec or write guard shows
the reason class derived from the signedpraetore.hook_guard
(exec_reserved_to_mainiscapability; the write guards arepath),
andverifychecks the guard claims likecheck-attribution.py. The
state warnings also reach the user assystemMessage.PowerShelland a
Monitorwithout a command are unanalyzable, so they are denied like any
unanalyzable command. -
Breaking (API, G7):
AuthorizationRequest.actionis aMissionAction.
praetore-coreseparates mission actions, which PRÆTORE decides, from
safety actions, which the executor of an AI-enabled system runs without
waiting for PRÆTORE (for examplesafety:halt,safety:stop_all). The new
typesMissionActionandSafetyActionare built only by
Policy::classify(action) -> Result<ClassifiedAction>, and
AuthorizationRequest::newtakes aMissionAction, so a safety action
cannot be put in a request (compile error E0308, checked by a
compile_faildoc test).AuthorizationEngine::evaluatekeeps its
signature and re-checks the class against its own policy.
Policy::evaluate/evaluate_with_contexttake a&MissionAction.
AuthorizationRequestno longer implementsDeserialize:
AuthorizationRequest::from_json(json, &policy)classifies the action
first and returnsSafetyActionNotGovernedorUnclassifiedAction.
New typed errors:PraetoreError::SafetyActionNotGoverned
(SAFETY_ACTION_NOT_GOVERNED),UnclassifiedAction
(UNCLASSIFIED_ACTION),PolicyFormatUnsupportedand
PolicyActionClassInvalid(ActionClassError).
verify_journaltakes anOption<&RecordedPolicy>. -
Breaking (policy format 2, G7). A policy needs
"format_version": 2
and anaction_classestable ("Mission"or"Safety"per exact
action_type).Policy::validaterejects, with typed errors: a rule on an
undeclared action type, asafety:type not declaredSafety(and a
Safetyentry without the prefix), an unprefixed name that contains
safety(ASCII, any case), and any rule that targets aSafetyaction
(this replaces the external lint proposed in SAF-09). Mission action types
need no prefix. A format 1 document (noformat_version) is rejected for
evaluation in every mode (PolicyFormatUnsupported { found: 1 }).
Digests of migrated policies change; the receipt format does not. -
Historical verification keeps working.
RecordedPolicy::from_json
reads format 1 and 2 documents and computes the digest they had; it
cannot be evaluated.praetore-verify evidence|journal --policyand
policy-digest(which now also printspolicy_format_version) use it,
as does the hook'sverify. The committed evidence sets (hookbundle/,
sets 03, 04 and 05,examples/verify/,
examples/third-party-verification/bundle/) are unchanged and verify
against their recorded format 1 documents;docs/golden/canonical-policy-v1.json
keeps its digest andcanonical-policy-v2.jsonis added. -
Entry points classify first (G7). A declared
Safetyaction gets no
decision: the gateway HTTP API answers 422safety_action_not_governed,
thepraetore-mcpgate forwards it to the wrapped server without a
receipt (enforce and observe), and the Claude Code hook adds no decision;
nothing is evaluated, signed, claimed or journaled. An action type the
policy does not declare is refused at every entry point with a signed
DENY receipt: the newAuthorizationEngine::refuse_unclassified(and
refuse_unclassified_with_atomic_commit) takes an
AuthorizationRequest<UnclassifiedAction>(built only from
Policy::unclassified), verifies it exactly like a mission request
(identity, authority, issuer pin, intent signature and, in HighAssurance,
intent window, freshness and replay claim), never evaluates policy rules,
and recordsDenywith reasonunclassifiedand
decided_by: {"kind": "engine_guard", "guard": "unclassified_action"}(an
existingdecided_bykind; verifiers that read engine guards accept it).
It is journaled and claimed like a policy DENY. A forged or
unauthenticated request gets no receipt.praetore-mcprefuses it in both
modes; the hook appends it toreceipts.jsonl. An unreadablepolicy.jsonstill refuses every tool call,
safety:*included (documented indocs/threat-model.md). -
Breaking (gateway API behaviour change). Every DENY from
POST /v1/executenow returns 403 with one body,
{"code": "authorization_denied", "authorization": "denied", "execution": "not_dispatched", "evidence_id": ..., "request_id": ...}, instead of the
signed receipt, whatever decided it (a rule, an engine guard or an
undeclared action type), so a DENY response does not reveal what the
policy declares or which rule matched (REQUIRE_APPROVAL responses still
carry the receipt and the rule). The receipt, with its reason, is in the
execution journal (praetore journal-export). The 422
unclassified_actionresponse is removed. Likewise,praetore-mcp
answers every DENY withDenied by PRÆTORE. Evidence id: ...(the rule
and reason go to stderr) and the hook answers every DENY that has a
receipt withPRÆTORE denied this tool call (evidence ...)(details on
stderr). Response timing is not made uniform. -
Gateway: the reserved
safety:prefix decides before classification.
POST /v1/executeanswers every action type that starts withsafety:
with the same 422safety_action_not_governed(same body, headers and
code path), declared Safety or not, before any verification, engine,
journal or signing work. An undeclaredsafety:*gets no receipt at the
gateway. Every request at this gate writes the same unsigned WARN line
(claimed agent id and action type, bounded and escaped, and
declared=true|false), so the answer cannot be used to enumerate the
table; the remaining timing difference is a documented limit.SAFETY:x
(not the exact prefix) goes through the unclassified path and gets a
signed DENY when the request is authenticated.praetore-mcpand the hook keep the signedunclassified
DENY for it. -
Human-facing text escapes characters that render invisibly or reorder text
(zero-width, bidi, control) as\u{XXXX}:praetore-verify --format text
(which now also reportsreceipt_action_type,receipt_tool,
receipt_decisionandreceipt_decided_by),praetore-mcptables and
stderr, the hook's stderr, and the gateway's WARN line (praetore_core::display). JSON
output and receipts stay exact.UNCLASSIFIED_DENY_REASONand
UNCLASSIFIED_ACTION_GUARDare public constants inpraetore-core. -
Breaking (behaviour change, praetore-mcp observe mode). A call whose
action type the policy does not declare (UNCLASSIFIED_ACTION) is now
refused in observe mode too, not forwarded: an undeclaredsafety:*, any
tool name that starts withsafetyin any ASCII case and is not exactly a
declared Safety action (including names with a trailing space or tab, and
ambiguous lines), and also every mission call when the policy does not
declaremcp.tools/call.praetore-mcp initdeclaresmcp.tools/call,
so new homes are not affected. A JSON-RPC batch stays all or nothing in
enforce, so a declared Safety call in a batch with a blocked call is not
forwarded; send safety calls on their own. Runtime tests per entry point
check zero engine calls and zero journal writes, with the journal down,
in under 100 ms (crates/praetore-gateway/tests/safety_actions.rs, the
g7_tests incrates/praetore-mcp/src/gate.rs,
examples/claude-code-hook/src/tests_g7.rs, and the PostgreSQL test
postgres_g7_safety_action_is_refused_before_the_engine_with_the_journal_down).
scripts/g7-mutation-test.shshows they fail whenclassifyis removed.
Mission actions take the unchanged path: synchronous signing, fail closed.
Recording safety actions (SAF-09.5, isolated ingestion) is not
implemented. -
praetore policy classify --policy <path>proposes anaction_classes
table for a policy and lists what prevents loading it as format 2. It
never writes files.praetore-coregains atest-probefeature (off by
default, enabled only from dev-dependencies) that counts engine calls for
tests. -
Shipped policies are format 2:
praetore-mcp init, the hook'sinit,
praetore initandcrates/praetore-cli/examples/policies/*.json.Migration guide. Migrate the policy to format 2 before upgrading the
binary. After the upgrade a format 1 policy no longer loads, so hook or
praetore-mcpstate written before G7 refuses every tool call (fail
closed,safety:*included) until its policy is migrated; the gateway
service does not start.# before (format 1) {"id":"p","version":3,"canonical_version":1,"semantics_version":2,"rules":[ {"id":"w","action_type":"fs:write_file","effect":"Allow", ...}]} # after (format 2) {"format_version":2,"id":"p","version":3,"canonical_version":1,"semantics_version":2, "action_classes":{"fs:write_file":"Mission","safety:halt":"Safety"}, "rules":[{"id":"w","action_type":"fs:write_file","effect":"Allow", ...}]}- Before upgrading, run
praetore policy classify --policy policy.json
(or add the fields by hand) and add the printed
format_versionandaction_classesto the document. - Rename any action the executor runs without waiting for PRÆTORE to
safety:<name>, declare itSafetyand remove every rule on it. - Rust callers:
let action = policy.classify(action)?.into_mission()?;
beforeAuthorizationRequest::new,AuthorizationRequest::from_json(json, &policy),Policy::new(..).with_mission_actions([..])/
.with_action_class(..). - praetore-mcp homes: make sure
action_classesdeclares
"mcp.tools/call": "Mission", otherwise every call is refused, in
observe too. - Pin the new digest (HighAssurance
policy_digest). Keep the format 1
document: receipts that recorded its digest verify only against it
(praetore-verify --policy old-policy.json).
- Before upgrading, run
-
Journal export across an attester key rotation (v0.3.2 follow-up
B5-5).praetore journal-exportandpraetore-verify journalaccept
--attester-pinmore than once (up to 16 keys); each receipt and storage
record is checked against the pinned key its key id names, and nothing is
re-signed. A database adopted with a retired key exports and verifies
again with the retired and the current pin; with only the current pin the
export fails and names the key that signed the adoption record. New
library API:ChainExporter::with_attestersand
journal_chain::verify_journal_with_attesters;export,
export_with_database_headandexport_storage_recordsof the CLI take
a slice of keys. -
praetore-verify journal --policyon a database chain fails (B5-4)
withINVALID_REQUEST(ChainError::PolicyNotApplicable) instead of
reportingpolicy_verified: truewith nothing compared. Breaking
(API): newChainErrorvariant. -
Extension objects in
praetoreare refused (B5-1). The runtime check
(RuntimeRoleError::ExtensionObjects) and the migration runner
(UnsafeDatabase) refuse an extension installed inpraetoreand any
praetoreobject that belongs to an extension, which a role with CREATE
on the database can install since PostgreSQL 13. Breaking (API): new
RuntimeRoleErrorvariants. -
PRAETORE_SCHEMA_OWNER(B5-2). Optional exact role name of the
praetoreschema owner. When set, the runtime check
(RuntimeRoleError::UnexpectedSchemaOwner) and migrating refuse another
owner (and, before the schema exists, another migrating role). Read by the
gateway, the CLI andpraetore-observe; the gateway warns while it is
unset. Set it in every deployment. NewRuntimeRoleOptions::with_schema_owner
andMigrationOptions::schema_owner(a new public field). -
Docs (B5-3).
docs/operations.mdnow says that an allowlisted event
trigger runs with the privileges of the role executing the migration DDL
(unless its function is SECURITY DEFINER), as a test records, not with its
function owner's. -
praetore run,praetore-gateway-demoandpraetore-observereport a
port in use with exit status 1 and the bind error, instead of aborting
(SIGABRT or a panic) while they dropped their blocking PostgreSQL clients
on the async runtime thread. The services bind before the state moves into
the runtime, and the runtime is dropped before the last reference. -
DEPENDS ON EXTENSIONmarks onpraetoreobjects are refused by the
runtime check and the migration runner, like extension members:DROP EXTENSION ... CASCADEby the extension's owner would drop the marked
object (for example an append-only trigger function). -
PRAETORE_SCHEMA_OWNERwith a NOLOGIN owner group. With no schema yet,
a migrating role that is a member of the named NOLOGIN group creates
praetoreowned by the group and runs the migrations as it; any other
named role is refused before anything is created. The installation order
is indocs/operations.md. The CLI andpraetore-observenow warn, like
the gateway, while the variable is unset. Before anything is created, a
typedMigrationError::SchemaOwner(SchemaOwnerProblem) refuses a
membership without SET or INHERIT (or a NOINHERIT migrating role), a
predefinedpg_*role, the bootstrap superuser for a new schema, and a
missing CREATE privilege on the database;MigrationError:: RuntimeGroupMissingrefuses, before migration 0001, when
praetore_runtimedoes not exist and the role running the migrations has
no CREATEROLE. The owner is checked again inside the transaction that
creates or adopts the schema.verify_runtime_rolerefuses apg_*
value as a configuration error. Breaking (API): newMigrationError
variants. -
praetore-verify journalreportsattester_key_ids(entries per
signing key id), and a receipt signed by a key that is not pinned fails
withAUTH_FAILnaming that key id (ChainError::UnpinnedAttesterKey).
Newjournal_chain::verify_journal_reportandJournalReport. With
--database-journal,database_attester_key_idsreports that file's
signers. -
Tests (B5-6 and an intermittent CI failure). The full ignored
PostgreSQL suite runs in parallel: the fault-injection test runs in its own
scratch database, and cluster-wide grants ofpg_read_all_data/
pg_write_all_dataare serialized with every runtime-role check.
postgres_cli_journal_export_tenant_end_to_endno longer picks two ports
that can coincide, and waits for a gateway that accepts its own token
rather than any answer to/healthz(two gateways on one port made
praetore demoget 401authentication_required).