[aws] Declare required permissions with provider_permissions#19405
[aws] Declare required permissions with provider_permissions#19405jeniawhite wants to merge 3 commits into
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. |
TL;DRTwo separate failures are blocking this Buildkite run: a wrong PR link in Remediation
Investigation detailsRoot Cause
Evidence
Verification
Follow-up
What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
✅ All changelog entries have the correct PR link. |
💔 Build Failed
Failed CI StepsHistory
|
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Proposed commit message
Adopt the new
provider_permissionsfield (package-spec,format_version3.6.4) so the AWS integration declares the IAM permissions it actually needs in a machine-readable way, instead of leaving them in prose docs and expecting users to attach a broad managed policy (e.g.SecurityAudit/ReadOnlyAccess).format_version3.4.0 → 3.6.4 and packageversion6.19.2 → 6.20.0; add achangelog.ymlentry.sts:GetCallerIdentityonly; the single call every credentialed AWS collector makes.aws/metrics→ec2:DescribeRegions,cloudwatch:ListMetrics,cloudwatch:GetMetricData,tag:GetResources;aws-s3→s3:GetObject/s3:ListBucket+ SQS notification actions;aws-cloudwatch→logs:DescribeLogGroups/logs:FilterLogEvents;cel/httpjson→ the AWS Config / Inspector / GuardDuty API read calls.ec2:DescribeInstancesonec2_metrics,rds:Describe*onrds, and the disjoint Security HubGetFindingsvsGetInsights/ListInsights/GetInsightResultsreads).Permission requirements currently exist only in documentation, so they drift over time and cannot be consumed by tooling. Declaring them with
provider_permissionsversions them alongside the package and lets tooling generate appropriately scoped infrastructure-as-code rather than a static kitchen-sink policy.The placement follows the spec's accumulate-and-deduplicate semantics together with least privilege: each permission is declared exactly once, at the broadest layer whose scope matches everything that needs it. This keeps minimal grants when only some data streams are enabled. Concretely:
cloudwatch:*(those live on theaws/metricsinput);httpjsoninput rather than theguarddutydata stream;No data streams, ingest pipelines, dashboards, or collection behavior change; this is metadata only.
Checklist
changelog.ymlfile.Author's Checklist
provider_permissionsare placed at the correct layer (package / input / data_stream) with no cross-layer duplication.How to test this PR locally
Related issues
Screenshots