Repository navigation
Add shared library packages for IMDS-based task credential retrieval - #4937
Merged
Merged
Conversation
Add shared library packages for IMDS-based task credential retrieval: - ecs-agent/capability/: shared capability definitions, starting with IMDSIAMRoles capability constant - ecs-agent/credentials/imds/: Scanner interface for retrieving task credentials from IMDS iam-ecs-* namespaces, with types for namespace info and credential parsing. Implementation is stubbed for now.
ShelbyZ
approved these changes
Apr 21, 2026
Contributor
Author
|
Windows 2025 integ test failure is not related to this PR, and is being looked at separately. |
prateekchaudhry
approved these changes
Apr 21, 2026
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
Add shared library packages for IMDS-based task credential retrieval.
Implementation details
Two new packages in the ecs-agent/ shared library:
ecs-agent/capability/: A new package for shared capability definitions across agents. Starts with the IMDSIAMRoles capability constant (ecs.capability.imds-iam-roles), which agents advertise to indicate support for retrieving task credentials via IMDS.
ecs-agent/credentials/imds/: Scanner interface and types for retrieving task credentials from IMDS iam-ecs-* namespaces. The Scanner interface defines a Scan method that takes a set of running task IDs and returns credentials only for those tasks. The implementation is stubbed — full scanning logic will be added in a follow-up PR. Types include NamespaceInfo and TaskCredentialInfo for parsing IMDS namespace info files, and TaskCredential as the scanner's return type.
Testing
go build ./capability/ ./credentials/imds/ passes. No tests yet — will be added alongside the scanner implementation.
New tests cover the changes: no
Description for the changelog
Feature - Add IMDS credential scanner interface and capability constant for IMDS-based task credential retrieval
Additional Information
Does this PR include breaking model changes? If so, Have you added transformation functions?
No.
Does this PR include the addition of new environment variables in the README?
No.
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.