[aws/config]: Skip service-linked rules and tolerate per-rule errors - #19803
Conversation
The AWS Config data stream listed every Config rule and then called GetComplianceDetailsByConfigRule for each one. AWS owns service-linked rules and blocks that call for them with an AccessDeniedException, which aborted the whole collection cycle and degraded the input so no rules were ingested. Filter out service-linked rules in the DescribeConfigRules response by dropping any rule with a populated CreatedBy field, which AWS sets only for service-linked rules, so the blocked call is never attempted. As a defence-in-depth measure, treat a per-rule GetComplianceDetailsByConfigRule failure as non-fatal: emit the error as an advancing event and continue with the remaining rules instead of stopping the cycle. Thread the resource url through every output state branch so the program stays self-contained across evaluations. Add a service-linked rule and a matching AccessDeniedException fixture to the system-test mock to confirm the rule is filtered and never queried, and bump the package to 6.20.2.
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
✅ Elastic Docs Style Checker (Vale)No 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. |
|
✅ All changelog entries have the correct PR link. |
|
👀 I have started reviewing the PR |
Vera Review BotFor the current commit state, I did not find any issues. 🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills
|
| // ("An AWS service owns ServiceLinkedConfigRule"). They are identified by a | ||
| // populated CreatedBy field, which AWS sets only for service-linked rules. |
There was a problem hiding this comment.
They are identified by a
// populated CreatedBy field, which AWS sets only for service-linked rules.
It would be nice to add a documentation link to confirm this. Not a blocker though.
There was a problem hiding this comment.
Will add it as a follow-up PR as doing it here would trigger another 2.5 hr wait for the aws tests.
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
cc @ShourieG |
|
Tick the box to add this pull request to the merge queue (same as
|
|
Package aws - 6.20.2 containing this change is available at https://epr.elastic.co/package/aws/6.20.2/ |
Type of change
Proposed commit message
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots