Skip to content
Snippets Groups Projects

Refactored audit events for project creation and updation

Merged Hitesh Raghuvanshi requested to merge 374105-refactor-project-audit-2 into master
2 unresolved threads

What does this MR do and why?

Refactors project services to use Gitlab::Audit::Auditor for creating audit events for project creation and default branch updation.

  • Adds new audit event types under ee/config/audit_events/types.
  • Adds default options for audit context author + target

How to set up and validate locally

  1. Setup external audit event streaming destination for a group by following steps here. Please note the group must have at least Ultimate licence.
  2. All the audit events related to group will be sent to the endpoint added above.
  3. Perform following actions for the projects of the group and check the respective audit events on the remote destination is the event_type is coming for each one or not:
    1. Create a new project.
    2. Change the default branch of a project.

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 #374105 (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
  • added 1 commit

    Compare with previous version

  • Hitesh Raghuvanshi added 146 commits

    added 146 commits

    Compare with previous version

  • Hitesh Raghuvanshi resolved all threads

    resolved all threads

  • added 1 commit

    Compare with previous version

  • added 9 commits

    Compare with previous version

  • Hitesh Raghuvanshi added 869 commits

    added 869 commits

    Compare with previous version

  • added 1 commit

    • 7e11fe67 - Modified rspec for calling original

    Compare with previous version

  • 19 19 "#{action_text} via system job. Reason: #{@details[:reason]}"
    20 20 elsif impersonated_event?
    21 21 "#{action_text} (by #{@details[:impersonated_by]})"
    22 elsif @details[:author_class].to_s == "Gitlab::Audit::ImpersonatedAuthor" &&
    23 @details[:custom_message].present?
    24 @details[:custom_message]
  • added 1 commit

    • 418e7b5c - Removing impersonated author chcek

    Compare with previous version

  • added 1 commit

    • 3773e69b - Fixed query threshold rspec failures

    Compare with previous version

  • added 1 commit

    • 68b3ca30 - Removing add for fixing feature test

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Hitesh Raghuvanshi added 233 commits

    added 233 commits

    Compare with previous version

  • Hitesh Raghuvanshi marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

    marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed

  • Hitesh Raghuvanshi marked this merge request as ready

    marked this merge request as ready

  • Hitesh Raghuvanshi requested review from @jmontal

    requested review from @jmontal

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • 🤖 GitLab Bot 🤖 changed milestone to %16.0

    changed milestone to %16.0

  • Jay Montal approved this merge request

    approved this merge request

  • Jay Montal requested review from @eurie and removed review request for @jmontal

    requested review from @eurie and 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:

  • mentioned in issue #374105 (closed)

  • Ethan Urie
  • Ethan Urie
  • Ethan Urie
  • Ethan Urie
  • Ethan Urie
  • Ethan Urie
  • Ethan Urie
  • Hitesh Raghuvanshi added 997 commits

    added 997 commits

    Compare with previous version

  • Contributor
    1 Warning
    :warning: Please add a merge request subtype to this merge request.
    1 Message
    :book: CHANGELOG missing:

    If you want to create a changelog entry for GitLab FOSS, add the Changelog trailer to the commit message you want to add to the changelog.

    If you want to create a changelog entry for GitLab EE, also add the EE: true trailer to your commit message.

    If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.

    Reviewer roulette

    Changes that require review have been detected!

    Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:

    Category Reviewer Maintainer
    backend Sashi Kumar Kumaresan current availability (@sashi_kumar) (UTC+0, 5.5 hours behind @hraghuvanshi) Charlie Ablett current availability (@cablett) (UTC+12, 6.5 hours ahead of @hraghuvanshi)
    test for spec/features/* Harsha Muralidhar current availability (@hmuralidhar) (UTC+10, 4.5 hours ahead of @hraghuvanshi) Maintainer review is optional for test for spec/features/*

    To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

    To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

    Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

    If needed, you can retry the :repeat: danger-review job that generated this comment.

    Generated by :no_entry_sign: Danger

  • added 1 commit

    Compare with previous version

  • Hitesh Raghuvanshi added 260 commits

    added 260 commits

    Compare with previous version

  • Hitesh Raghuvanshi added 205 commits

    added 205 commits

    Compare with previous version

  • added 2 commits

    • 896aaafd - Replaced string with constant in update service
    • 8f104c87 - Removed freeze and used format

    Compare with previous version

  • requested review from @mlapierre

  • Ethan Urie approved this merge request

    approved this merge request

  • Hitesh Raghuvanshi requested review from @hmuralidhar and removed review request for @mlapierre

    requested review from @hmuralidhar and removed review request for @mlapierre

  • Harsha Muralidhar approved this merge request

    approved this merge request

  • Mark Lapierre added 1 commit

    added 1 commit

    • fc6a74e5 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Hitesh Raghuvanshi added 136 commits

    added 136 commits

    Compare with previous version

  • Ethan Urie resolved all threads

    resolved all threads

  • Ethan Urie approved this merge request

    approved this merge request

  • Ethan Urie enabled an automatic merge when the pipeline for 3e11d5dc succeeds

    enabled an automatic merge when the pipeline for 3e11d5dc succeeds

  • merged

  • Ethan Urie mentioned in commit da5158da

    mentioned in commit da5158da

  • mentioned in issue #409538 (closed)

  • Steve Abrams mentioned in commit 0d510792

    mentioned in commit 0d510792

  • Steve Abrams mentioned in merge request !119396 (merged)

    mentioned in merge request !119396 (merged)

  • Mayra Cabrera mentioned in commit 883e6c0a

    mentioned in commit 883e6c0a

  • Contributor

    Allure report

    allure-report-publisher generated test report!

    e2e-package-and-test: :x: test report for a8dcd6cd

    expand test summary
    +-------------------------------------------------------------+
    |                       suites summary                        |
    +--------+--------+--------+---------+-------+-------+--------+
    |        | passed | failed | skipped | flaky | total | result |
    +--------+--------+--------+---------+-------+-------+--------+
    | Govern | 226    | 5      | 0       | 40    | 231   | ❌     |
    +--------+--------+--------+---------+-------+-------+--------+
    | Total  | 226    | 5      | 0       | 40    | 231   | ❌     |
    +--------+--------+--------+---------+-------+-------+--------+
  • added workflowstaging label and removed workflowcanary label

  • Hitesh Raghuvanshi mentioned in merge request !119462 (merged)

    mentioned in merge request !119462 (merged)

  • Please register or sign in to reply
    Loading