Skip to content

authprovider: Add support for expiring auth cache#5684

Merged
tonistiigi merged 1 commit intomoby:masterfrom
cpuguy83:docker_auth_expire
Jan 28, 2025
Merged

authprovider: Add support for expiring auth cache#5684
tonistiigi merged 1 commit intomoby:masterfrom
cpuguy83:docker_auth_expire

Conversation

@cpuguy83
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 <cpuguy83@gmail.com>
@cpuguy83
Copy link
Copy Markdown
Member Author

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

@cpuguy83
Copy link
Copy Markdown
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