Add instance and deployment claims to Knowledge Graph JWT
Summary
- Add
instance_id,unique_instance_id,instance_version,global_user_id,host_name,deployment_type, andrealmclaims to the Knowledge Graph (Orbit) JWT payload - These use the same sources as
CloudConnector.headersalready sent to AI Gateway, ensuring consistency across services - Add specs covering the new claims for regular users, admin users, and stubbed instance values
These claims are consumed in feat(billing): emit Snowplow billing events on ... (gitlab-org/orbit/knowledge-graph!937 - merged).
Motivation
Orbit needs instance context to route and attribute requests correctly. The Rust struct for JWT claims already declares these fields as optional — this change populates them.
Local testing
This can be tested locally following the instruction here.
Related to https://gitlab.com/gitlab-org/gitlab/-/work_items/597475
Related to https://gitlab.com/gitlab-org/gitlab/-/work_items/593192
Edited by Sharmad Nachnolkar