Skip to content

Add GitLab credential headers to the default cache key - #906

Merged
GrahamCampbell merged 1 commit into
12.1from
gitlab-cache-key-credential-headers
Nov 17, 2026
Merged

GrahamCampbell merged 1 commit into
12.1from
gitlab-cache-key-credential-headers

Conversation

@GrahamCampbell

Copy link
Copy Markdown
Member

The default cache key generator distinguished responses by Authorization, Cookie, Accept and Content-type, but not by the headers this client sends credentials in, so with a shared cache pool a response cached for one personal access token, job token or sudo user could be served to another. That needs a server response that grants freshness or revalidates with an ETag that does not depend on the caller. This adds PRIVATE-TOKEN, JOB-TOKEN and SUDO to the default list, which changes the keys of existing entries once, so they are fetched again after the upgrade.

@GrahamCampbell
GrahamCampbell force-pushed the gitlab-cache-key-credential-headers branch from fe97f36 to 4a6e804 Compare November 17, 2026 23:07
@GrahamCampbell
GrahamCampbell marked this pull request as ready for review November 17, 2026 23:08
@GrahamCampbell
GrahamCampbell merged commit 21889bb into 12.1 Nov 17, 2026
16 checks passed
@GrahamCampbell
GrahamCampbell deleted the gitlab-cache-key-credential-headers branch November 17, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant