fix(bedrock): preserve bearer token env compatibility - #6167
Merged
Conversation
Signed-off-by: Sumanth Kamenani <skamenan@redhat.com>
Collaborator
|
I wonder, is this why the bedrock re-recording failed? |
Collaborator
Author
@cdoern I don’t think the failed re-record is caused directly by the env var rename. The job env showed I opened this PR as a small compatibility follow-up anyway: it keeps AWS_BEDROCK_BEARER_TOKEN as the canonical documented name, but also accepts/passes through the legacy AWS_BEARER_TOKEN_BEDROCK name so older CI/local paths don’t silently fall back to SigV4/no-token behavior during the transition. |
skamenan7
marked this pull request as ready for review
June 23, 2026 13:11
skamenan7
requested review from
bbrowning,
cdoern,
franciscojavierarceo,
leseb,
mattf and
raghotham
as code owners
June 23, 2026 13:11
cdoern
approved these changes
Jun 23, 2026
cdoern
enabled auto-merge
June 23, 2026 13:18
skamenan7
added a commit
to skamenan7/llama-stack
that referenced
this pull request
Jun 30, 2026
## Summary - add an optional Bedrock recording path for the STS web identity auth introduced in ogx-ai#5388 - when AWS_BEDROCK_ROLE_ARN is configured, request a GitHub OIDC token for sts.amazonaws.com and expose AWS_ROLE_ARN/AWS_WEB_IDENTITY_TOKEN_FILE to the Bedrock provider - keep the current bearer-token path as fallback when AWS_BEDROCK_ROLE_ARN is not configured - pass standard AWS credential-chain env vars through Docker integration test runs ## Context ogx-ai#6167 preserved compatibility between AWS_BEDROCK_BEARER_TOKEN and the legacy AWS_BEARER_TOKEN_BEDROCK name. That PR is now merged. The remaining question from the failed Bedrock re-record is whether CI ever moved onto the STS/OIDC auth path from ogx-ai#5388. The provider already supports SigV4 + web identity, but the record workflow did not prepare AWS_ROLE_ARN/AWS_WEB_IDENTITY_TOKEN_FILE for Bedrock. This PR wires that optional path without removing the bearer-token fallback. To use it, configure an AWS_BEDROCK_ROLE_ARN repository secret for the role trusted by GitHub Actions OIDC. ## Test Plan - uv run pytest tests/unit/providers/inference/test_bedrock_config.py tests/unit/providers/inference/bedrock/test_sigv4_auth.py -q - uv run pre-commit run check-yaml --files .github/workflows/record-integration-tests.yml - uv run pre-commit run actionlint --files .github/workflows/record-integration-tests.yml - pre-commit via git commit hooks from original commit Signed-off-by: Sumanth Kamenani <skamenan@redhat.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.
Summary
Context
This compatibility gap came up while looking at #6106-related CI/re-recording follow-up, but #6106 is not the cause of the rename. The Bedrock env var rename was intentional and documented as part of the AWS-native auth naming work.
The failed re-record job showed AWS_BEDROCK_BEARER_TOKEN was set but Bedrock rejected that credential, so the immediate failure still looks like a stale/invalid bearer token. Separately, #5388 already added SigV4 + STS web identity support in the provider, but the record workflow had not prepared AWS_ROLE_ARN/AWS_WEB_IDENTITY_TOKEN_FILE for Bedrock. This PR wires that optional workflow path without removing the current bearer-token fallback.
Test Plan