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,25 @@
|
||||
# Audit lines, and a search of the whole log for every secret the run handled
|
||||
|
||||
Audit lines from the Bedrock run (two calls, default log levels):
|
||||
INFO audit - provider=bedrock principal=arn:aws:sts::111122223333:assumed-role/spring-ai-bedrock/pod-session model=us.anthropic.claude-sonnet-4-5-20250929-v1:0 outcome=OK inputTokens=12 outputTokens=7 ms=<n>
|
||||
INFO audit - provider=bedrock principal=arn:aws:sts::111122223333:assumed-role/spring-ai-bedrock/pod-session model=us.anthropic.claude-sonnet-4-5-20250929-v1:0 outcome=OK inputTokens=12 outputTokens=7 ms=<n>
|
||||
Audit lines from the Azure run (two calls, DEBUG on com.azure, MSAL, okhttp, Spring AI):
|
||||
INFO audit - provider=azure principal=oid=00000000-0000-0000-0000-00000000a11c,tid=11111111-2222-3333-4444-555555555555 model=gpt-4o-mini outcome=OK inputTokens=11 outputTokens=6 ms=<n>
|
||||
INFO audit - provider=azure principal=oid=00000000-0000-0000-0000-00000000a11c,tid=11111111-2222-3333-4444-555555555555 model=gpt-4o-mini outcome=OK inputTokens=11 outputTokens=6 ms=<n>
|
||||
|
||||
Searched each whole log for every secret the run handled:
|
||||
|
||||
Bedrock, default levels Bedrock, DEBUG on awssdk + Spring AI Azure, DEBUG
|
||||
STS secret access key not found not found -
|
||||
STS session token not found FOUND -
|
||||
Web identity token (projected) not found not found -
|
||||
Azure access token (JWT) - - not found
|
||||
Azure token payload segment - - not found
|
||||
IDENTITY_HEADER value - - not found
|
||||
Prompt text not found not found not found
|
||||
|
||||
Log size: Bedrock default 9 lines, Bedrock DEBUG 273 lines, Azure DEBUG 49 lines
|
||||
The session token in the DEBUG log comes from the SigV4 signer's canonical request:
|
||||
DEBUG DefaultV4RequestSigner - AWS4 Canonical Request: POST
|
||||
...
|
||||
x-amz-security-token:stub-session-token-1
|
||||
Reference in New Issue
Block a user