Skip to content

Google cloud logging streaming strategy

What does this MR do and why?

Google cloud logging streaming strategy

This commit adds streaming strategy to allow streaming of audit events to google cloud logging service

EE: true Changelog: added

How to set up and validate locally

  1. Setup a project on google cloud and setup IAM service account with logging write access.
  2. Using the google IAM service account config, Create a Google Cloud Logging Configuration using the below mutation
mutation createGoogleCloudLoggingConfiguration {
  googleCloudLoggingConfigurationCreate(
    input: {
      groupPath: "GROUP_PATH", 
      googleProjectIdName: "GOOGLE_PROJECT_ID_NAME", 
      clientEmail: "CLIENT_EMAIL", 
      privateKey: "PRIVATE_KEY"}
  ) {
    googleCloudLoggingConfiguration {
      id
      googleProjectIdName
      logIdName
      privateKey
      clientEmail
    },
    errors,
  }
}
  1. Do some action inside the group which produces audit event, for example: change merge request approval settings.
  2. Audit Event should be streamed and visible inside https://console.cloud.google.com/logs/query

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #409423 (closed)

Edited by Harsimar Sandhu

Merge request reports