Doctor
doctor
Value-free credential provenance — the vault doctor.
:func:doctor_data answers a single question for every credential in the
catalog: which layer would supply it, and is it present at all — WITHOUT
ever reading or returning the value itself (security invariant AC2). It
probes each resolution layer for presence only, reducing the probe to a
boolean the instant a layer responds, so a plaintext secret never enters
the report.
Provenance = dict[str, dict[str, str | bool]]
Per-credential report: {"group.name": {"layer": str, "present": bool}}.
For a SECRET spec whose keyring backend is unavailable (headless host), the
entry additionally carries "keyring": "unavailable" so the doctor surfaces
the outage rather than silently reporting the credential as merely missing.
doctor_data(package=None, *, catalog=None, instance=None)
Report the winning layer and presence of every credential, value-free.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package
|
str | None
|
When given, restrict the report to credential groups contributed by that package; otherwise cover the whole catalog. |
None
|
catalog
|
Catalog | None
|
Catalog to inspect; defaults to the discovered
:func: |
None
|
instance
|
str | None
|
Optional multi-instance segment forwarded to the probe. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
Provenance
|
data: |
Provenance
|
|
|
Provenance
|
|
|
Provenance
|
itself is NEVER included (security invariant). |