Skip to content
Snippets Groups Projects

Added audit events for update and destroy destinations

Merged Hitesh Raghuvanshi requested to merge 404730-audit-events-instance-dest into master
All threads resolved!

What does this MR do and why?

Adding audit events for updation and deletion of instance level external audit event destinations.

How to set up and validate locally

  1. Login as instance administrator on gitlab instance, http://gitlab.localdev:3000 .
  2. Open http://gitlab.localdev:3000/admin/audit_logs?tab=log in one browser tab.
  3. Open http://gitlab.localdev:3000/admin/audit_logs?tab=streams in another browser tab and add a new streaming destination.
  4. Open http://gitlab.localdev:3000/-/graphql-explorer for running graphql queries as update is not available on UI currently.
  5. Run following query in graphql explorer for listing down all the destinations and note down the gid of the destination you want to update:
query {
  instanceExternalAuditEventDestinations {
    nodes {
      id
      destinationUrl
      verificationToken      
      headers {
        nodes {
          id
          key
          value
        }
      }
    }
  }
}
  1. Run following mutation to update the destination, replace the gid with one obtained in step 5
mutation {
  instanceExternalAuditEventDestinationUpdate(input: { 
    id: "gid://gitlab/AuditEvents::InstanceExternalAuditEventDestination/<id>",
    destinationUrl: "https://www.newexample.com"
  }) {
    errors
    instanceExternalAuditEventDestination {
      destinationUrl
      id
      verificationToken
    }
  }
}
  1. In http://gitlab.localdev:3000/admin/audit_logs?tab=log, there will be a new audit event related to this update. Please note you might need to refresh the page once.
  2. Now visit http://gitlab.localdev:3000/admin/audit_logs?tab=streams and delete the destination.
  3. In http://gitlab.localdev:3000/admin/audit_logs?tab=log, there will be a new audit event related to destination being deleted. Please note you might need to refresh the page once.

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 #404730 (closed)

Edited by Hitesh Raghuvanshi

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Aakriti Gupta
  • Aakriti Gupta removed review request for @aakriti.gupta

    removed review request for @aakriti.gupta

  • Jay Montal approved this merge request

    approved this merge request

  • Jay Montal removed review request for @jmontal

    removed review request for @jmontal

  • :wave: @jmontal, thanks for approving this merge request.

    This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.

    For more info, please refer to the following links:

  • added 2 commits

    Compare with previous version

  • Hitesh Raghuvanshi added 545 commits

    added 545 commits

    Compare with previous version

  • added 1 commit

    • 642bb9b7 - Adding readability suggestions

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • requested review from @aakriti.gupta

  • Aakriti Gupta approved this merge request

    approved this merge request

  • Aakriti Gupta requested review from @drew and removed review request for @aakriti.gupta

    requested review from @drew and removed review request for @aakriti.gupta

  • mentioned in issue #418194 (closed)

  • Hitesh Raghuvanshi added 449 commits

    added 449 commits

    Compare with previous version

  • Hitesh Raghuvanshi
  • added 1 commit

    Compare with previous version

  • drew stachon
  • drew stachon
  • Hitesh Raghuvanshi added 254 commits

    added 254 commits

    Compare with previous version

  • @drew I have replied to your comments, please check. Also, if possible if we can do this today, maybe this can be a part of 16.2 release.

    Edited by Hitesh Raghuvanshi
  • Hitesh Raghuvanshi changed the description

    changed the description

  • Hitesh Raghuvanshi added 29 commits

    added 29 commits

    Compare with previous version

  • drew stachon resolved all threads

    resolved all threads

  • drew stachon approved this merge request

    approved this merge request

  • drew stachon requested review from @jmontal

    requested review from @jmontal

  • Jay Montal approved this merge request

    approved this merge request

  • Jay Montal removed review request for @jmontal

    removed review request for @jmontal

  • drew stachon resolved all threads

    resolved all threads

  • drew stachon enabled an automatic merge when the pipeline for 36329eac succeeds

    enabled an automatic merge when the pipeline for 36329eac succeeds

  • merged

  • drew stachon mentioned in commit 61274109

    mentioned in commit 61274109

  • Verified on staging-ref

    image

  • Please register or sign in to reply
    Loading