Add per-user SigNoz auth via backend-for-frontend broker
What does this MR do?
Third MR in the observability BFF session broker split (database → settings/config → backend → frontend). Targets !249287 (merged) (settings/config), which in turn targets !249286 (merged) (database).
Adds the observability_per_user_bff_auth SG:learned:4486edad9404 feature flag and the backend session broker it gates:
Observability::O11yBffSession, which mints a per-user Doorkeeper access token, signs the user's role and instance into a GitLab BFFid_token(withjti+ short TTL for replay protection), and POSTs it to the SigNoz BFF session-exchange endpoint over mTLS using theSettings.observability.bff_mtlsclient cert (added in !249287 (merged)).Observability::SessionActionsandObservability::ShowActionsconcerns shared between the group- and project-scoped observability controllers, extracted to remove duplication between them.- New
sessions#createendpoints (group and project scoped) that callO11yBffSessionand return the resulting tokens as JSON, rate-limited per-user via a newobservability_bff_sessionrate limit rule. - The
session_endpointlocal threaded through the shared iframe partial so the frontend (follow-up MR) can call the new endpoint. - Fixed a personal-namespace authorization gap in
Projects::Observability::SessionsController(see review discussion) so the endpoint works consistently with the main iframe controller.
References
- gitlab-org/embody-team/experimental-observability/documentation#101
- gitlab-org/embody-team/experimental-observability/documentation#163 — local dev setup guide for this feature
- Depends on !249287 (merged) and !249286 (merged)
Security considerations
This MR handles mTLS client certs, mints Doorkeeper access tokens, and signs custom JWT claims (role, instance, jti) into a BFF id_token used for auth. Requesting AppSec review.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Dakota Dux