Skip to content

Support IAP protected prometheus installations

Adrien Kohlbecker requested to merge ak/update-google-auth into master

What does this MR do?

Issue: #216859 (closed)

Adds two new fields to the Prometheus integration configuration, to support querying Prometheus installations behind Google's Identity Aware Proxy. This is the set-up we use internally at Gitlab for https://prometheus-dogfood.ops.gitlab.net/

Documentation on how to authenticate to IAP when doing server-to-server requests is here https://cloud.google.com/iap/docs/authentication-howto#authenticating_from_a_service_account.

This requires an update to the googleauth gem, as this functionality was implemented only recently: https://github.com/googleapis/google-auth-library-ruby/pull/258. In turn, faraday, signet and google-api-client need to be updated to solve the new gem requirements. Relevant changelogs:

Removes some initialiser monkey patch added because we couldn't upgrade google-api-client (added here gitlab-foss!31790 (comment 213220987)).

Had to load some error constants explicitely, I wonder if I'm missing something to set-up the gems properly 🤔

The new code is behind a feature flag: prometheus_service_iap_auth

Screenshots

(This only shows part of the private key I used for testing so it is fine for sharing)

Screenshot_2020-06-01_at_14.56.57

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports