[aws] Enable Identity Federation for all remaining policy templates - #20527
Open
seanrathier wants to merge 10 commits into
Open
[aws] Enable Identity Federation for all remaining policy templates#20527seanrathier wants to merge 10 commits into
seanrathier wants to merge 10 commits into
Conversation
Migrate the Inspector HTTPJSON template from hand-rolled SigV4 signing to the input's auth.aws configuration. The template previously built the Authorization header in Go template expressions — twice, because the body changes between pagination pages — and never set X-Amz-Security-Token, which silently broke temporary credentials. With auth.aws the input signs every request (including re-signed pagination pages) at the transport layer. - Add the full auth.aws block including the use_cloud_connectors hook driven by supports_identity_federation (same pattern as GuardDuty) - Remove the manual X-Amz-Date and Authorization transforms and the pagination re-signing steps - Remove the hide_in_var_group_options gate from the inspector policy template, making Identity Federation selectable on the agentless path - Fixes session-token auth and adds Role ARN / shared-credential support, none of which the hand-rolled signing handled Part of elastic/ingest-dev#8802. The paired cloudbeat PR mirrors the stream's single API call (inspector2:ListFindings) into the static fallback template. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Removes identity_federation gates from all 22 remaining gated inputs across 15 policy templates. Per-input changes: - securityhub_findings, securityhub_findings_full_posture, securityhub_insights: full auth migration from hand-rolled SigV4 to auth.aws, adding Cloud Connectors support and fixing silent session- token breakage in the hand-rolled path. - cloudwatch_logs, ec2_logs, elb_logs, lambda_logs: add external_id to aws-cloudwatch stream templates. - awshealth, billing, cloudwatch_metrics, dynamodb, ebs, ec2_metrics, ecs_metrics, elb_metrics, lambda, rds, sns, sqs, transitgateway: add external_id to aws/metrics stream templates. - guardduty httpjson: gate removed; auth.aws + use_cloud_connectors already present. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Aug 4, 2026
Restore identity_federation gate for the securityhub policy template and revert securityhub_findings, securityhub_findings_full_posture, and securityhub_insights hbs files to hand-rolled SigV4. SecurityHub will be migrated under elastic/ingest-dev#8812. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
seanrathier
added a commit
to seanrathier/integrations
that referenced
this pull request
Aug 4, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
….0 bump Cherry-picks the Config CEL migration (hand-rolled SigV4 to auth.aws) and its test-expectation update from the closed elastic#20437, which was never actually an ancestor of this branch — config and inspector were parallel branches, so closing elastic#20437 as superseded orphaned the CEL migration while the manifest gate removal still exposed Identity Federation for Config. Collapses the stacked 7.3.0/7.4.0 changelog entries into a single 7.2.0 entry linking this PR, since the combined PR targets main (at 7.1.1). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
seanrathier
added a commit
to seanrathier/integrations
that referenced
this pull request
Aug 4, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…plates Beats already supports use_cloud_connectors for these input types: the flag lives in the shared ConfigAWS struct (x-pack/libbeat/common/aws/ credentials.go, present on the 9.4 branch), which both the aws-cloudwatch input and the metricbeat aws module embed inline and pass through InitializeAWSConfig. No auth.aws block is needed — these inputs take credentials at the top level of the stream config. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
8 tasks
The Identity Federation quick-create link now targets cloudformation-federated-identity-aws-9.4.0.yml, published by cloudbeat's publish_cft.sh when elastic/cloudbeat#7637 merges. Until that publish runs, this URL 404s — cloudbeat#7637 must merge first. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
seanrathier
marked this pull request as ready for review
August 5, 2026 13:17
olegsu
reviewed
Aug 5, 2026
| role_arn: {{role_arn}} | ||
| {{/if}} | ||
| {{#if external_id}} | ||
| external_id: {{external_id}} |
Contributor
There was a problem hiding this comment.
We will not be using external_id with WII
Contributor
Author
There was a problem hiding this comment.
We will change this in a new PR to address WII, unless WII is worked out before this is merged
olegsu
reviewed
Aug 5, 2026
| # newer versions go on top | ||
| - version: "7.2.0" | ||
| changes: | ||
| - description: Enable Identity Federation for Config, Inspector, aws-cloudwatch log streams, and all aws/metrics streams. Migrates Config (CEL) and Inspector (HTTPJSON) from hand-rolled SigV4 signing to the input's auth.aws configuration, adding Cloud Connectors support and fixing silent session-token breakage. Adds external_id and use_cloud_connectors to aws-cloudwatch and aws/metrics stream templates. |
Contributor
There was a problem hiding this comment.
Remove the external_id reference
Contributor
Author
There was a problem hiding this comment.
efd6
reviewed
Aug 5, 2026
…ted_error.txt Co-authored-by: Dan Kortschak <dan.kortschak@elastic.co>
Contributor
|
✅ All changelog entries have the correct PR link. |
Contributor
🚀 Benchmarks reportTo see the full report comment with |
💚 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
Enable Identity Federation across the
awspackage for Config, Inspector, all aws-cloudwatch log streams, and all aws/metrics streams.WHAT:
config(CEL) andinspector(HTTPJSON): full auth migration from hand-rolled SigV4 signing to the input'sauth.awsconfiguration, withuse_cloud_connectorsdriven by thesupports_identity_federationvar. The hand-rolled path never setX-Amz-Security-Token, so session tokens were silently broken;auth.awsfixes that and adds Role ARN / shared-credential support.cloudwatch_logs,ec2_logs,elb_logs,lambda_logs) and 13 aws/metrics streams (awshealth,billing,cloudwatch_metrics,dynamodb,ebs,ec2_metrics,ecs_metrics,elb_metrics,lambda,rds,sns,sqs,transitgateway): add top-levelexternal_idanduse_cloud_connectorsto the stream templates. These input types embed Beats' sharedConfigAWSinline, so credentials sit at the top level of the stream config rather than underauth.aws.hide_in_var_group_options: credential_type: [identity_federation]gates from all affected policy templates (includingguardduty, whose template was already federation-ready).WHY: completes ingest-dev#8802 — every agentless-eligible stream in the
awspackage (except SecurityHub, tracked separately) can onboard via Identity Federation (Cloud Connectors) with zero static credentials.use_cloud_connectorsis supported for all these input types by Beats' sharedConfigAWSlayer (x-pack/libbeat/common/aws/credentials.go, present on the 9.4 branch), whichInitializeAWSConfighandles centrally.Checklist
use_cloud_connectorson the aws-cloudwatch and aws/metrics input types)changelog.ymlfile.Author's Checklist
AccessDeniedException, streamsHEALTHY)cloudformation-federated-identity-aws-9.4.0.ymlto S3 before this PR is tested or merged — the manifest's Identity Federation quick-create link now points at that template and 404s until the publish pipeline runsHow to test this PR locally
For the federated path E2E:
HEALTHY— noAccessDeniedExceptionin agent logscloudwatch_logs) and one aws/metrics stream (e.g.cloudwatch_metrics) collect data via the Cloud Connectors token exchangeRelated issues