Every capability discovered during Phase 0 reconnaissance carries exactly one status:
KEEP · ADOPT · REDESIGN · IMPROVE · REJECT · DEFER.
Legend for the Today column: JDLib = present in this repository, source: REAL = a working
implementation exists in the archived library, source: PARTIAL/STUB/ABSENT = the archived
implementation is limited, a shell, or documented only. Full evidence, file:line and code quotes:
.recon/capability-inventory.md (133 capabilities; 78 REAL, 31 PARTIAL, 3 STUB, 21 ABSENT).
JDLib's own baseline: 00-current-state.md.
Two rows were corrected after 06-reliability-inventory.md (the reliability precondition this
programme's directives require) found existing implementations this matrix had recorded as absent;
the corrections are marked in place rather than silently rewritten.
A status is a decision about this library, not a compliment to the source. REJECT means
adopting it would damage JDLib; KEEP means implementing it again would duplicate JDLib.
implemented with JwksCache, SigningKeySource, kid rotation; source's TokenClient defaults to verify_signature=False and passes the algorithm string as the key
JWKS caching and key rotation
JDLib
KEEP
the source has no correct equivalent; its verified-token helper has no call site
Principal extraction (user, service account, API key)
JDLib: Principal, PrincipalDirectory
KEEP
source's principal handling is ad-hoc per service
API-key authentication with scopes
JDLib: ApiKeyAuthenticator, scope narrowing
KEEP
scopes already narrow but never expand authority
AutHorization: one PDP/evaluator
JDLib: PolicyDecisionPoint, DefaultPDP, guards
KEEP
source relies on an external Cerbos service without a JDLib-side evaluator contract
Cerbos as a PDP adapter
JDLib: CerbosPDP
KEEP
already implemented and live-verified in the hardening programme
Permission catalog, role inheritance, resource grants, additive authorization
JDLib: authz.permissions, reader, ownership
KEEP
source has role-ish grants without the anti-escalation algebra JDLib enforces
Phase 1; 05-tenant-lifecycle.md §7 already specifies the contract it must implement
Tenant resource cache with deterministic identity
JDLib: absent
ADOPT
Phase 1/2; must be keyed by resolved handle + credential version, never by tenant alone
Tenant relocation
JDLib: documented manual procedure
KEEP
source: absent
Tenant-scoped cache keys
JDLib: absent
ADOPT
Phase 2; source's key is xxh128(f"{instance}{role}{schema}{db}{warehouse}{sql}") — no delimiters, and BigQuery omits org_id entirely, so two tenants share cache entries
Phase 3 extends it with versions, rotation signals and provider composition; the interface and its fail-closed rule (StrategyCapabilityError, never a silent fallback) already exist
Environment-backed secrets
JDLib: EnvSecretProvider
KEEP
—
External secret manager (Vault/cloud KMS-style)
source: ABSENT (GCP implementation commented out)
ADOPT
Phase 3 provider abstraction; no vendor is wired without a running service to verify against
Encrypted configuration
source: PARTIAL
ADOPT
Phase 4 builds on the crypto provider, not on a config-embedded key
Credential hydration with explicit lifecycle
JDLib: partially via SecretProvider
IMPROVE
Phase 1/3; resolution must be lazy, cached safely and audited
Credential rotation
source: ABSENT (documented only)
ADOPT
Phase 3/4; the design doc already requires pools to rebuild on credential-version change
Revocation behaviour
source: ABSENT
ADOPT
Phase 3; a revoked credential must fail closed and be observable
Secret redaction in logs/exceptions/audit
JDLib: audit and telemetry redaction
IMPROVE
extend the existing sanitiser to connector and credential paths (one sanitiser, never a second)
JDLib: already implemented adapter-locally — per-call asyncio.wait_for plus a transport timeout, bounded retry with full-jitter backoff and injected clock/sleeper (security/authn/provider.py:96-158,254), transient-vs-permanent classification, fail-closed exhaustion; source: ABSENT
IMPROVE
Phase 6's ConnectionPolicyextends this idiom rather than building a framework: the frozen-config validation, the two-layer timeout, the jittered backoff and is_retryable() as the classification oracle. Corrected from ADOPT after the reliability inventory (06-reliability-inventory.md) found the implementation this row had assumed absent
the hardening programme already fixed its defect classes
CLI integration
JDLib: integrations/cli.py + console script
KEEP
explicit administrative context; no implicit tenant
Background jobs / workers
JDLib: tenancy/jobs.py
IMPROVE
Phase 10: explicit signed context envelopes with revalidation (verify → TTL/signature → reload principal → reload tenant status → re-authorize → fresh context)
Context envelope forgery/replay resistance
JDLib: absent
ADOPT
Phase 10; an envelope is a claim to be revalidated, never a trusted serialized context
gRPC
JDLib: absent
DEFER
flagged for the product owner: no gRPC consumer exists, and §19's requirement is conditional on integrations being built. Building it with no consumer means an unexercised surface
JDLib: security/tracing.py defines the span helper (security_span at :235) and the safety rules, but the helper has no call site in src/
IMPROVE
wire the existing helper at the boundaries Phase 11 lists rather than defining another span API; the archived system's rejected pattern is the opposite error — a decorator on every method, self-reported 15–30% overhead
Each is a REJECT decided by evidence in the inventory, listed once here so no later phase
re-litigates it: the 1,238-LOC god object and its duplicated dispatch chains; decrypted
credential documents in a shared cache; fail-open security defaults; identifier interpolation
from request data; duplicated per-service cache/ORM/cache-key logic; unseparated cache keys and
tenant-omitted keys; no timeouts/retries and blocking sync IO in an async library; blanket span
decoration; env-gated secret dumps and INFO credential logging; undeclared, duplicated or unused
dependencies; committed registry config and CI tokens; docstrings and README claims describing
unimplemented features.
Counted from this file's own rows (script-verified, not estimated):
Status
Rows
KEEP
36
ADOPT
32
IMPROVE
13
REDESIGN
5
DEFER
17
REJECT
13
Total classified rows
116
The matrix classifies by capability family: where the inventory recorded several
implementations of one capability (the per-engine cache logic, the per-service connection
handling), the row's decision applies to every member, and the inventory remains the
per-capability record with its own implementation states and file:line evidence. §13 restates
the rejections by theme; a capability and its anti-pattern are one decision, so the same
rejection may appear both as a row above and in that list.