Skip to content

[v2] Add support for configured manual auth scheme and bearer token auth #9620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 31, 2025

Conversation

hssyoo
Copy link
Contributor

@hssyoo hssyoo commented Jul 29, 2025

Ports boto/botocore@e714dec and boto/botocore#3526

This PR adds support for configuring preferred auth schemes and also service-specific bearer token auth for Bedrock. This allows users to pass a bearer token to authenticate Bedrock requests.

To manually test:

  1. Generate Bedrock bearer token
  2. Set env vars:
export AWS_BEARER_TOKEN_BEDROCK=$GENERATED_TOKEN
export AWS_AUTH_SCHEME_PREFERENCE=httpBearerAuth
  1. Run aws bedrock list-prompt-routers --debug

Wire level request should use bearer token and register 3 for feature id:

Sending http request: <AWSPreparedRequest stream_output=False,
method=GET, url=https://bedrock.us-west-2.amazonaws.com/prompt-routers,
headers={'User-Agent': b'aws-cli/2.27.61 md/awscrt#0.26.1 ua/2.1
lang/python#3.13.4 md/pyimpl#CPython m/Z,E,C,b,3 cfg/retry-mode#standard
md/installer#source sid/cf1d50a2a093 md/prompt#off
md/command#bedrock.list-prompt-routers',
'Authorization': b'Bearer bedrock-api-key-MY-REDACED-KEY'}>

@hssyoo hssyoo marked this pull request as ready for review July 29, 2025 17:46
@hssyoo hssyoo requested a review from ashovlin July 30, 2025 17:19
@hssyoo hssyoo merged commit ac979ac into v2 Jul 31, 2025
93 checks passed
@hssyoo hssyoo deleted the manual-auth-schemes branch July 31, 2025 14:43
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