Skip to content

[common.oauth] Allow customization of 'Authorization' header token type format - #1187

Merged
manugarg merged 1 commit into
cloudprober:mainfrom
Redexing:allow_token_type_format
Dec 18, 2025
Merged

manugarg merged 1 commit into
cloudprober:mainfrom
Redexing:allow_token_type_format

Conversation

@Redexing

@Redexing Redexing commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

The most common OAuth 'Authorization' header format is simply: Bearer <...token>, but there are other custom token type allowed.

For example, per https://docs.snowflake.com/en/developer-guide/snowflake-ml/model-registry/container#calling-the-service:

"With a Programmatic Access Token (PAT), authentication based on a token you generate on Snowflake. For information on setting up a PAT for use with Snowflake services, see Using programmatic access tokens for authentication. To use a PAT when calling a service, include the token in your Authorization request header:

Authorization: Snowflake Token="<your_token>"

For example, with a PAT stored in the environment variable SNOWFLAKE_SERVICE_PAT and the predict(INTEGER, VARCHAR, TIMESTAMP) function signature used in previous examples, you could make a request to the endpoint random-id.myaccount.snowflakecomputing.app/predict with the following curl command:

curl \
 -X POST \
 -H "Content-Type: application/json" \
 -H "Authorization: Snowflake Token=\"$SNOWFLAKE_SERVICE_PAT\"" \
 -d '{
       "data": [
                   [0, 10, "Alex", "2014-01-01 16:00:00"],
                   [1, 20, "Steve", "2015-01-01 16:00:00"],
                   [2, 30, "Alice", "2016-01-01 16:00:00"],
                   [3, 40, "Adrian", "2017-01-01 16:00:00"]
               ]
   }' \
 random-id.myaccount.snowflakecomputing.app/predict/predict

"

@manugarg manugarg changed the title allow customization of 'Authorization' header token type format [common.oauth] Allow customization of 'Authorization' header token type format Dec 18, 2025
@manugarg
manugarg merged commit 53bd420 into cloudprober:main Dec 18, 2025
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