mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-21 08:15:23 -04:00
[PR #90] [MERGED] feat: add support for temporary AWS credentials #151
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/vxcontrol/pentagi/pull/90
Author: @kaikreuzer
Created: 12/5/2025
Status: ✅ Merged
Merged: 12/6/2025
Merged by: @asdek
Base:
master← Head:tmpsessions📝 Commits (1)
2f35b87feat: add support for temporary AWS credentials📊 Changes
5 files changed (+12 additions, -6 deletions)
View changed files
📝
.env.example(+1 -0)📝
backend/docs/config.md(+4 -1)📝
backend/pkg/config/config.go(+5 -4)📝
backend/pkg/providers/bedrock/bedrock.go(+1 -1)📝
docker-compose.yml(+1 -0)📄 Description
Description of the Change
Problem
PentAGI's AWS Bedrock integration only supported permanent IAM user credentials, making it incompatible with temporary security credentials from AWS STS, assumed roles, or MFA-enabled sessions. This limited deployment flexibility and security best practices.
Solution
Added support for AWS session tokens by introducing a new
BEDROCK_SESSION_TOKENconfiguration parameter. The session token is passed to AWS SDK'sStaticCredentialsProvider, enabling temporary credential workflows while remaining backward compatible with permanent credentials.Type of Change
Areas Affected
Testing and Verification
Test Configuration
Test Steps
aws sts assume-roleoraws sts get-session-tokenBEDROCK_SESSION_TOKENenvironment variable with the session tokenBEDROCK_ACCESS_KEY_IDandBEDROCK_SECRET_ACCESS_KEYwith temporary credentialsTest Results
Security Considerations
Enhancement: Enables use of temporary credentials, which is a security best practice. Temporary credentials automatically expire, reducing risk from credential exposure. Supports MFA-enforced policies and IAM role assumption patterns.
Performance Impact
No performance impact. Session token is only used during authentication initialization.
Documentation Updates
Deployment Notes
New Environment Variable:
BEDROCK_SESSION_TOKEN(optional).envfile if using docker-compose deploymentBackward Compatible: Existing deployments continue to work without changes.
Checklist
Code Quality
go fmtandgo vet(for Go code)npm run lint(for TypeScript/JavaScript code)Security
Compatibility
Documentation
Additional Notes
This change enables common AWS deployment patterns:
aws-vaultor similar toolsThe session token field is optional and backward compatible with existing configurations.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.