Skip to content

Add shared library packages for IMDS-based task credential retrieval - #4937

Merged
singholt merged 1 commit into
aws:devfrom
singholt:dev
Apr 21, 2026
Merged

singholt merged 1 commit into
aws:devfrom
singholt:dev

Conversation

@singholt

@singholt singholt commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

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.

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.
@singholt
singholt changed the base branch from master to dev April 21, 2026 18:15
@singholt
singholt marked this pull request as ready for review April 21, 2026 18:19
@singholt
singholt requested a review from a team as a code owner April 21, 2026 18:19
@singholt

Copy link
Copy Markdown
Contributor Author

Windows 2025 integ test failure is not related to this PR, and is being looked at separately.

@singholt
singholt enabled auto-merge (rebase) April 21, 2026 21:50
@singholt
singholt merged commit 0512f08 into aws:dev Apr 21, 2026
43 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants