Skip to content

fix: aws profile bedrock auth#2831

Merged
amitksingh1490 merged 9 commits intotailcallhq:mainfrom
zulrang:feat/aws-profile-bedrock-auth
Apr 24, 2026
Merged

fix: aws profile bedrock auth#2831
amitksingh1490 merged 9 commits intotailcallhq:mainfrom
zulrang:feat/aws-profile-bedrock-auth

Conversation

@zulrang
Copy link
Copy Markdown
Contributor

@zulrang zulrang commented Apr 3, 2026

Summary

  • Adds aws_profile auth method to the Bedrock provider, allowing users to authenticate using an AWS profile name (SSO, IAM, etc.) instead of requiring a bearer token
  • Follows the existing GoogleAdc pattern: new AuthMethod::AwsProfile variant, AuthDetails::AwsProfile, and AwsProfileStrategy that validates profile credentials
  • Modifies BedrockProvider to support both bearer token (existing) and profile-based SigV4 authentication via a BedrockAuthMode enum
  • Fixes marker handling in the login flow so non-API-key auth methods (ADC, AWS Profile) don't get overwritten by existing credentials

Changes across 15+ files

  • Domain (forge_domain): AwsProfile variants in AuthMethod and AuthDetails enums
  • Infra (forge_infra): AwsProfileStrategy with SSO credential validation
  • Provider (forge_repo): BedrockAuthMode enum, dual auth path in init()
  • Services (forge_services): Fixed marker overwrite bug in provider_auth.rs
  • UI (forge_main): "AWS Profile (SSO/IAM)" display name, skip API key prompt for markers
  • Config: provider.json updated with "aws_profile" auth method for bedrock
  • Dependencies: sso feature added to aws-config workspace dep

Test plan

  • Unit tests: test_new_with_aws_profile_credentials, test_new_with_empty_aws_profile_fails
  • Integration test: test_real_sso_profile_converse (ignored in CI, validated manually with core-test-bedrock SSO profile)
  • E2E: forge provider login bedrock → select AWS Profile → enter profile name + region → no API key prompt → login succeeds
  • E2E: Existing bearer token auth path unaffected
  • Full test suite: 268 forge_repo tests pass

Closes #2830

roger-collins-self and others added 2 commits April 2, 2026 20:45
Allow Bedrock users to authenticate via AWS profile name (supporting SSO,
IAM, and other credential types configured in ~/.aws/config) as an
alternative to bearer token authentication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The AWS profile auth marker was being overwritten by existing API key
credentials during login, causing the UI to prompt for an API key even
when the user selected SSO authentication. Also adds unit and integration
tests for the AWS profile auth path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Apr 3, 2026
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 3, 2026

CLA assistant check
All committers have signed the CLA.

@amitksingh1490
Copy link
Copy Markdown
Contributor

Hey @zulrang does this PR worked for you.

@github-actions
Copy link
Copy Markdown

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions Bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Apr 13, 2026
@Qkessler
Copy link
Copy Markdown

Hi all! Would love to see this PR come to fruition. What's missing?

@github-actions github-actions Bot removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Apr 20, 2026
@amitksingh1490
Copy link
Copy Markdown
Contributor

@Qkessler I want someone to test this change using aws-profile login. And test with Anthropic models

@Qkessler
Copy link
Copy Markdown

Qkessler commented Apr 20, 2026

Any docs to build locally I can try on my x86_64 machine? Should cargo install --path . do it?

@Qkessler
Copy link
Copy Markdown

Cc @amitksingh1490

@amitksingh1490
Copy link
Copy Markdown
Contributor

amitksingh1490 commented Apr 21, 2026

@Qkessler clone the repo and cargo run will start a repl

@Qkessler
Copy link
Copy Markdown

Sadly, the current PR state doesn't work for me. Here's what the set up process looks like after cargo r:

● [07:37:36] Configure Bedrock
Multiple authentication methods available
? Enter AWS_REGION: eu-central-1
? Enter AWS_PROFILE: bedrock-enrikes
● [07:37:48] ERROR: Authentication completion failed: Failed to resolve credentials for profile 'bedrock-enrikes': the credentials provider was not properly configured. Try running 'aws sso login --profile bedrock-enrikes'

There's aws-profiles that are triggered through particular credential commands. For example, on this bedrock-enrikes profile, here's what ~/.aws/config looks like:

[profile bedrock-enrikes]
credential_process=<binary_name> credentials print --profile=bedrock-enrikes
region=eu-central-1

cc @amitksingh1490

@tillmannheigel
Copy link
Copy Markdown

Worked for me successfully with Azure AD SAML-based credentials (with temporary STS credentials in ~/.aws/credentials).

@gunnarsundberg
Copy link
Copy Markdown

using this branch as my daily driver with bedrock. i don't have permissions for using an api key so this is a lifesaver. thanks! 😊

@github-actions github-actions Bot added the type: provider Updates provider.json configuration. label Apr 24, 2026
@amitksingh1490 amitksingh1490 changed the title Feat/aws profile bedrock auth fix: aws profile bedrock auth Apr 24, 2026
@amitksingh1490 amitksingh1490 removed the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Apr 24, 2026
@github-actions github-actions Bot added the type: fix Iterations on existing features or infrastructure. label Apr 24, 2026
@amitksingh1490 amitksingh1490 enabled auto-merge (squash) April 24, 2026 08:40
@amitksingh1490 amitksingh1490 merged commit 5e5b80b into tailcallhq:main Apr 24, 2026
11 checks passed
@amitksingh1490
Copy link
Copy Markdown
Contributor

Thanks @zulrang
For confirmation
@tillmannheigel @Qkessler @gunnarsundberg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Iterations on existing features or infrastructure. type: provider Updates provider.json configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support SSO for AWS Bedrock

7 participants