Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(serve): Add configurable TTL to serve responses #79

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

micahhausler
Copy link
Member

Issue #, if available:
N/A

Description of changes:

For containerized environments, a TTL of 1 will prevent processes in other network namespaces from being able to reach the host level metadata. This matches EC2's IMDSv2 behavior for credential responses. The default value of 64 leaves existing behavior unchanged

Copy link
Contributor

@13ajay 13ajay left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution - it looks good to me!

cmd/serve.go Outdated Show resolved Hide resolved
@13ajay
Copy link
Contributor

13ajay commented Aug 17, 2024

Ah, it also occurs to me that brief documentation on this flag would be good to add in the README. If you have time to make these changes, feel free to add it in yourself. Otherwise, I can make the changes later.

For containerized environments, a TTL of 1 will prevent processes in
other network namespaces from being able to reach the host level
metadata. This matches EC2's IMDSv2 behavior for credential responses.

Signed-off-by: Micah Hausler <mhausler@amazon.com>
@micahhausler
Copy link
Member Author

Ah, it also occurs to me that brief documentation on this flag would be good to add in the README. If you have time to make these changes, feel free to add it in yourself. Otherwise, I can make the changes later.

Done!

@13ajay 13ajay merged commit a182ff0 into aws:main Aug 19, 2024
1 check passed
@13ajay
Copy link
Contributor

13ajay commented Aug 19, 2024

Thanks for your contribution - merged!

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.

2 participants