Skip to content

feat: nodkey agent-browser-plugin, the credential plugin for agent-browser (#104) - #182

Merged
groupsky merged 1 commit into
mainfrom
feat/104-agent-browser-plugin
Nov 13, 2026
Merged

groupsky merged 1 commit into
mainfrom
feat/104-agent-browser-plugin

Conversation

@groupsky

@groupsky groupsky commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Closes part of #104 (the issue stays open for the end-to-end test of the agents Chrome profile).

What

  • nodkey agent-browser-plugin: the credential plugin of agent-browser (protocol agent-browser.plugin.v1). It answers credential.resolve, nodkey.list, nodkey.totp and plugin.manifest. It is a nodkey subcommand, so it ships in the same signed release (feat: a nodkey credential plugin for agent-browser logins #104 open question 4).
  • A new request header Nodkey-No-Tap: 1 on /v1/logins/login. With it the broker never asks the person. When no window grant and no one-use pre-approval covers the login, it answers 428 at once, with a denied entry with the new cause no_tap, and sends no message. All checks of a login still run. agent-browser waits only 15 s for a plugin, so the tap comes first, in nodkey preapprove --login.
  • Tested with agent-browser 0.38.1. The contract test sends requests that agent-browser 0.38.1 wrote to a recording plugin (internal/client/testdata/agent-browser-0.38.1/), to a real test broker with a fake bw store.
  • Docs: DESIGN.md 21.10 (plugin, requests, answers, errors, no-tap header), section 9 cause list, section 15 command list; THREAT-MODEL.md T48; new docs/agent-browser.md (plugin entry, login steps, TOTP, errors, the agents Chrome profile, marked as not yet tested from start to end); docs/setup.md points to it.

Decisions (from the issue)

  • Q1 pre-approve first: nodkey preapprove --login ITEM --url URL, then auth login within 60 s.
  • Q2 itemRef is the item ID; a name is refused.
  • Q3 no url (agent-browser sends null): refused.
  • Q4 a nodkey subcommand.
  • Q5 version pinned in the docs, contract test with recorded requests.

Found while recording (agent-browser 0.38.1): it drops the answer of a plugin that exits non-zero, so the plugin exits 0 whenever it wrote an answer; command is not split at spaces, so the subcommand goes in args; for auth login it does not show the error text.

Tests

  • internal/client/abplugin_test.go: TestPluginContract (pre-approval tap after 100 s on the fake clock, then the recorded credential.resolve gets the login with no new message; second login gets "needs a tap" and no message; recorded nodkey.totp gives the RFC 6238 code once; recorded nodkey.list), TestPluginValuesOnlyInTheCredential (password not in stderr, other answers, or the audit log), TestPluginRefusals (20 deny cases), TestPluginBrokerRefusals, TestPluginDeadline, TestPluginPageWithFragment, TestPluginManifestAndUsage, TestCredentialAnswer (JSON escaping, exact buffer, non-UTF-8 refused).
  • internal/broker/logins_test.go: TestLoginNoTap, TestLoginNoTapReprompt, TestLoginNoTapHeaderValues.
  • internal/approval/login_test.go: TestLoginNoTap (NoTap on secrets or a pre-approval is not allowed).
  • go test -race ./..., go vet ./..., golangci-lint run --build-tags e2e: pass.

Security review

The security-reviewer agent found no critical, high or medium problems. It found 4 low ones and 1 note: the help text showed a config that does not work, the TOTP 403 text was wrong for some causes, the docs said "fixed text" too strongly, some deny tests were missing, and the plugin returned the raw page instead of the broker's form of it. All are fixed in this PR, and the reviewer checked the fixes.

Progress

  • Plugin and no-tap header
  • Tests and contract test
  • DESIGN.md, THREAT-MODEL.md, docs
  • Security review, findings fixed
  • CI green

🤖 Generated with Claude Code

…owser (#104)

- nodkey agent-browser-plugin speaks agent-browser.plugin.v1:
  credential.resolve, nodkey.list, nodkey.totp, plugin.manifest.
- New header Nodkey-No-Tap on /v1/logins/login: no message; 428 and
  the audit cause no_tap when no grant or pre-approval covers it.
- Contract test with requests recorded from agent-browser 0.38.1.
- DESIGN.md 21.10, THREAT-MODEL.md T48, docs/agent-browser.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@groupsky
groupsky merged commit 7858003 into main Nov 13, 2026
7 checks passed
@groupsky
groupsky deleted the feat/104-agent-browser-plugin branch November 13, 2026 16:25
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