Repository navigation
feat: website logins from a shared Bitwarden collection (#103) - #181
Merged
Merged
Conversation
…gins (#103) First part of #103: internal/totp (RFC 6238, base32 and otpauth://totp), internal/loginmatch (Bitwarden match types, https pages only, public suffix list from golang.org/x/net/publicsuffix), and ListLogins and FetchLogin of the bw store. DESIGN.md section 21, THREAT-MODEL.md T32 and T43 to T46, and the collection steps in docs/setup.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The broker checks [logins.NAME] (a bw store and a collection) and [[logins.NAME.items]] rules. The item's rule wins completely. The same collection twice, two rules for one item, and ask = "never" are refused. config-diff lists the changes; a reload refuses a change of [logins.*] until the broker keeps login grants per item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open
6 of 7 tasks
…udit and messages (#103) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#103) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…--login (#103) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
Part of #103: website logins from a shared Bitwarden collection, with TOTP codes made on the broker, and the one-use pre-approval (step 9).
What is here
internal/totp: TOTP codes (RFC 6238) fromlogin.totp: plain base32 andotpauth://totp(SHA1, SHA256, SHA512; 6 to 8 digits; any period).steam://and others are refused. Tests use the RFC 6238 test vectors.internal/loginmatch: the page URL (onlyhttps) and Bitwarden's URI match types. Base domain usesgolang.org/x/net/publicsuffix.internal/store/bwlogin.go: list and fetch of login items for thebwstore. A list never keeps a password or a TOTP seed.internal/config/logins.go:[logins.NAME]and[[logins.NAME.items]]; the item's rule wins completely; checks at start; config-diff.internal/approval: theweb_loginrequest, window grants per (client, item ID), and the one-use pre-approval per (client, item ID, origin) that endsLoginPreapproveTime(60 s) after the tap. Telegram and ntfy messages; the pre-approval message names no time limit for the tap.internal/broker/logins.go:/v1/logins/list(no tap, rate limit, always audited),/v1/logins/login(all item checks; two configured collections means deny; the password is cleared during the wait and read and checked again after the tap),/v1/logins/totp(one code for 2 minutes after a login, or during a window grant; the seed never leaves the broker).internal/client: list, login and TOTP requests (for feat: a nodkey credential plugin for agent-browser logins #104), andnodkey preapprove --login ITEM --url URL.New dependency
golang.org/x/netwas already an indirect dependency. It is now direct, only forpublicsuffix. Licence BSD-3-Clause, the same authors asgolang.org/x/crypto. AGENTS.md names it.Security review
Every commit had a review by
.claude/agents/security-reviewer.md. The review of the broker part found 2 medium and 6 low findings; all are fixed in ce69d67. One earlier finding is left as it is: a URI with no match type uses base domain. This was the proposed answer to open question 5; the risk is written in DESIGN.md 21.4, T43 and docs/setup.md.Progress
bwstore: list and fetch of login items[logins.*]with item rules, checks at start, config-diffnodkey preapprove --login ITEM --url URL: one use, (client, item, origin), 60 s[logins.*](later work; refused for now)🤖 Generated with Claude Code