Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1676

Merged
Created Nov 03, 2024 by Jérome Perrin@jeromeOwner

Gitlab: use frontends' authenticate-to-backend and rate limit archive downloads

  • Overview 5
  • Commits 4
  • Pipelines 5
  • Changes 8

Instead of using a list of frontends IP addresses to determine if the backend can trust the frontend's X-Forwarded-For header, use the same authenticate-to-backend approach as with ERP5: the frontend connects to the backend with a client certificate and if the backend can verify this certificate, it trusts X-Forwarded-For from the frontend and uses this as client IP. Otherwise, without a verified certificate, the frontend's own IP address is uses as client IP.

This means that:

  • frontend shared instances must use authenticate-to-backend in parameters
  • gitlab instance must use frontend-caucase-url-list in parameters
  • gitlab instance no longer use nginx_real_ip_trusted_addresses in parameters

This branch also contains some mitigation for 503 errors we observed when too many clients were downloading archives (we had several hundreds of ongoing requests preparing archives), the approach is simply to rate-limit the download archives, implemented in nginx because gitlab does not expose rack-attack configuration for this.

Edited Nov 08, 2024 by Jérome Perrin
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feat/gitlab-authenticate-to-backend
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7