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

authprovider: Add support for expiring auth cache #5684

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

cpuguy83
Copy link
Member

This exposes a mechanism to expire cached auth configs.

}
ap.authConfigCache[host] = &ac
entry, exists := ap.authConfigCache[host]
if exists && !ap.expireAc(entry.Created, host) {
Copy link
Member

Choose a reason for hiding this comment

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

I think some sane expiration defaults in here would be ok. Eg. 10min?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated to use 10min default.

This exposes a mechanism to expire cached auth configs.

Signed-off-by: Brian Goff <[email protected]>
@cpuguy83
Copy link
Member Author

I'm testing these changes with a private repo to see how this does.

@cpuguy83
Copy link
Member Author

That'll take like 7-9 hours to actually finish.

@tonistiigi tonistiigi merged commit 1ce4e1d into moby:master Jan 28, 2025
98 checks passed
@cpuguy83 cpuguy83 deleted the docker_auth_expire branch January 28, 2025 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants