[aws] Enable Identity Federation for aws.securityhub data stream and standalone SecurityHub integration - #20529
Conversation
✅ 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. |
…t-dev#8812) Grants securityhub:GetFindings and securityhub:GetInsights to the ElasticFederatedIdentityRole, covering: - aws/securityhub_findings and aws/securityhub_findings_full_posture (POST /findings) - aws/securityhub_insights (POST /insights/get) - aws_securityhub/finding (POST /findingsv2 — uses securityhub:GetFindings IAM action) Mirrors the provider_permissions declared in: - elastic/integrations#20529 (aws package SecurityHub streams) - elastic/integrations#20436 (aws_securityhub package) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b494235 to
32d7bff
Compare
3c375d4 to
a4df94c
Compare
There was a problem hiding this comment.
Pull request overview
Enables Identity Federation (Cloud Connectors) for the aws package’s SecurityHub CSPM HTTPJSON data streams by migrating away from hand-rolled SigV4 signing to auth.aws, and lifts the policy-template gate that previously hid Identity Federation for SecurityHub. The PR also includes related aws_securityhub package updates (version/constraints, Identity Federation var group, and ingest pipeline tagging/lint compliance).
Changes:
- Migrate
securityhub_findings,securityhub_findings_full_posture, andsecurityhub_insightsHTTPJSON templates toauth.aws(including optionaluse_cloud_connectors) and remove custom SigV4 header transforms. - Remove the SecurityHub policy template’s
hide_in_var_group_optionsgate foridentity_federation, bumpawspackage version to 7.3.0, and add changelog entry. - Update
aws_securityhubpackage for Identity Federation/agentless support (constraints + var_groups), and apply ingest pipeline processor tagging / improvedon_failuremessaging.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/aws/manifest.yml | Bumps package version to 7.3.0 and removes the Identity Federation hide gate for the SecurityHub CSPM policy template. |
| packages/aws/changelog.yml | Adds 7.3.0 changelog entry describing the SecurityHub Identity Federation enablement/migration. |
| packages/aws/data_stream/securityhub_findings/agent/stream/httpjson.yml.hbs | Removes hand-rolled SigV4 transforms and configures auth.aws (incl. session token + optional cloud connectors). |
| packages/aws/data_stream/securityhub_findings_full_posture/agent/stream/httpjson.yml.hbs | Same auth.aws migration for the full-posture findings stream, plus minor formatting cleanup. |
| packages/aws/data_stream/securityhub_insights/agent/stream/httpjson.yml.hbs | Same auth.aws migration for insights stream and removes pagination-time re-signing transforms. |
| packages/aws_securityhub/manifest.yml | Updates constraints/version, adds credential var group with Identity Federation option, removes external_id var, and adds provider permissions info. |
| packages/aws_securityhub/changelog.yml | Adds entries for Identity Federation agentless auth support and ingest pipeline tagging/lint compliance. |
| packages/aws_securityhub/data_stream/finding/agent/stream/cel.yml.hbs | Adds auth.aws.use_cloud_connectors rendering controlled by supports_identity_federation. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/default.yml | Adds processor tags broadly, improves on_failure messages to include _ingest.pipeline, and fixes a mismatched pipeline tag label. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/pipeline_object_actor.yml | Adds tags to processors and updates on_failure message formatting. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/pipeline_object_attack.yml | Adds tags to processors and updates on_failure message formatting. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/pipeline_object_device.yml | Adds tags to processors and updates on_failure message formatting. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/pipeline_object_evidence.yml | Adds tags to processors and updates on_failure message formatting. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/pipeline_object_finding.yml | Adds tags to processors and updates on_failure message formatting. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/pipeline_object_malware.yml | Adds tags to processors and updates on_failure message formatting. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/pipeline_object_metadata.yml | Adds tags to processors and updates on_failure message formatting; also removes stray whitespace in one field line. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/pipeline_object_osint.yml | Adds tags to processors and updates on_failure message formatting. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/pipeline_object_resources.yml | Adds tags to processors and updates on_failure message formatting. |
| packages/aws_securityhub/data_stream/finding/elasticsearch/ingest_pipeline/pipeline_object_vulnerabilities.yml | Adds tags to processors and updates on_failure message formatting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…late Grants the IAM permissions required by the aws/securityhub and aws_securityhub integrations for Federated Identity (Cloud Connectors) deployments. securityhub:GetFindings authorizes both POST /findings and POST /findingsv2 — both SecurityHub API operations share this single IAM action. securityhub:GetInsights authorizes POST /insights/get. Part of elastic/ingest-dev#8812. Paired with elastic/integrations#20529. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25436f8 to
a4df94c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
packages/aws_securityhub/changelog.yml:6
- The 1.3.0 changelog entry links to PR #20436, but this PR description says it supersedes #20436 and the actual changes are landing here. Update the changelog link to point at the PR that introduces the 1.3.0 release notes (this PR) so the changelog doesn’t reference a superseded/closed PR.
- version: "1.3.0"
changes:
- description: Enable Identity Federation (Cloud Connectors) authentication for agentless deployments.
type: enhancement
link: https://github.com/elastic/integrations/pull/20436
🚀 Benchmarks reportTo see the full report comment with |
…0529 The 1.3.0 entry was pointing at the superseded PR. The changelog-link CI check requires the link match the open PR number. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-dev#8812) Migrates securityhub_findings, securityhub_findings_full_posture, and securityhub_insights HTTPJSON templates from hand-rolled SigV4 signing to the input's auth.aws configuration. Removes the identity_federation gate from the securityhub policy template. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nal_id from stream templates
- Add securityhub:GetFindings and securityhub:GetInsights to the SecurityHub
policy template input's provider_permissions declaration
- Remove {{#if external_id}} blocks from securityhub_findings, securityhub_findings_full_posture,
and securityhub_insights hbs templates (external_id was removed from the package in elastic#20527)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.
Suppressed comments (1)
packages/aws/manifest.yml:972
provider_permissionswas added under the SecurityHub input, but the packageformat_versionremains3.6.1. Please confirm the package-spec version used byelastic-packagesupportsprovider_permissionsat 3.6.1; if not, bumpformat_versionaccordingly (and address any newly-triggered validators) so the package continues to validate/build.
provider_permissions:
- provider: aws
description: Security Hub read access for findings and insights collection.
permissions:
- name: securityhub:GetFindings
Add a var_groups credential selector to the aws_securityhub package, offering Identity Federation (Cloud Connectors) on the agentless path while preserving every existing credential method for agent-based deployments. The CloudFormation template is rendered by the IaC Provider at onboard time from the declared provider_permissions; no static template URL is used. - Bump format_version to 3.6.4 (var_groups needs 3.6.0, provider_permissions needs 3.6.4) - Raise Kibana and Agent floors to ^9.4.0 (auth.aws cloud connector support in the CEL input requires Agent 9.4.0+) - Add supports_identity_federation var and the use_cloud_connectors hook in the CEL stream template - Declare provider_permissions on the cel input: the GetFindingsV2 API authorizes via securityhub:GetFindings per the AWS API reference Depends on the pipeline hygiene pre-landing in elastic#20435. Part of elastic/ingest-dev#8812. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Kibana renders the template via the IaC Provider first and falls back to opening this quick-create URL when the render fails (422/502). Same S3 bucket and URL shape as the aws package's existing URL, but pointing at the incremental federated-identity-aws template, version pinned to the package's Kibana floor minor. The fallback only functions once elastic/cloudbeat#7422 merges and publishes the template to S3. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ingest-dev#9116)
- Remove external_id from identity_federation var_group option vars
- Remove assume_role_external_id var_group option entirely
- Remove external_id input var declaration
- Remove {{#if external_id}} block from CEL stream template
- Update iac_template_url to 9.6.0 and drop stale RESOURCE_ID param
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tors requires 9.6.0+) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
format_version 3.6.4 is required for provider_permissions, which was added to the SecurityHub HTTPJSON input in this PR. The version bump reflects the new 7.4.0 changelog entry (7.3.0 is already taken by the processor-tags PR elastic#20572 that merged to main concurrently). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9881295 to
9cd7972
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
packages/aws/data_stream/securityhub_findings/agent/stream/httpjson.yml.hbs:92
- There are no policy rendering tests covering the new Identity Federation path for this HTTPJSON template (e.g., asserting that
auth.aws.use_cloud_connectorsis rendered whensupports_identity_federation: true). Other AWS HTTPJSON streams (for example GuardDuty) have_dev/test/policyfixtures for this, so adding similar fixtures for the SecurityHub streams would help prevent regressions in signing/auth behavior.
{{#if supports_identity_federation}}
use_cloud_connectors: {{supports_identity_federation}}
{{/if}}
…ll_posture, insights) Add elastic-package test policy fixtures for the three SecurityHub HTTPJSON data streams (securityhub_findings, securityhub_findings_full_posture, securityhub_insights), covering both legacy credentials and agentless Identity Federation (cloud connector) cases. These tests lock in the auth.aws field rendering (including use_cloud_connectors) introduced by this PR, and serve as a regression guard for future template changes. Modelled after the existing guardduty policy test fixtures. Note: .expected files were hand-authored from the templates. If CI shows a diff, run: elastic-package stack up -d && elastic-package test policy --generate Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l on_failure messages
All 11 aws_securityhub ingest pipeline files had their pipeline-level
on_failure error.message missing the required '_ingest.pipeline' reference
(SVR00009). The messages used the multi-line block scalar format:
{{{/_ingest.on_failure_processor_tag}}}failed with message '{{{...}}}'
Fixed to:
{{{/_ingest.on_failure_processor_tag}}}in pipeline '{{{ _ingest.pipeline }}}'
failed with message '{{{...}}}'
The processor-level on_failure blocks were also updated in the same pass:
they used '{{{_ingest.on_failure_pipeline}}}' which was replaced with
'{{{_ingest.pipeline}}}' as required by the linter.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s filtering Credential vars (access_key_id, secret_access_key, session_token, shared_credential_file, credential_profile_name, role_arn, supports_identity_federation, assume_role_duration, assume_role_expiry_window) were at the CEL input level with show_user: true for the first three, placing them outside the reach of package-level var_groups filtering (shouldShowVar only applies to package-level vars). Move all credential vars to the package level with show_user: false so that shouldShowVar correctly hides vars not belonging to the selected credential_type option. proxy_url and ssl remain at the input level as they are connection/transport settings, not credentials. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
✅ All changelog entries have the correct PR link. |
💚 Build Succeeded
History
|
Proposed commit message
Enable Identity Federation (Cloud Connectors) for the SecurityHub data streams in the
awspackage and the standaloneaws_securityhubpackage.awspackage (securityhub_findings,securityhub_findings_full_posture,securityhub_insights)Migrates the three SecurityHub HTTPJSON stream templates from hand-rolled SigV4 signing (X-Amz-Date/Authorization set transforms, including pagination re-sign) to the input's
auth.awsconfiguration withuse_cloud_connectorsdriven bysupports_identity_federation. Removes theidentity_federationgate from the securityhub policy template. Fixes silent session-token breakage — the hand-rolled path never setX-Amz-Security-Token.aws_securityhubstandalone packageAdds
var_groupswith the full credential selector (Identity Federation, Direct Access Keys, Temporary Access Keys, Assume Role, Shared Credentials), bumpsformat_versionto 3.6.4 andkibana/agentfloors to^9.6.0, removesexternal_idper ingest-dev#9116, and fixes pipeline hygiene violations surfaced by the format_version bump.Part of elastic/ingest-dev#8812. Supersedes #20436.
Checklist
changelog.ymlfile.Author's Checklist
awsSecurityHub streams validated via Identity Federation (HEALTHY, noAccessDeniedException)aws_securityhubCEL stream validated via Identity Federationsecurityhub:GetFindings+securityhub:GetInsightsto the federated role)How to test this PR locally
For the federated path E2E:
securityhub:GetFindings+securityhub:GetInsightsto the federated role)awspackage) and validatesecurityhub_findings,securityhub_findings_full_posture, andsecurityhub_insightsall showHEALTHYaws_securityhubintegration and validate the CEL stream showsHEALTHYRelated issues
awspackage federation)