feat(S-42): document 1Password service account agent auth pattern#48
Merged
feat(S-42): document 1Password service account agent auth pattern#48
Conversation
Claude Code subprocesses could not `op read op://...` mid-session because `op` refuses to trigger biometric when stdin is not a TTY. Fix: use a 1Password service account token loaded into the shell env via the existing secret-cache-read infrastructure. Once OP_SERVICE_ACCOUNT_TOKEN is set, `op` uses bearer auth and every subprocess inherits headless access. Zero new code: the existing dotfiles secret tooling already handles it. Only documentation and one registered op:// reference. - Add docs/specs/S-42-service-account-agent-auth.md - CLAUDE.md: expand secret injection section from two backends to three patterns - docs/guide.md: new subsection under secrets management - docs/sync-log.md: hostname-tagged rollout entry - secrets.toml: register OP_SERVICE_ACCOUNT_TOKEN op:// reference Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
op read op://...mid-session without biometric popups. Requires 1P Business/Teams plan.dotfiles secret add+secret-cache-read+secrets.fish.tmplinfrastructure from S-35 already handles this; registeringOP_SERVICE_ACCOUNT_TOKENis enough.Why
oprefuses to trigger biometric when stdin isn't a TTY, so subprocessop readcalls from Claude's Bash tool failed silently. A service account token bypasses biometric entirely onceOP_SERVICE_ACCOUNT_TOKENis in env, and child processes inherit it.Files changed
docs/specs/S-42-service-account-agent-auth.mdCLAUDE.mddocs/guide.mddocs/sync-log.mdhome/.chezmoidata/secrets.tomlOP_SERVICE_ACCOUNT_TOKEN(op:// ref, not a secret value)No changes to
secret-cache-read,secrets.fish.tmpl, ordotfilesfish functions. Existing infra absorbs this.Test plan
shellcheck --severity=warningclean on all.shfish -nclean on all.fishchezmoi execute-template < secrets.fish.tmplrenders;set -gx OP_SERVICE_ACCOUNT_TOKENline present with only theop://referencechezmoi apply --dry-run --forceexits 0chezmoi managed | wc -lunchanged (100 files)op read op://Trading/...works headlesslyBlast radius
Service account token reads every vault scoped to it. Keychain entry is per-user encrypted. Recommended mitigation (dedicated
Agentsvault) documented in the spec but not enforced; this machine usesPrivatefor convenience, accepted risk.🤖 Generated with Claude Code