Skip to content

feat: add account selection for bearer auth - #30

Merged
pevans merged 2 commits into
mainfrom
feat/account-selection
Jul 22, 2026
Merged

feat: add account selection for bearer auth#30
pevans merged 2 commits into
mainfrom
feat/account-selection

Conversation

@pevans

@pevans pevans commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds profile-scoped account selection so multi-account members can pin which account bearer requests target, sent as the X-Zep-Account-UUID header (via a new config set-account command, an --account flag, and an AccountUUID profile field).
  • Defaults OAuth config to the production tenant with the required aud claim, so a bare auth login authenticates against production out of the box.
  • Normalizes SDK base URLs to append /api/v2 when no /api/vN segment is present, letting users configure friendly hosts (e.g. https://api.getzep.com) without knowing the SDK's path prefix.

Test plan

  • go test ./... passes
  • golangci-lint run ./... clean (0 issues)
  • New unit tests: X-Zep-Account-UUID sent when configured / omitted when empty (ABAC client); normalizeSDKBaseURL table tests covering bare hosts, versioned paths, and proxied prefixes
  • Manual: zepctl config set-account with 0 / 1 / multiple accounts, and direct-UUID form
  • Manual: bearer request carries the header and hits the intended account

pevans and others added 2 commits July 21, 2026 22:40
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>
@pevans
pevans merged commit 64cc471 into main Jul 22, 2026
9 of 10 checks passed
@pevans
pevans deleted the feat/account-selection branch July 22, 2026 06:14
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