Skip to content

Amend add-trust-anchors-and-machine-holders with the mail grant: a machine wallet as grant audience - #6

Open
brettheap wants to merge 1 commit into
mainfrom
add-trust-anchors-and-machine-holders-mail-grant
Open

brettheap wants to merge 1 commit into
mainfrom
add-trust-anchors-and-machine-holders-mail-grant

Conversation

@brettheap

@brettheap brettheap commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What this is

An amendment to the OpenSpec change add-trust-anchors-and-machine-holders (landed in #5, still Status: proposed, not ratified), from the same day's continuation of the design discussion between Brett Heap and Claude: Eagle, the worked machine holder, gets a Microsoft 365 shared mailbox [email protected] that agents on Eagle can read.

  • The credential is a declared key. The Graph client certificate joins Eagle's two sshd host keys as a third declared key of the machine wallet: TPM-held and non-exportable → isolated_invocable; held as a readable file → holder_readable. Either way it evidences the environment.
  • The authority is a grant to the machine's wallet. "Eagle may read one mailbox" is an xfactory_wallet_grant addressed to Eagle's wallet (read act, one object, attest tier proposed, an expiry). The Entra app registration, admin-consented Mail.Read and the Exchange access policy restricting the app to that mailbox are the grant's realization — the administrator's record, never a wallet field, as a host certificate is the CA's record.
  • The custodian's reads are key-attributed exercises. One custodian service on Eagle holds the certificate; each polling session is an exercise presented by the certificate key with that key's custody in force. Agents never hold the certificate and are served mail as data.
  • The address stays out. The mailbox identifier is never the holder identifier (non-substrate rule).

Spec delta

Now 3 MODIFIED + 4 ADDED on openxwallet. New MODIFIED: Authority travels as attenuated grants, never as keys — canonical text kept as a strict prefix, both canonical scenarios byte for byte, two scenarios added. One scenario added to A wallet is a key, never a record of a key. No collision with the active add-composition-drift-cascade (which modifies only Revocation propagates through the chain and the profile's composition requirement).

Design

D1, D7 (a "Mail through Microsoft Graph" mapping table), D8, D9, D10, D11 extended; new D12; open questions 10–14 for ratification: how agents get mail (derived grants vs environment access), naming the mailbox within the identifier grammar (no @), the tier for a read, one exercise per signed client assertion, and RBAC for Applications vs the access policy.

Expressibility check against the code leg at 72313da, by running the proposed records through the pinned validator: the grant, exercise and record are expressible today except for the machine holder class this change already adds, so the code surface is unchanged. Three gaps are named successors, not fixed here: an exercise's object_ref is never checked against its grant's scope.objects; folder-level narrowing reads as attenuation-widened; no RSASSA-PSS member in the algorithm enums.

Validation

OPENSPEC_TELEMETRY=0 python3 scripts/validate-openspec-cli-pin.py --all --no-cache \
    --tarball tools/openspec-cli-pin/fission-ai-openspec-1.12.0-c844543999f673cdd72445879b86a4abea4c07ef.tgz
→ Totals: 4 passed, 0 failed … OK openspec-cli-pin
"$(python3 scripts/install-pinned-openspec-cli.py)" validate add-trust-anchors-and-machine-holders --strict
→ Change 'add-trust-anchors-and-machine-holders' is valid

An archive simulated on a scratch copy reports + 4 added, ~ 3 modified, - 0, 49 scenarios, none lost.

What this PR does not do

It does not ratify, touch openspec/specs/, the code leg or the root pin. After merge the root's spec pin needs its own bump.

🤖 Generated with Claude Code

Summary by Sourcery

Amend the proposed machine-holder change to define a machine wallet as the audience for an attenuated mailbox-read grant while keeping credentials, resource enforcement, and agent access distinct.

New Features:

  • Extend the proposed openWallet model to support machine wallets as grant audiences for resource access, using a shared-mailbox read as the worked example.
  • Model machine service credentials, custodian exercises, and resource-side enforcement without placing mailbox identities or provider configuration in wallets.

Enhancements:

  • Add the mail-grant scenario and related design guidance while preserving existing grant, identity-substrate, and composition semantics.
  • Document expressibility findings, unresolved validation gaps, and follow-up questions for mailbox identifiers, exercise scoping, attenuation, algorithms, and Exchange enforcement.

Tests:

  • Expand the planned machine-holder corpus and validation coverage with positive mail grant and exercise records plus negative custody and audience cases.

Chores:

  • Keep the change proposed and limit the amendment to OpenSpec design, proposal, specification, and task updates without modifying the code leg or published specs.

…chine wallet is a grant audience, the custodian's reads are key-attributed

Same-day continuation of the 2026-10-16 discussion: Eagle gets a Microsoft 365
shared mailbox [email protected] read through Graph with a certificate the
machine wallet declares as a third key (TPM-held -> isolated_invocable, file ->
holder_readable). The authority to read it is an xfactory_wallet_grant
addressed to Eagle's wallet; the Entra app registration, admin-consented
Mail.Read and the Exchange access policy are the grant's realization and stay
the administrator's record, never a wallet field. The mailbox address is never
the holder identifier.

Spec delta: a third MODIFIED requirement, "Authority travels as attenuated
grants, never as keys" (canonical text kept as a strict prefix, both scenarios
byte for byte), with two scenarios; one scenario added to "A wallet is a key".
No collision with add-composition-drift-cascade. design.md: D1, D7, D8, D9,
D10, D11 extended, new D12, open questions 10-14 (agents' access, naming the
mailbox without '@', tier for a read, one exercise per client assertion, RBAC
for Applications vs access policy). Expressibility check against the code leg
at 72313da: the grant, exercise and record are expressible today, so the code
surface is unchanged; three gaps (object_ref unbound to scope.objects, no
folder containment, no RSASSA-PSS algorithm) are named successors.

Validated with the pinned @fission-ai/[email protected]: --all --strict clean,
`validate add-trust-anchors-and-machine-holders --strict` valid. Still
Status: proposed.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@sourcery-ai

sourcery-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 8 hours and 7 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Reviewer's Guide

This amendment extends the proposed openWallet specification—not the validator or schemas—to model a TPM-backed machine certificate as Eagle’s declared service credential, an expiring mailbox-scoped grant addressed to Eagle’s wallet, and custodian reads attributed to that key, while documenting unresolved ratification choices and successor gaps.

Sequence diagram for the machine wallet mailbox read

sequenceDiagram
    participant Custodian
    participant Entra
    participant Graph
    participant Agents

    Custodian->>Entra: CLIENT ASSERTION signed by certificate key
    Entra-->>Custodian: ACCESS TOKEN
    Custodian->>Graph: Read mailbox with ACCESS TOKEN
    Graph-->>Custodian: Mail data
    Custodian-->>Agents: Serve mail as data
Loading

File-Level Changes

Change Details Files
Extends the machine-holder model to include non-host service credentials used to access external resources.
  • Defines client certificates as declared machine-wallet keys alongside host keys.
  • Maps TPM-backed and file-held certificate custody to existing custody classes.
  • Adds scenarios ensuring the reached resource and its address remain outside the wallet identity.
openspec/changes/add-trust-anchors-and-machine-holders/design.md
openspec/changes/add-trust-anchors-and-machine-holders/proposal.md
openspec/changes/add-trust-anchors-and-machine-holders/specs/openxwallet/spec.md
openspec/changes/add-trust-anchors-and-machine-holders/tasks.md
Adds a normative mail-grant design in which a machine wallet is the grant audience and Microsoft 365 enforces the grant externally.
  • Defines a read-only, mailbox-scoped, expiring wallet grant with the Exchange/Entra configuration treated as its realization.
  • Specifies a custodian exercise per signed client assertion, attributed to the certificate key and its active custody model.
  • Keeps agents from holding the certificate and leaves their access model as an explicit ratification question.
  • Documents access-policy versus RBAC realization tradeoffs and records unresolved object-identifier, object-binding, algorithm, and tier limitations.
openspec/changes/add-trust-anchors-and-machine-holders/design.md
openspec/changes/add-trust-anchors-and-machine-holders/proposal.md
openspec/changes/add-trust-anchors-and-machine-holders/specs/openxwallet/spec.md
Expands the proposed OpenSpec delta and validation plan without changing the code surface.
  • Changes the delta accounting to three modified and four added requirements, preserving the active composition-drift change boundary.
  • Adds planned positive and negative corpus fixtures for the machine certificate, grant, exercise, and existing validator findings.
  • Adds tests and strict xfail probes for the documented successor gaps, plus mailbox deployment and release-pinning tasks.
openspec/changes/add-trust-anchors-and-machine-holders/proposal.md
openspec/changes/add-trust-anchors-and-machine-holders/tasks.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T14:28:03.431353Z 4d83535 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sonarqubecloud

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d8353519f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +138 to +140
- WHEN a service on the machine reads the mailbox under that grant
- THEN each exercise names as its presenting key the machine's declared
service credential, and records that key's custody as the model in force

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Do not attribute mailbox reads to the token-request signature

For the proposed Graph bearer-token flow, this scenario makes read_mail exercises key-attributed even though D12 explicitly states that the certificate signs only the OAuth token request and that subsequent Graph reads carry an unsigned bearer token (design.md:766-775). That conflicts with the unchanged core requirement that exercising a grant carry the wallet key's signature over the request (openspec/specs/openxwallet/spec.md:80-82), and task 4.11 compounds it by recording act: read_mail, the mailbox object, and signed_over: request. As written, the resulting audit record claims cryptographic evidence for a mailbox read that the certificate never signed; the model needs to distinguish token acquisition from the later read or explicitly add and specify a bearer-session linkage.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant