Skip to content

Add IMDS integration - #165

Draft
gargipanatula wants to merge 8 commits into
aws:mainfrom
gargipanatula:imds-integration
Draft

gargipanatula wants to merge 8 commits into
aws:mainfrom
gargipanatula:imds-integration

Conversation

@gargipanatula

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

Adds support to fetch IMDS credentials.

  • Introduces a chained retriever and imds delegate. The standard eksauth delegate is replaced by the chained retriever, which will call (in order), IMDS and the eksauth when fetching credentials
    • The chained retriever will choose the topmost credential. So, if IMDS has a credential, it'll use that. If IMDS has an expired or missing credential, it will fall back to Auth Service.
  • Nothing about the behavior of auth credentials is changed
  • For IMDS creds, there are a few differences in how they're handled:
    • They are never evicted on expiry
    • They are refreshed every 30 minutes
    • They're evicted when the credential is no longer in IMDS
  • A feature flag to gate the integration - when off, the agent only picks credentials from eksauth

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Make the cache source-aware: apply different refresh, eviction, and
validity rules based on credential source (IMDS vs Auth Service).

IMDS credentials are always valid (static-stability), refresh every
30 min, and are never evicted. Auth Service credentials use the
existing expiry-based policy.

On failed renewal, IMDS entries are kept with NoExpiration; Auth
Service entries are not re-cached if expired.
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.

1 participant