Skip to content

refactor(auth): drop jwt exchange for api token - #158

Open
zfarrell wants to merge 1 commit into
mainfrom
worktree-sharded-hopping-book
Open

refactor(auth): drop jwt exchange for api token#158
zfarrell wants to merge 1 commit into
mainfrom
worktree-sharded-hopping-book

Conversation

@zfarrell

Copy link
Copy Markdown
Contributor

Deprecates the API-token → JWT key exchange: the configured api_key is now sent verbatim as Authorization: Bearer <token>, so hotdata/_auth.py (the _TokenManager minting from POST /v1/auth/jwt and refreshing via the refresh_token grant) is gone and Configuration.api_key is a plain attribute again.

The mustache template, .openapi-generator-ignore, and the regen workflow's safety gate are updated in the same change so a regeneration can't reintroduce the exchange. RefreshApi (POST /v1/refresh) is untouched — it is connection schema/data refresh, unrelated to refresh tokens.

@zfarrell
zfarrell requested a review from a team as a code owner August 10, 2026 23:38
@zfarrell
zfarrell requested review from anoop-narang and removed request for a team August 10, 2026 23:38

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the removal is complete and consistent: no remaining references to hotdata._auth, _TokenManager, TokenExchangeError, or HOTDATA_DISABLE_JWT_EXCHANGE outside the CHANGELOG/test narrative; .openapi-generator-ignore still lists the surviving hand-written modules; the template and generated configuration.py stay in sync and both are pinned by tests/test_api_token_auth.py.

Two things I checked specifically:

  • test_jwt_opt_out_env_var_is_inert uses "0", which is the value the old code treated as non-affirmative — so it would have triggered a mint and tripped _no_network. It's a real regression pin, not a tautology.
  • The inverted regen guard in .github/workflows/regenerate.yml scans the full source for the exchange needles and AST-checks that api_key is not a property and is assigned in __init__, which covers the reintroduction paths the old guard covered in the other direction.

CI checks were still queued/in progress when this review started, so I have not seen the unit or integration results.

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