feat: add account selection for bearer auth - #30
Merged
Conversation
Add profile-scoped account selection so multi-account members can disambiguate which account bearer requests target via the X-Zep-Account-UUID header. - Add `config set-account` command supporting direct UUID assignment or interactive selection from GET /api/web/v1/me/accounts (flags SSO-bound accounts). - Add `--account` persistent flag, `--account` on `config add-profile`, and an AccountUUID profile field, resolved via config.GetAccountUUID. - Send X-Zep-Account-UUID from both the ABAC client and the Zep SDK client when an account is configured. - Default OAuth config to the production tenant (auth.getzep.com) with a required aud claim so a bare `auth login` works out of the box. - Normalize SDK base URLs to append /api/v2 when no /api/vN segment is present, so friendly hosts can be configured directly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CI's gofumpt check requires the multi-line append(opts, ...) form. Co-Authored-By: Claude Opus 4.8 (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
X-Zep-Account-UUIDheader (via a newconfig set-accountcommand, an--accountflag, and anAccountUUIDprofile field).audclaim, so a bareauth loginauthenticates against production out of the box./api/v2when no/api/vNsegment is present, letting users configure friendly hosts (e.g.https://api.getzep.com) without knowing the SDK's path prefix.Test plan
go test ./...passesgolangci-lint run ./...clean (0 issues)X-Zep-Account-UUIDsent when configured / omitted when empty (ABAC client);normalizeSDKBaseURLtable tests covering bare hosts, versioned paths, and proxied prefixeszepctl config set-accountwith 0 / 1 / multiple accounts, and direct-UUID form