Skip to content

Privacy draft: per-app authorization lifetime is five minutes, not one hour - #225

Merged
aterga merged 1 commit into
mainfrom
arshavir/nice-lamport-7hx8bd
Nov 3, 2026
Merged

aterga merged 1 commit into
mainfrom
arshavir/nice-lamport-7hx8bd

Conversation

@aterga

@aterga aterga commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

docs/icp-mcp-privacy-policy-draft.md described the per-application signed authorization (the on-demand per-app delegation the Service mints via Internet Identity's mcp_prepare_delegation / mcp_get_delegation) as expiring "at most one hour" after issue, in three places: the per-application connection material paragraph in section 1, the retention table in section 4, and the revocation paragraph in section 7, which concluded that the effective revocation window is "therefore about one hour".

That number is stale. Internet Identity caps every MCP account delegation at 5 minutes: MCP_MAX_EXPIRATION_PERIOD_NS = 5 * 60 * 1_000_000_000 in src/internet_identity/src/mcp.rs, applied in prepare_delegation as min(max_ttl, cap) with the session grant's expiry as an absolute cap. The Service passes max_ttl = null, so it gets exactly that cap. The README's "Domain identities (on demand)" section and the comments in crates/imcp2-core/src/identities.rs already say 5 minutes; the privacy draft was deliberately left for its author to review, which is what this PR is for.

Tone and structure are unchanged. Only the facts and the sentences that depend on them were touched. grep -n -i hour docs/icp-mcp-privacy-policy-draft.md now returns nothing.

Related issues

None. Follow-up to the README / identities.rs correction that already landed separately.

Changes

  • Section 1, per-application connection material: "(itself valid for at most one hour)" → "(itself valid for at most five minutes)".
  • Section 4, retention table: "The signed authorization itself expires at most one hour after issue." → "at most five minutes after issue."
  • Section 7, revocation paragraph: authorizations already issued "remain usable until they expire, at most five minutes after they were issued", and the conclusion now reads "The practical worst case between revoking and all activity stopping is therefore about five minutes."
  • Section 7, first revocation step (the one wording change beyond the three stale numbers; please check this one): the paragraph said Internet Identity stops honouring the connection "within at most five minutes". It now says immediately. Reason: for the stated conclusion to follow from the paragraph, the first step has to be immediate; with a five-minute first step the paragraph's own arithmetic gives a worst case of about ten minutes, not five. Immediate is what Internet Identity implements: a revoking write deletes the grant in the same update message that records it (set_mcp_config in II's mcp.rs: "the grant is deleted in the same update message, so revocation is atomic with the config write"), and II's docs/mcp-server-guide.md §5 states "Expiry and revocation stop the mcp_* methods immediately, but a per-app delegation you already hold keeps working at the target app until its own expiration — at most 5 minutes past the end of the session." If you would rather keep a conservative bound on the first step, the conclusion should then say about ten minutes; flagging the choice here rather than deciding it silently in a legal document.

The cross-reference in section 4 ("Revoking a connection takes effect in the two steps described in section 7.") still holds and is untouched. docs/anthropic-directory-submission.md has no lifetime statement about the per-application authorization, so nothing changes there.

Testing

Docs-only change to one Markdown file; no code touched, so the cargo checks below were not run.

  • cargo build --locked --all-targets — not run (docs-only)
  • cargo test --locked --all-targets — not run (docs-only)
  • cargo fmt --all / cargo clippy --all-targets (tree is warning-free) — not run (docs-only)
  • npm test --prefix monitoring/mcp-status (if the dashboard changed) — not applicable

What was verified instead:

  • The 5-minute cap, the min(max_ttl, cap) logic and the atomic grant deletion on revocation were read in a checkout of dfinity/internet-identity at 97df59726aa71387ef457e87da89c8edabc27d06 (src/internet_identity/src/mcp.rs, docs/mcp-server-guide.md).
  • grep -n -i hour docs/icp-mcp-privacy-policy-draft.md returns no matches after the change.
  • The three edits were applied as exact single-occurrence string replacements; the diff touches only the lines quoted above.

Checklist

  • I have read the Contributing guidelines.
  • Docs (README / comments) updated for any user-visible change. (This PR is the docs update; README and code comments were already correct.)
  • No secrets, credentials, or internal-only information are included.

Generated by Claude Code

…e hour

Internet Identity caps every MCP account delegation at 5 minutes
(MCP_MAX_EXPIRATION_PERIOD_NS in src/internet_identity/src/mcp.rs, applied
in prepare_delegation as min(max_ttl, cap) and never past the session
grant). The server passes max_ttl = null, so it gets exactly that cap. The
README and identities.rs already say so; the privacy draft still said "at
most one hour" in three places.

Update the per-application connection material paragraph (section 1), the
retention table (section 4) and the revocation paragraph (section 7). The
revocation paragraph's first step now says Internet Identity stops
honouring the connection immediately: a revoking write deletes the grant
in the same update message that records it (set_mcp_config), so the worst
case between revoking and all activity stopping is about five minutes, the
remaining lifetime of an already-issued delegation.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VP2vTJrh6VHX1VPvxMsRpX
@aterga
aterga requested a balanced review from Copilot November 2, 2026 15:57
@aterga
aterga marked this pull request as ready for review November 2, 2026 15:57
@aterga
aterga requested a review from a team November 2, 2026 15:57

Copilot AI 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.

🟢 Approval recommended

No active review issues remain for the documentation update clarifying the five-minute authorization lifetime and revocation window.

No open issues 🎉

What changed in this PR

Updates the privacy-policy draft to align per-application authorization lifetimes with the five-minute limit already documented elsewhere in the codebase.

Changes:

  • Replaces the stale one-hour lifetime with five minutes in the connection-material description and retention table.
  • Clarifies that revocation immediately prevents new authorizations, while existing authorizations expire within five minutes.
File Description
docs/​icp-mcp-privacy-policy-draft.md Corrects authorization lifetimes and the stated revocation window.

Review effort: Balanced

@aterga
aterga merged commit 7327804 into main Nov 3, 2026
17 checks passed
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.

4 participants