Add cloud-providers module: keyless Spring AI on Amazon Bedrock (AWS default credential chain under IRSA and EKS Pod Identity) and Azure OpenAI (managed identity, Microsoft Entra ID bearer tokens), an audit advisor, and the traps reproduced (leftover static key beats the role, AWS_REGION ignored by Bedrock auto-configuration, short-lived credentials refetched per call, azure-identity missing, leftover OPENAI_API_KEY, other modalities defaulting to OpenAI, SigV4 session token in AWS SDK DEBUG logs). No AWS account or Azure subscription used: a local server stands in for STS, Bedrock, the Azure identity endpoint and Azure OpenAI; the Spring AI, AWS SDK and azure-identity code is real. Spring Boot 4.2.0, Spring AI 2.1.0, Java 25.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5uEyg58znuchZ8C8i
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
98ed878675
commit
8f69e7bf50
@@ -0,0 +1,35 @@
|
||||
# NOT APPLIED to a real cluster. Account id, OIDC provider id and names are examples.
|
||||
# IRSA: the annotation is the whole link between the pod and the IAM role. The application sets no AWS key.
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: spring-ai
|
||||
namespace: ai
|
||||
annotations:
|
||||
eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/spring-ai-bedrock
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spring-ai
|
||||
namespace: ai
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels: { app: spring-ai }
|
||||
template:
|
||||
metadata:
|
||||
labels: { app: spring-ai }
|
||||
spec:
|
||||
serviceAccountName: spring-ai
|
||||
containers:
|
||||
- name: app
|
||||
image: registry.example.com/spring-ai-cloud-providers:1.0.0
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: bedrock
|
||||
# IRSA's webhook injects AWS_ROLE_ARN and AWS_WEB_IDENTITY_TOKEN_FILE (confirmed in AWS's docs); check with
|
||||
# `kubectl describe pod` whether AWS_REGION is there too. Spring AI ignores AWS_REGION for Bedrock
|
||||
# (output/02-bedrock-region-trap.txt), so set the region property explicitly:
|
||||
- name: SPRING_AI_BEDROCK_AWS_REGION
|
||||
value: us-east-1
|
||||
Reference in New Issue
Block a user