Skip to content

Hosted Seals: review follow-ups (consent fields, public_run_id, key linkage, key cache, tie-break test) #2273

Closed

Description

@abrichr

Non-blocking notes from the independent review of #2266 (openadapt seal publish / unpublish and openadapt_flow.public_seal). None of these blocked the merge; each should be fixed or decided.

  1. The consent text omits some uploaded fields. The prompt in openadapt/seal_publish.py says it "uploads the summary above", but the uploaded public-seal.json also carries scope_item, authorization_sha256 and issued_at, which the card does not show. Either show them in the card or name them in the consent text, so the yes covers everything that is uploaded.

  2. The public_run_id docstring overstates secrecy. packages/flow/openadapt_flow/public_seal.py says the id "reveals neither" the key id nor the run id. It is an unsalted SHA-256 prefix of key_id + run_id, and both inputs can have low entropy or be public (the key id is published on the Seal). Anyone who can guess a run id can confirm it. Reword the docstring to say what it does guarantee, or use a keyed hash.

  3. All Seals from one machine share a key id, so they can be linked. Every public Seal signed with the same local signing key carries the same key id, so anyone can group the Seals one machine published. Document this in the consent text and on /security, or offer a per-publish key.

  4. The key cache keeps passphrase bytes in memory. crypto._derive (packages/flow/openadapt_flow/crypto.py) caches (secret, key) per salt and compares the passphrase with hmac.compare_digest on each hit. Store a digest of the passphrase (for example SHA-256) instead of the bytes, so a memory dump does not hold the passphrase for the life of the process.

  5. The equal-mtime tie-break in _newest_sealed_run has no test. openadapt/cli.py breaks ties on equal seal.json mtimes by folder name, so run-2 beats run-1. Add a test that sets equal st_mtime_ns on two runs and checks which one is chosen. String ordering also ranks run-9 above run-10, so a natural sort may be needed.

Activity

  1. added
    agent-ready
    claimed
    on Nov 20, 2026
  2. abrichr commented on Nov 20, 2026

    @abrichr
    MemberAuthor

    Claimed by Codex insurance_history for technical items 2, 4 and 5 only: accurate public_run_id documentation, fixed-size passphrase fingerprints in the shared derivation cache, and an equal-mtime_ns deterministic selection test. Consent wording and publication-key linkage choices (items 1 and 3) remain open for separate decisions. The ID algorithm/protocol, publication-key policy and lexical tie-break are unchanged. Branch agent/2273 starts at current main614e06c22.

  3. abrichr commented on Nov 20, 2026

    @abrichr
    MemberAuthor

    Items 2, 4 and 5 are on main in #2341. The public run ID documentation explains how guesses can be checked, the process-wide passphrase cache is gone, and the tests cover the existing equal-timestamp tie-break.

    The remaining two changes are in review:

    • List public Seal fields before consent and show exact bytes on request #2357 previews the complete signed public Seal and warns about signing key ID reuse before consent. The quickstart and explicit publication use the same preview. The 61 launcher tests passed locally, including refusal for a scoped synthetic run with no request sent.
    • openadapt-web#641 explains the same key-ID linkage on the security page. Its 21 site registry and generated-file checks passed locally.

    This issue can close once both changes reach main. No live run was published for these tests.

  4. abrichr commented on Nov 21, 2026

    @abrichr
    MemberAuthor

    Item 1 and the CLI half of item 3 are on main in #2357. Items 2, 4 and 5 landed in #2341.

    The remaining part of item 3 is the signing-key linkage disclosure on /security. The web owner folded it from web #641 into web #650. I verified the paragraph on the replacement branch. This issue stays open until it reaches web main.

  5. abrichr commented on Nov 21, 2026

    @abrichr
    MemberAuthor

    All five review follow-ups have landed on the main branches.

    • #2341 corrected the public run ID documentation, removed the process-wide passphrase cache and added the equal-timestamp selection test.
    • #2357 names the public fields and explains signing-key reuse before consent. The user can inspect the exact bytes before publishing.
    • Web #650 merged at 53f05758. I verified that the security page on web main explains that anyone holding two published receipts can link runs signed with the same key, including an organization-set key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyclaimed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions