Skip to content

[Cloud-Security] Adding var-groups to support authentication vars - related to cloud connector feature#16985

Closed
seanrathier wants to merge 0 commit intoelastic:mainfrom
seanrathier:var_groups
Closed

[Cloud-Security] Adding var-groups to support authentication vars - related to cloud connector feature#16985
seanrathier wants to merge 0 commit intoelastic:mainfrom
seanrathier:var_groups

Conversation

@seanrathier
Copy link
Copy Markdown
Contributor

@seanrathier seanrathier commented Jan 16, 2026

Summary

Adds var_groups configuration to the AWS integration package to enable a credential type selector in Fleet UI, improving the user experience when configuring AWS authentication methods.

Related PRs

Changes

  • Added var_groups section to package manifest with credential_type group containing:

    • Direct Access Keys (access_key_id, secret_access_key)
    • Temporary Access Keys (access_key_id, secret_access_key, session_token)
    • Cloud Connector (role_arn, external_id) - for agentless deployments
    • Assume Role (role_arn)
    • Assume Role with External ID (role_arn, external_id)
    • Shared Credentials (shared_credential_file, credential_profile_name)
  • Added hide_in_var_group_options to GuardDuty aws-s3 input to hide Cloud Connector option (not supported for S3 input)

  • Updated credential variables (role_arn, external_id, shared_credential_file, credential_profile_name) to show_user: true so that users can see the vars in var group options

Screenshots

Screen.Recording.2026-01-23.at.10.06.07.AM.mov
Screenshot 2026-01-16 at 11 08 15 AM

Related Issues

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • [ ]

How to test this PR locally

@seanrathier seanrathier added Team:Integrations Label for the Integrations team Team:Fleet Fleet team [elastic/fleet] Team:Cloud Security Cloud Security team [elastic/cloud-security-posture] labels Jan 19, 2026
@seanrathier seanrathier self-assigned this Jan 19, 2026
@seanrathier seanrathier requested review from Copilot and removed request for Copilot January 20, 2026 00:59
@seanrathier seanrathier marked this pull request as ready for review January 23, 2026 16:48
@seanrathier seanrathier requested review from a team as code owners January 23, 2026 16:48
@elasticmachine
Copy link
Copy Markdown

Pinging @elastic/integrations (Team:Integrations)

@elasticmachine
Copy link
Copy Markdown

Pinging @elastic/fleet (Team:Fleet)

@andrewkroh andrewkroh added the Team:obs-ds-hosted-services Observability Hosted Services team [elastic/obs-ds-hosted-services] label Jan 23, 2026
Comment thread packages/aws/changelog.yml Outdated
Comment thread packages/aws/changelog.yml Outdated
Comment thread packages/aws/manifest.yml Outdated
Comment thread packages/aws/manifest.yml Outdated
@seanrathier seanrathier requested a review from efd6 January 26, 2026 20:29
Comment thread packages/aws/manifest.yml Outdated
vars: [role_arn, external_id]
hide_in_deployment_modes: [default]
provider: aws
iac_template_url: https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cloud-connectors-ACCOUNT_TYPE-9.2.0.yml&param_ElasticResourceId=RESOURCE_ID
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the point of the template to be public ?

User: arn:aws:sts::627286350134:assumed-role/okta-dev/michail.katsoulis@elastic.co is not authorized to perform: s3:ListBucket on resource: "arn:aws:s3:::elastic-cspm-cft" because no resource-based policy allows the s3:ListBucket action

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is public but the Cloud Connector UI need to replace the ACCOUNT_TYPE and RESOURCE_ID in the URL. We will be adding a Cloud Connector Account Type selection in the Cloud Connector UI component to select it.

https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cloud-connectors-organization-account-9.2.0.yml&param_ElasticResourceId=1234567890ABCDE

https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cloud-connectors-single-account-9.2.0.yml&param_ElasticResourceId=1234567890ABCDE

This is what we use in the CSPM and Cloud Asset Discovery Fleet extension to control the template URL.
Screenshot 2026-01-28 at 9 16 05 AM

Comment thread packages/aws/manifest.yml Outdated
title: Collect Amazon GuardDuty logs via AWS S3 or SQS
description: Collecting Amazon GuardDuty logs via AWS S3 or SQS input.
hide_in_var_group_options:
credential_type: [cloud_connectors]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an end goal for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MichaelKatsoulis thanks for the question.

The goal here

We currently have no way to identify group of vars represent, specifically for the use case when we refer to cloud provider credentials. This is why we are adding the var_groups.

hide_in_var_group_options are for inputs in the policy that don't support a var_group selection, in this case Cloud Connectors don't currently support S3 data collection.

This specific input you are referring does not support agentless either and cloud connectors can only work ATM with agentless agent deployments

The end goal

The end goals for all of this is to have credential vars when grouped together be required, allow us to know when are user to use the Cloud Connector feature so we can add some policy effects and the Cloud Connector UI

Screenshot 2026-01-27 at 12 58 54 PM Screenshot 2026-01-27 at 12 58 39 PM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @seanrathier for your detailed reply!

@seanrathier seanrathier requested a review from agithomas January 28, 2026 15:35
@andrewkroh andrewkroh added the Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] label Feb 5, 2026
@elasticmachine
Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@botelastic
Copy link
Copy Markdown

botelastic Bot commented Mar 19, 2026

Hi! We just realized that we haven't looked into this PR in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic Bot added the Stalled label Mar 19, 2026
Copy link
Copy Markdown
Contributor

@agithomas agithomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from obs packages. Kindly address the suggested changelog changes

@seanrathier seanrathier enabled auto-merge (squash) April 1, 2026 16:25
@seanrathier seanrathier removed request for a team and efd6 April 1, 2026 16:27
@seanrathier
Copy link
Copy Markdown
Contributor Author

/test

@seanrathier seanrathier requested a review from efd6 April 1, 2026 19:29
Copy link
Copy Markdown
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure you perform a manual test to validate the existing users on an earlier version of the aws guardduty package and seamlessly upgrade to the new version.

I think the big challenge with this change is going to be figuring out how we continue to support aws package users running Elastic stack 8.19.

Comment thread packages/aws/manifest.yml Outdated
@@ -1,7 +1,7 @@
format_version: 3.4.0
format_version: 3.6.0
Copy link
Copy Markdown
Member

@andrewkroh andrewkroh Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package now declares format_version: 3.6.0 while still allowing ^8.19.4 || ^9.2.1.

Per package-spec support guidance, 8.19 supports format 3.4 and 9.2 supports 3.5; 3.6 is not listed for those versions. (I'm not sure if those docs accurate, maybe 8.19 was updated?)

So some aspect of this is going to have to change.

Copy link
Copy Markdown
Contributor Author

@seanrathier seanrathier Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bumped the version to ^9.3 but I think this needs a wider team discussion.

CC: @Omolola-Akinleye @olegsu

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran a test with 8.19.15-SNAPSHOT, and this new version of the aws package isn't visible on Kibana 8.19 because Kibana queries the elastic package-registry (EPR) with spec.max so it filters this release out.

https://epr.elastic.co/search?package=aws&spec.max=3.4&kibana.version=8.19.15

So even though we tested this version does work on 8.19 via directly upload, it won't work because the Kibana and EPR filter it out.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kpollich I think this is going to be a very common problem that we run into where we want to be able to continue delivering fixes for integrations to users that are on 8.19.x (while it is still officially under support) while also being able to adopt some newer package-spec features.

One solution is to bump the major version and drop support for 8.19 from the AWS package, but then we are signing up for maintaining an aws-6.x branch where we backport changes to the 8.19 users (where those changes are compatible with format_version: 3.4).

Providing maintenance to 8.19 users for all of the packages that want/need to move past format_version 3.4 could be a lot of work, especially since we have to do it for about ~14 months until July 2027.

Maybe you have some other ideas on how to handle this?

Comment thread packages/aws/manifest.yml Outdated
Comment thread packages/aws/manifest.yml
elastic:
subscription: basic
kibana:
version: "^8.19.4 || ^9.2.1"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR switches GuardDuty httpjson auth to auth.aws, but package constraints still allow ^8.19.4 || ^9.2.1. But Beats httpjson only supports auth.aws from 9.3 onward.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I bumped the version to ^9.3 but I think this needs a wider team discussion.

CC: @Omolola-Akinleye @olegsu

Comment thread packages/aws/data_stream/guardduty/agent/stream/httpjson.yml.hbs Outdated
Comment thread packages/aws/data_stream/guardduty/agent/stream/httpjson.yml.hbs
@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @seanrathier

@andrewkroh
Copy link
Copy Markdown
Member

/test stack 8.19.14-SNAPSHOT

@olegsu
Copy link
Copy Markdown
Contributor

olegsu commented Apr 22, 2026

Quick update:
@qcorporation and I discussed the option of merging this before of elastic/package-spec#1148, given that the AWS package is under active maintenance (10 commits since April) and has been receiving multiple updates, the risk of merging now feels too high. To stay on the safe side, we will wait for stack 8.19 to fully work with 3.6 spec
cc @andrewkroh @kpollich @jlind23

Comment thread packages/aws/manifest.yml
@seanrathier seanrathier force-pushed the var_groups branch 2 times, most recently from d963f5d to 2bf8aab Compare April 30, 2026 19:51
Comment thread packages/aws/manifest.yml
@elasticmachine
Copy link
Copy Markdown

elasticmachine commented Apr 30, 2026

💔 Build Failed

Failed CI Steps

History

cc @seanrathier

@seanrathier seanrathier force-pushed the var_groups branch 2 times, most recently from 4e911c2 to 47bc590 Compare May 1, 2026 15:28
@seanrathier seanrathier closed this May 1, 2026
auto-merge was automatically disabled May 1, 2026 15:28

Pull request was closed

@seanrathier
Copy link
Copy Markdown
Contributor Author

Continued in #18762 — this PR could not be reopened (GitHub returned "no new commits on the seanrathier:var_groups branch" for both API and web reopen after the head branch was reset). The new PR uses the same head branch (seanrathier:var_groups) with the work restored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Integration:aws AWS Team:Cloud Security Cloud Security team [elastic/cloud-security-posture] Team:Fleet Fleet team [elastic/fleet] Team:Integrations Label for the Integrations team Team:obs-ds-hosted-services Observability Hosted Services team [elastic/obs-ds-hosted-services] Team:Obs-InfraObs Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants