feat: add AWS Bedrock API Key (Bearer Token) authentication support - #6685
Open
xowjd258 wants to merge 2 commits into
Open
feat: add AWS Bedrock API Key (Bearer Token) authentication support#6685xowjd258 wants to merge 2 commits into
xowjd258 wants to merge 2 commits into
Conversation
Add support for AWS Bedrock API Key (Bearer Token) authentication, enabling users to authenticate without IAM credentials. Changes: - New credential type: 'AWS Bedrock API Key' (awsBedrockApiKey) - Bedrock Chat Model node now supports both IAM and API Key credentials - Bearer token injected via BedrockRuntimeClient middleware - Backward compatible: existing IAM flows unchanged Auth flow: 1. Create 'AWS Bedrock API Key' credential with your bearer token 2. Select it in the Bedrock node's credential dropdown 3. Token is injected as 'Authorization: Bearer <token>' header Also supports direct input via node-level 'Bedrock API Key' field for quick testing, and the AWS_BEARER_TOKEN_BEDROCK environment variable as an additional fallback.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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
Add support for AWS Bedrock API Key (Bearer Token) authentication, enabling users to authenticate without IAM credentials.
Problem
The AWS Bedrock Chat Model node currently only supports IAM-based authentication (access key + secret key). AWS Bedrock now supports API Key (Bearer Token) authentication as an alternative, but Flowise doesn't expose this option.
Changes
New file
packages/components/credentials/AWSBedrockApiKey.credential.ts— New credential typeawsBedrockApiKeywith a single password field for the Bearer TokenModified file
packages/components/nodes/chatmodels/AWSBedrock/AWSChatBedrock.tsawsBedrockApiKeyto credential dropdown options (alongside existingawsApi)Bedrock API Key (Bearer Token)input field for quick testinginit(), when a Bearer Token is provided (via credential or direct input):BedrockRuntimeClientwith the token injected via middleware asAuthorization: Bearer <token>ChatBedrockConverseInput.clientHow it works
Usage
Alternatively, enter the token directly in the node's "Bedrock API Key (Bearer Token)" field under Additional Parameters.
Testing
pnpm --filter flowise-components buildsucceeds