Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

pg_tide threat model

This model covers the v0.52.0 production profiles: core and core-kafka. It covers the PostgreSQL 18 extension, PostgreSQL inbox, NATS JetStream, Apache Kafka, and HTTPS webhook destinations. stdout and file are diagnostic sinks only.

IDAsset and trust boundaryAttacker capabilityPreventionDetectionRecoveryResidual limitOwner and contactEvidenceCode or runbook
T01Publisher identity at application to extensionBorrow an application login or role membershipsession_user, canonical roles, outbox ACLBounded authorization errorRevoke role and ACLA superuser can bypass database ACLsDatabase owner; @groveprivilege-model-prpg-tide-ext/src/outbox.rs
T02Pipeline catalog at operator to relayModify JSON config or enable an unauthorized pipelineExact role grants and bounded admin APIAudit/config failureRestore reviewed config and disable pipelineDatabase owner compromise is outside scopeRelay owner; @groveprivilege-model-prdocs/src/sql-reference/relay-api.md
T03Relay credentials at secret reference to runtimeRead a reference, file, process, or error pathReference-only fields, strict files, SecretStringCanary scan and secret-file failuresRotate credential and quarantine evidenceHost root can read process memoryRelay owner; @grovesecret-canary-prpg-tide-relay/src/secret.rs
T04Event payload at source to relaySubmit oversized, malformed, or malicious JSONSchema, size bounds, typed envelopes, redactionValidation and bounded decode errorsPreserve source event and replay after correctionPayload semantics remain application-ownedRelay owner; @groverelay-unit-pr, relay-integration-prpg-tide-relay/src/envelope.rs
T05Webhook request at relay to destinationTarget private, metadata, or loopback addressURL, DNS, address, redirect, and proxy policySSRF refusal and zero-request assertionRemove endpoint; retain checkpointA trusted DNS or firewall compromise is outside scopeRelay owner; @grovenetwork-security-core-prpg-tide-relay/src/http_util.rs, webhook runbook
T06DNS and redirect answers at relay to destinationReturn mixed, rebinding, or private answersValidate every answer, pin answers, disable redirectsPolicy refusal and request receipt checkRemove endpoint and inspect DNS controlDNS authority compromise can still deny servicePlatform owner; @grovenetwork-security-core-prpg-tide-relay/src/http_util.rs
T07Destination identity at relay to networkPresent an untrusted, expired, or wrong-host certificateVerified TLS defaults and explicit noisy overridesTLS refusal code and warningInstall the expected CA/certificaterequire intentionally gives encryption-only development behaviorPlatform owner; @grovenetwork-security-core-pr, network-security-kafka-prpg-tide-relay/src/pg_tls.rs
T08Checkpoint state at relay to catalogRewind or advance an offset directlyMonotonic offset API and exact grantsRewind refusal and state comparisonRestore last trusted stateA superuser can mutate catalog stateRelay owner; @groveprivilege-model-pr, delivery-model-prcrash-recovery runbook
T09Receipts and DLQ at relay to catalogDelete, forge, or replay terminal stateRole matrix and transactional terminal stateState and audit checksReconcile from source eventsSource retention limits recoveryRelay owner; @groveprivilege-model-pr, replay-recovery-prDLQ/replay runbook
T10Replay operation at operator to sourceReplay arbitrary or unbounded eventsBounded replay authorization and stable IDsRefusal code and operation logRevoke operation accessAuthorized operators can intentionally replayOperations owner; @groveprivilege-model-pr, replay-recovery-prpg-tide-relay/src/cmd/replay.rs
T11Secret-bearing output at relay to operatorInspect logs, metrics, status, history, or evidenceMasking and sanitized connector errorsPositive-control canary scanRotate values and remove exposed evidenceExternal libraries may still leak unknown textRelay owner; @grovesecret-canary-prpg-tide-relay/src/config/mod.rs
T12Dependency graph at build input to artifactAdd or reach a vulnerable or unlicensed crateLocked graphs, advisory, source, and license policySupply-chain gateBlock and rebuild from reviewed commitNew advisories require refreshed feedsRelease owner; @grovesupply-chain-prscripts/check_supply_chain.py
T13CI release inputs at producer to verifierReplace an artifact, tag, digest, or provenance claimImmutable subjects and separate read-only verifierSignature/SBOM/provenance mismatchWithdraw and rebuildCI provider compromise is outside scopeRelease owner; @groveartifact-policy-pr, artifact-verification-releaserelease-evidence runbook
T14Runtime artifact at build input to containerShip a shell, package manager, key, fixture, or unexpected binaryPath allowlist, modes, content and image policyInventory failureWithdraw and rebuild imageBase-image compromise is outside scopeRelease owner; @groveartifact-policy-prscripts/check_release_artifacts.py
T15Extension function privilege at SQL caller to ownerInvoke a definer function through PUBLIC or unsafe grantsFixed owner, exact execute ACL, locked pathPrivilege inventoryRevoke execute and apply migrationSuperuser control remains authoritativeDatabase owner; @groveprivilege-model-prsql/pg_tide--0.51.0--0.52.0.sql
T16Function name resolution at caller search pathShadow catalog or extension objectspg_catalog, tide search path for definersClean-room function inventoryLock settings and retry migrationNon-definer caller search paths are not a security boundaryDatabase owner; @groveprivilege-model-prpg-tide-ext/src/outbox.rs
T17Restore and rollback state at lifecycle boundaryMix unsupported extension and relay versionsLifecycle matrix, migration transaction, rollback limitsCompatibility refusalRestore matching database and relay pairPhysical restore is required after an irreversible upgradeRelease owner; @grovelifecycle-contract-pr, lifecycle-adjacent-prrelay-upgrade runbook

The model excludes compromise of a PostgreSQL superuser, relay-host root, destination administrator, or infrastructure firewall. Those actors can bypass controls outside pg_tide; the controls still reduce the effect of lesser compromise.