Skip to content

add ability to set CURLOPT_HTTPAUTH - #209

Open
AndrewJackson2020 wants to merge 1 commit into
pramsey:masterfrom
AndrewJackson2020:gss
Open

add ability to set CURLOPT_HTTPAUTH#209
AndrewJackson2020 wants to merge 1 commit into
pramsey:masterfrom
AndrewJackson2020:gss

Conversation

@AndrewJackson2020

Copy link
Copy Markdown

The primary use case here is the get the ability to set CURLOPT_AUTH to CURLAUTH_NEGOTIATE to allow GSS authentication into HTTP endpoints. This is especially useful with postgres delegated GSS credentials where the client can pass a token to the postgres backend, the backend caches the token in memory and then that token can be used to auth into postgres_fdw, dblink, or (with this PR) http endpoints.

CURLOPT_HTTPAUTH is a bit different from the other endpoints in that it is a long bitmask data type and is designed to allow multiple auth types to be bitwised OR'd together. This implementation does not support that. It only allows a single auth option to be set.

The primary use case here is the get the ability to set CURLOPT_AUTH
to CURLAUTH_NEGOTIATE to allow GSS authentication into HTTP endpoints.
This is especially useful with postgres delegated GSS credentials where
the client can pass a token to the postgres backend, the backend caches
the token in memory and then that token can be used to auth into
postgres_fdw, dblink, or (with this PR) http endpoints.

CURLOPT_HTTPAUTH is a bit different from the other endpoints in that it
is a long bitmask data type and is designed to allow multiple auth types
to be bitwised OR'd together. This implementation does not support that.
It only allows a single auth option to be set.
@pramsey

pramsey commented Jul 27, 2026 via email

Copy link
Copy Markdown
Owner

@AndrewJackson2020

Copy link
Copy Markdown
Author

I don’t see any curl version guards in this

Apologies for that, will add curl versions guards and tests.

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.

2 participants