Loading
Create a service ping endpoint to read its settings configuration
What does this MR do and why?
This MR adds a new internal API endpoint for Service Ping that allows external services (such as the Service Ping exporter) to retrieve the instance identity and Service Ping settings configuration.
Key changes:
-
New internal API endpoint (
GET /api/v4/internal/service_ping/instance) that returns:- Instance identity (instance ID, unique instance ID, hostname, version)
- Service Ping settings (enabled status, generation enabled, optional metrics enabled)
-
JWT-based authentication via
ServicePing::InternalApiAuthenticator:- Uses a shared secret stored in
.gitlab_service_ping_secret - Validates JWT tokens with issuer, audience, subject, and issued-at claims
- Secret file is auto-generated at startup if missing
- Uses a shared secret stored in
-
Instance identity service (
ServicePing::InstanceIdentity):- FOSS: Returns instance UUID from
Gitlab::GlobalAnonymousId - EE: Returns Cloud Connector instance UID when available (for self-managed instances)
- FOSS: Returns instance UUID from
References
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Nwanna Isong