Identity: return only metadata from credential requests - #360
Merged
Merged
Conversation
Match attestation requests so selecting JSON or piping output does not put credentials and claim values into agent transcripts. Keep the full artifact and holder key available on disk for scripts that sign presentations. Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
Exercise JSONL and every full-output format alongside both terminal modes so credential and attestation requests keep the same metadata-only output contract. Committed-By-Agent: codex Co-authored-by: codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Credential requests currently print the full credential and claim values in JSON and piped output, putting sensitive data into agent transcripts. Match attestation requests: save the full artifact and return only its path and metadata in every output mode, including
--full-output. Scripts can read the credential and holder key from disk to sign presentations. No option to print credential contents is added.The commands remain Unlisted, behind
LINK_IDENTITY_COMMANDS, and excluded from MCP.Example output:
{ "issuer": "https://api.link.com", "expires_at": "2026-10-21T00:00:00Z", "holder": { "path": "/home/agent/.link/holder-key.jwk", "thumbprint": "..." }, "claim_names": ["email", "name", "phone"], "output_file": "/home/agent/.link-cli/credentials/current.json" }Validation: SDK/CLI builds, CLI typecheck, lint, and 65 identity tests passed. Shared tests cover all five formats, the JSON alias, and full-output envelopes in both terminal modes; the regression tests also detected credential disclosure in the original handler. All 84 built-CLI checks passed across credential requests, pooled attestation requests, and exports using pipes and real pseudo-terminals: artifacts persisted with 0600 permissions and fixture secrets stayed out of stdout/stderr. The saved holder key successfully signed data that verified against the credential's holder public key. Issuer responses were mocked; no live issuance was tested.
r? @drapeau-stripe
-- Written by Codex