Repository navigation
feat(headwaters-client): send a bearer token over TLS - #97
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
roeap
force-pushed
the
feat/client-bearer-tls
branch
from
December 5, 2026 06:42
6150756 to
21c3ab2
Compare
The default transport is plaintext only, so `with_token` / HEADWATERS_TOKEN could not reach an `https://` server such as headwaters on Neon, which now authenticates callers (Neon Auth access tokens, `olk_` API keys). With `cloud-auth`, add `HeadwatersClient::new_with_token` (olai-http's `CloudClient::new_with_token` over its TLS client) and `HEADWATERS_AUTH=token` for `from_env`, which sends HEADWATERS_TOKEN. Document which tokens a server with `auth.mode = "olai-auth"` accepts, and point the plaintext path's https error at the new constructor. Co-authored-by: Isaac <no-reply@databricks.com>
roeap
force-pushed
the
feat/client-bearer-tls
branch
from
December 5, 2026 06:43
21c3ab2 to
904631e
Compare
Open
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.
Stacked on #96.
headwaters-client's default transport takes plaintext URLs only, so
with_token/HEADWATERS_TOKENcan't reach anhttps://server. A Neon deployment is https, and since #96 it authenticates callers.HeadwatersClient::new_with_token(config, token)(cloud-authfeature) sendsAuthorization: Bearer <token>over olai-http's TLS client, usingCloudClient::new_with_token.HEADWATERS_AUTH=tokenmakes thecloud-authfrom_envsendHEADWATERS_TOKENthe same way. It is an error if the token is unset.with_token,ENV_TOKENandENV_AUTHsay which tokens a server withauth.mode = "olai-auth"accepts: a Neon Auth access token minted for one of its audiences, or anolk_API key. The plaintext path's https error now points atnew_with_token.This pull request and its description were written by Isaac.