aws/config: validate credentials before SigV4 signing#18333
aws/config: validate credentials before SigV4 signing#18333kcreddy merged 4 commits intoelastic:mainfrom
Conversation
The AWS Config CEL program accesses state.secret_key and
state.access_key without guards. When a user configures the
integration with Role ARN or no credentials (both valid for other
AWS data streams), the program crashes with the unhelpful error
"no such key: secret_key".
Add a credential check at the top of the CEL program that detects
missing or empty access_key_id / secret_access_key and returns a
clear error explaining that static credentials are required and
Role ARN is not supported for this data stream. The check uses
optional field access (state.?secret_key.orValue("")) to handle
both absent and empty-string cases safely.
Update the data stream docs and manifest description to state the
Role ARN limitation upfront. Add a script test that verifies the
error message is emitted when credentials are missing.
Fixes elastic#18332
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
✅ Vale Linting ResultsNo issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
History
cc @kcreddy |
|
Package aws - 6.5.1 containing this change is available at https://epr.elastic.co/package/aws/6.5.1/ |
|
Note that v8.19.4 and v9.2.1 both have access to AWS SigV4 signing functions which offer env, shared and static credentials. |
In another discussion #10784 (comment), there was another feature Is there any preferred method between the two (mito signing functions vs |
|
I completely forgot about that. The discussion here is good for knowing which. If it was your plan to wait for that, that's fine. |
Proposed commit message
Checklist
changelog.ymlfile.How to test this PR locally
Script tests run sucessfully
Related issues
Screenshots