HarperFast / HarperFast/harper

Secrets store: sensitive:false plaintext rows (readable non-secret config values)

Open
#1,588 1 comment 0 reactions 1 assignee Claimed by @dawsontoth View on GitHub
area:components enhancement
Dominant language
JavaScript
Stars
89
Forks
10
Avg merge
2d 6h
Merged PRs (30d)
200

Description

Follow-up to #715 / PR #1554 (store) and #1550 / PR #1582 (consumption), from the P1b design decision.

## Problem

The `hdb_secret` store treats every row as sensitive: values are write-only through the operations API (never returned by reads), redacted in MCP audit surfaces, and `read_audit_log` is blocked for the table. That is the right default, but some configuration values are *shared, non-secret* settings (feature flags, service URLs, tuning values) that teams still want centrally stored, replicated, and delivered through the same `env:` declaration surface — without losing the ability to read them back in Studio/ops tooling.

Today the only options for non-secret values are inline literals in each component's `env:` block (not centrally managed) or storing them as secrets (write-only, so ops can't view/diff them).

## Proposal

Add a `sensitive: false` flag on `hdb_secret` rows (default `true`, preserving current behavior):

- `sensitive: false` rows store the value as plaintext (no `enc:` envelope required) and **are readable back** through the operations API (`get_secret`/`list_secrets` return the value) and Studio.
- Redaction, audit-read blocking, and MCP default-deny continue to apply only to `sensitive: true` rows — audit redaction becomes conditional on the flag.
- Consumption side (#1582's `env:` declarations, grants/two-tier delivery) is unchanged: a declaration resolves the row the same way regardless of sensitivity.
- Flag flips: `false → true` is allowed (tightening). `true → false` must be rejected — the stored value was written under write-only expectations and must not become readable after the fact; require a new value write to downgrade.

## Acceptance

- Row schema + operations validation accept `sensitive: false`; default remains `true`.
- Non-sensitive rows readable via ops API; sensitive rows remain write-only (existing tests unchanged).
- `true → false` transition rejected without a new value.
- Audit/MCP redaction conditional on the flag, with tests for both settings.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.