Add key and client IP claims to the Cells Shell JWT

What does this MR do and why?

Problem

Cells routing re-authorizes Git requests using the Shell JWT's user ID and the Cell's observed client IP. This misidentifies deploy-key access and uses the gitlab-shell egress IP instead of the SSH client's IP.

Solution

  • Add gl_key_id, gl_key_type and check_ip to the signed Shell JWT.
  • Populate the claims from the /allowed response and SSH client address.

References

Rollout

client.SignShellJWT is exported and its signature changes. Deploy this and the GitLab Rails change that consumes these claims before re-enabling Cells routing; Rails behavior is unchanged until that change is deployed.

Merge request reports

Loading
Loading