[8.19](backport #48956) Use combined External ID for AWS cloud connectors AssumeRole#50169
Merged
[8.19](backport #48956) Use combined External ID for AWS cloud connectors AssumeRole#50169
Conversation
This change updates the AWS cloud connectors credential flow in libbeat so that the AssumeRole step uses a combined External ID built from the cloud resource ID and the configured external ID: `CloudConnectorsExternalID(resourceID, externalIDPart)` returns `resourceID-externalIDPart`. This allows the remote (customer) role trust policy to scope access by resource while still using the configured external ID. The credential chain is unchanged: assume the Elastic global role with web identity (OIDC token), then assume the configured role with the new External ID and optional expiry window. Tests are updated to assert the new External ID format and a unit test is added for `CloudConnectorsExternalID`. (cherry picked from commit f909d4f) # Conflicts: # x-pack/libbeat/common/aws/cloud_connectors.go # x-pack/libbeat/common/aws/cloud_connectors_test.go
Contributor
Author
|
Cherry-pick of f909d4f has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
6 tasks
olegsu
approved these changes
Apr 16, 2026
|
More context: #49956 |
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.
Summary
This change updates the AWS cloud connectors credential flow in libbeat so that the AssumeRole step uses a combined External ID built from the cloud resource ID and the configured external ID:
CloudConnectorsExternalID(resourceID, externalIDPart)returnsresourceID-externalIDPart. This allows the remote (customer) role trust policy to scope access by resource while still using the configured external ID. The credential chain is unchanged: assume the Elastic global role with web identity (OIDC token), then assume the configured role with the new External ID and optional expiry window. Tests are updated to assert the new External ID format and a unit test is added forCloudConnectorsExternalID.Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
This is an automatic backport of pull request #48956 done by [Mergify](https://mergify.com).