[aws] Enable Identity Federation for the Config data stream - #20437
Draft
seanrathier wants to merge 3 commits into
Draft
[aws] Enable Identity Federation for the Config data stream#20437seanrathier wants to merge 3 commits into
seanrathier wants to merge 3 commits into
Conversation
Migrate the Config CEL program from hand-rolled SigV4 signing to the input's auth.aws configuration. The program previously derived signing keys and built canonical requests inline, with access keys passed through CEL state — which limited the stream to static access keys (the credential-validation gate rejected Role ARN and every other method). With auth.aws the input signs requests transparently, so the program keeps only its real logic: rule pagination, service-linked rule filtering, per-rule compliance collection with non-fatal errors. - Add the full auth.aws block including the use_cloud_connectors hook driven by supports_identity_federation - Drop credentials from CEL state and the redact list - Remove the hide_in_var_group_options gate from the config policy template, making Identity Federation selectable on the agentless path - Bonus: Role ARN, shared credentials, and IAM profiles now work for Config, which the hand-rolled signing never supported Part of elastic/ingest-dev#8802. Permissions for the static fallback template are mirrored in the paired cloudbeat PR from the patch sets in elastic#20240. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3 tasks
Contributor
✅ 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. |
seanrathier
added a commit
to elastic/cloudbeat
that referenced
this pull request
Jul 31, 2026
Mirror the AWS Config permission set from the patch files in elastic/integrations#20240 into the incremental Federated Identity template: config:DescribeConfigRules and config:GetComplianceDetailsByConfigRule, the two operations the Config data stream's CEL program calls (elastic/integrations#20437). config:DescribeComplianceByConfigRule from the #20240 patch set is deliberately omitted — the program never calls it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 tasks
The old test asserted the CEL program's pre-request credential gate
('access_key_id and secret_access_key' required), which this branch
deliberately removed: with auth.aws, keyless configurations are valid
(Role ARN, shared credentials, instance profiles, cloud connectors),
so the program cannot know at evaluation time whether credentials
exist.
The renamed test (unauthenticated_error) asserts the new contract
observed in CI build 46979: the unauthenticated request fails at the
AWS API and the program emits its DescribeConfigRules error wrapper as
an error event, with no data events produced. The assertion matches
the program's stable message prefix rather than the environment-
dependent AWS exception text.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
✅ All changelog entries have the correct PR link. |
💚 Build Succeeded
History
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Background
Part of https://github.com/elastic/ingest-dev/issues/8802 — first of the per-stream PRs extending the GuardDuty federation pattern to the remaining agentless-eligible
awsstreams. Split per stream to keep review and e2e validation scoped.What changed
auth.awsthe input signs requests transparently; the program keeps only its real logic (rule pagination, service-linked rule filtering, per-rule compliance collection with non-fatal errors).auth.awsblock added including theuse_cloud_connectorshook driven bysupports_identity_federation— same pattern as the GuardDuty HTTPJSON stream from [aws] Add var_groups for credential type selection with Identity Federation #19828.hide_in_var_group_optionsdropped from theconfigpolicy template'scelinput.format_versionchange (stays 3.6.1); noprovider_permissions— the static fallback template's permissions are mirrored from the patch sets in [WIP] Support dynamic IaC for integrations #20240 via the paired cloudbeat PR.IAM permissions (for the paired cloudbeat PR)
The program calls exactly two operations, each mapping 1:1 to its IAM action:
StarlingDoveService.DescribeConfigRulesconfig:DescribeConfigRulesStarlingDoveService.GetComplianceDetailsByConfigRuleconfig:GetComplianceDetailsByConfigRuleNote: #20240's config patch also lists
config:DescribeComplianceByConfigRule— the program does not call it, so the CFT mirror omits it (least privilege).Testing
elastic-package lint/buildpassauth.awspath — static-key SigV4 signs offline, no STS involvedE2E test plan
The critical thing this run proves: the input's
auth.awssigner correctly signs the program'sdo_requestcalls with customX-Amz-Targetheaders against real AWS — the system-test mock does not verify signatures.1. AWS-side prerequisites (test account):
s3-bucket-versioning-enabled). Service-linked rules don't count — the program filters them out by their populatedCreatedByfield.2. Generate evaluations (findings don't exist until a rule evaluates):
3. Latency: on-demand evaluation completes in minutes; periodic rules can take up to 24h — always use the on-demand trigger before concluding failure.
4. Onboard in Kibana (agentless + Identity Federation):
logs-aws.config-<namespace>; each evaluation result should carryConfigRuleInfomerged in (populatedaws.configfields, compliance type present)5. Failure probes:
DescribeConfigRules: POST … 403andAccessDeniedExceptionin the message — means the deployed role is missing an action (check the paired cloudbeat PR's policy)retryplaceholder events are dropped by the processor) — usually means no non-service-linked rules exist or no evaluations have run yet (see step 2)Also validate the legacy paths still work (this PR touches shared request code): a default-mode (agent-based) policy with static access keys, and one with Role ARN — the latter never worked before this PR, so it doubles as a feature check.
Checklist
changelog.ymlfile.🤖 Generated with Claude Code