Remove the Entire DB credential-store integration#95
Merged
Conversation
git-sync carried a bespoke Entire credential path: auth.Resolve fell back to an active-user lookup in ~/.config/entire/hosts.json plus a file/keyring token store and OAuth refresh-token handling (client_id=entire-cli). Nothing in the product produces that layout anymore — the mirror-pipeline worker (the only library consumer that talks to entiredb) supplies credentials directly at the transport layer (GitHub installation tokens + per-request entire-core repo-scoped bearers), and client-side entire:// auth is owned by the separate git-remote-entire helper using the newer contexts.json model. So the lookup only ever read a store no current producer writes. Drop entiredb.go and tokenstore.go and the LookupEntireDBCredential fallback; auth.Resolve now resolves explicit token/bearer credentials only and otherwise returns nil so the git credential helper is consulted on a 401, exactly as for any other remote. This also drops the github.com/zalando/go-keyring dependency and, with the file token store gone, removes the syscall.Flock usage that broke the Windows build (so the package now cross-compiles for windows cleanly). Supersedes the entiredb token-refresh fix (#90) and the tokenstore Windows flock fix (#92), both of which were polishing this now-deleted code. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Entire-Checkpoint: de15fe82f1f3
623e9ea to
44f774c
Compare
pjbgf
approved these changes
Jun 19, 2026
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.
Why
git-sync carried a bespoke Entire credential path:
auth.Resolvefell back to an active-user lookup in~/.config/entire/hosts.jsonplus a file/keyring token store and OAuth refresh-token handling (client_id=entire-cli). Investigation of the actual consumers shows nothing produces that layout anymore:bearerTransportfor the target. It never provisionshosts.json/ENTIRE_TOKEN_STORE, so git-sync's lookup always returned empty there.entire://auth is owned by the separategit-remote-entirehelper, which uses the newercontexts.json+ cluster-discovery model — not this token store.So the lookup only ever read a store no current producer writes.
What
internal/auth/entiredb.goandinternal/auth/tokenstore.go, and theLookupEntireDBCredentialfallback.auth.Resolvenow resolves explicit token/bearer credentials only and otherwise returnsnil, so the git credential helper is consulted on a 401 — exactly as for any other remote. (Its error return, always-nil after the change, is dropped.)misetasks.github.com/zalando/go-keyringdependency.syscall.Flockusage that broke the Windows build disappears — the module now cross-compiles forwindowscleanly.Supersedes
flockfix) were both polishing this now-deleted code. I'll close them in favor of this.Verification
go build/vet/test ./...,gofmt -l -s .,golangci-lint run ./...(0 issues), andGOOS=windows go build ./...all pass;go mod tidyis a no-op;keyring/wincred/godbusare gone from the dependency graph.🤖 Generated with Claude Code
Note
Medium Risk
Auth behavior changes for anyone relying on
ENTIRE_CONFIG_DIR/ token store without explicit flags—those users must pass tokens or use git credential helper. The deleted path was reportedly unused by current producers, limiting blast radius.Overview
Removes the bespoke Entire DB auth path (
hosts.jsonactive user, file/keyring token store, OAuth refresh) and narrowsauth.Resolveto explicit token/bearer only; when nothing is set it returnsniland the existing git credential helper path runs after a 401, same as any other HTTP remote. The(Method, error)return becomesMethodonly.Deletes
internal/auth/entiredb.goandinternal/auth/tokenstore.go, dropsgithub.com/zalando/go-keyring(and related indirect deps), and removes Entire-specific tests plus the optional local-Entire smoke test and itsmisetasks. Docs/changelog note the slimmer auth model; removing the file token store’sflockusage restores clean Windows cross-compiles.Reviewed by Cursor Bugbot for commit 623e9ea. Configure here.