Skip to content

Cookie authentication: first request fails, requires restart when cookies expire #314

@connelldave

Description

@connelldave

Cookie authentication: first request fails, requires restart when cookies expire

Problem

When using GITLAB_AUTH_COOKIE_PATH with an auth proxy:

  1. First request fails - Auth proxies redirect and set cookies on the first request. The MCP server's first real request fails because the session isn't established yet.

  2. Server restart required when cookies expire - Cookies are loaded once at startup. If an external process refreshes expired cookies (e.g., every 2 hours), the MCP server keeps using stale cookies until restarted.

Expected behavior

  • First request should succeed (after automatic session warmup)
  • Cookie file changes should be detected and reloaded automatically

Environment

  • Using GITLAB_AUTH_COOKIE_PATH with cookie-based proxy authentication
  • Cookies managed by external process that refreshes them periodically

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions