Update http_config to support cfaccess - #962
Open
jaymzh wants to merge 1 commit into
Open
Conversation
Adds a new auth type cf-access which allows using this tool with Cloudflare Access. Defines the new auth type, create a new RoundTripper to handle the login / token fetch flow, and set it as the client transport if enabled. I originally planned to add this in prometheus/prometheus for `promtool`, but (1) The implementation is cleaner doing it here and (2) I want to do it for `amtool` as well, so implementing it in `common` means not doing it twice. Signed-off-by: Phil Dibowitz <phil@ipom.com>
jaymzh
force-pushed
the
cfaccess-auth
branch
from
September 3, 2026 22:31
ea2dd16 to
8b7f59d
Compare
jaymzh
added a commit
to jaymzh/common
that referenced
this pull request
Sep 3, 2026
When developing things (like prometheus#962), it's useful to be able to debug the http roundtrips. This adds a an --http.debug flag which logs the HTTP requests while redacting credentials. Signed-off-by: Phil Dibowitz <phil@ipom.com>
jaymzh
added a commit
to jaymzh/common
that referenced
this pull request
Sep 3, 2026
When developing things (like prometheus#962), it's useful to be able to debug the http roundtrips. This adds `debugRoundTripper` that other prom tools can use (behind a `--http.debug` flag) which automatically logs the HTTP requests while redacting credentials. Signed-off-by: Phil Dibowitz <phil@ipom.com>
jaymzh
added a commit
to jaymzh/common
that referenced
this pull request
Sep 3, 2026
When developing things (like prometheus#962), it's useful to be able to debug the http roundtrips. This adds `debugRoundTripper` that other prom tools can use (behind a `--http.debug` flag) which automatically logs the HTTP requests while redacting credentials. Signed-off-by: Phil Dibowitz <phil@ipom.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.
Adds a new auth type cf-access which allows using this tool with
Cloudflare Access. Defines the new auth type, create a new RoundTripper
to handle the login / token fetch flow, and set it as the client
transport if enabled.
I originally planned to add this in prometheus/prometheus for
promtool, but (1) The implementation is cleaner doing it here and (2)I want to do it for
amtoolas well, so implementing it incommonmeans not doing it twice.
If you were curious what it looks like to put directly in prometheus/prometheus,
there's a commit here for comparison: jaymzh/prometheus@6ea12c1
Signed-off-by: Phil Dibowitz phil@ipom.com