BigW Consortium Gitlab
Do not regenerate the `lfs_token` every time `git-lfs-authenticate` is called ## What does this MR do? Do not regenerate the `lfs_token` every time `git-lfs-authenticate` is called, instead return the saved token if one is present. This was causing a lot of 401s, leading to 403s, as state in #22527 As it turns out, when pushing a lot of LFS objects, the LFS client was calling `git-lfs-authenticate` in the middle of the request again. This caused the `lfs_token` to be regenerated. The problem lies in that the LFS client was not aware of this change, and was still using the old token. This caused all subsequent requests to fail with a 401 error. Since HTTP Auth is protected by Rack Attack, this 401s where immediately flagged and resulted in the IP of the user being banned. With this change, GitLab returns the value stored in Redis, if one is present, thus if the LFS client calls `git-lfs-authenticate` again during the request, the auth header will remain unchanged, allowing all subsequent requests to continue without issues. ## What are the relevant issue numbers? Fixes #22527 cc @SeanPackham @jacobvosmaer-gitlab See merge request !6551
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
backend | Loading commit data... | |
badge | Loading commit data... | |
bitbucket_import | Loading commit data... | |
checks | Loading commit data... | |
ci | Loading commit data... | |
conflict | Loading commit data... | |
data_builder | Loading commit data... | |
database | Loading commit data... | |
diff | Loading commit data... | |
downtime_check | Loading commit data... | |
Loading commit data... | ||
fogbugz_import | Loading commit data... | |
gfm | Loading commit data... | |
git | Loading commit data... | |
github_import | Loading commit data... | |
gitlab_import | Loading commit data... | |
google_code_import | Loading commit data... | |
graphs | Loading commit data... | |
import_export | Loading commit data... | |
ldap | Loading commit data... | |
metrics | Loading commit data... | |
middleware | Loading commit data... | |
o_auth | Loading commit data... | |
saml | Loading commit data... | |
sanitizers | Loading commit data... | |
sherlock | Loading commit data... | |
slash_commands | Loading commit data... | |
sql | Loading commit data... | |
template | Loading commit data... | |
asciidoc_spec.rb | Loading commit data... | |
auth_spec.rb | Loading commit data... | |
award_emoji_spec.rb | Loading commit data... | |
blame_spec.rb | Loading commit data... | |
changes_list_spec.rb | Loading commit data... | |
closing_issue_extractor_spec.rb | Loading commit data... | |
color_schemes_spec.rb | Loading commit data... | |
current_settings_spec.rb | Loading commit data... | |
database_spec.rb | Loading commit data... | |
downtime_check_spec.rb | Loading commit data... | |
exclusive_lease_spec.rb | Loading commit data... | |
git_access_spec.rb | Loading commit data... | |
git_access_wiki_spec.rb | Loading commit data... | |
git_spec.rb | Loading commit data... | |
highlight_spec.rb | Loading commit data... | |
incoming_email_spec.rb | Loading commit data... | |
key_fingerprint_spec.rb | Loading commit data... | |
lazy_spec.rb | Loading commit data... | |
lfs_token_spec.rb | Loading commit data... | |
markup_helper_spec.rb | Loading commit data... | |
metrics_spec.rb | Loading commit data... | |
popen_spec.rb | Loading commit data... | |
project_search_results_spec.rb | Loading commit data... | |
redis_spec.rb | Loading commit data... | |
reference_extractor_spec.rb | Loading commit data... | |
regex_spec.rb | Loading commit data... | |
search_results_spec.rb | Loading commit data... | |
snippet_search_results_spec.rb | Loading commit data... | |
themes_spec.rb | Loading commit data... | |
upgrader_spec.rb | Loading commit data... | |
uploads_transfer_spec.rb | Loading commit data... | |
url_builder_spec.rb | Loading commit data... | |
url_sanitizer_spec.rb | Loading commit data... | |
user_access_spec.rb | Loading commit data... | |
version_info_spec.rb | Loading commit data... | |
workhorse_spec.rb | Loading commit data... |