Added audit events for update and destroy destinations
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
- Login as instance administrator on gitlab instance, http://gitlab.localdev:3000 .
- Open http://gitlab.localdev:3000/admin/audit_logs?tab=log in one browser tab.
- Open http://gitlab.localdev:3000/admin/audit_logs?tab=streams in another browser tab and add a new streaming destination.
- Open http://gitlab.localdev:3000/-/graphql-explorer for running graphql queries as update is not available on UI currently.
- 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
}
}
}
}
}
- 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
}
}
}
- 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.
- Now visit http://gitlab.localdev:3000/admin/audit_logs?tab=streams and delete the destination.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #404730 (closed)
Merge request reports
Activity
changed milestone to %16.2
assigned to @hraghuvanshi
marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed
3 Warnings b1d116af: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. 53b0e0cb: Commits that change 30 or more lines across at least 3 files should describe these changes in the commit body. For more information, take a look at our Commit message guidelines. Please add a merge request subtype to this merge request. 1 Message 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 Siddharth Dungarwal (
@sdungarwal
) (UTC+5.5, same timezone as@hraghuvanshi
)Kerri Miller (
@kerrizor
) (UTC-7, 12.5 hours behind@hraghuvanshi
)groupcompliance Reviewer review is optional for groupcompliance Jay Montal (
@jmontal
) (UTC-6, 11.5 hours behind@hraghuvanshi
)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
danger-review
job that generated this comment.Generated by
DangerAllure report
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for f3cf477eexpand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Govern | 21 | 0 | 0 | 18 | 21 | ❗ | | Plan | 47 | 0 | 0 | 41 | 47 | ❗ | | Create | 19 | 0 | 0 | 18 | 19 | ❗ | | Manage | 12 | 0 | 1 | 12 | 13 | ❗ | | Data Stores | 20 | 0 | 0 | 15 | 20 | ❗ | | Verify | 8 | 0 | 0 | 8 | 8 | ❗ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 127 | 0 | 1 | 112 | 128 | ❗ | +-------------+--------+--------+---------+-------+-------+--------+
@aakriti.gupta Can you please do initial backend review here?
requested review from @aakriti.gupta
- Resolved by drew stachon
@jmontal Can you please do groupcompliance review here?
requested review from @jmontal
- Resolved by Hitesh Raghuvanshi
- Resolved by Hitesh Raghuvanshi
- Resolved by Hitesh Raghuvanshi
- Resolved by drew stachon
- Resolved by Hitesh Raghuvanshi
- Resolved by drew stachon
I have left a few suggestions, please assign back to me when addressed.
cc: @splattael
Edited by Aakriti Gupta
removed review request for @aakriti.gupta
removed review request for @jmontal
@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 pipeline:mr-approved label
added 2 commits
added 545 commits
-
da16c92c...6c2e3941 - 542 commits from branch
master
- 53b0e0cb - Added audit events for update destroy destinations
- ac91e4d8 - Added test case for same destination
- 4d5063db - Fixed lint offence
Toggle commit list-
da16c92c...6c2e3941 - 542 commits from branch
- Resolved by Hitesh Raghuvanshi
requested review from @aakriti.gupta
requested review from @drew and removed review request for @aakriti.gupta
mentioned in issue #418194 (closed)
added 449 commits
-
e50a9c6e...9129e11c - 447 commits from branch
master
- f5b1e546 - Merge branch 'master' into 404730-audit-events-instance-dest
- b1d116af - Updated audit update method
-
e50a9c6e...9129e11c - 447 commits from branch
- Resolved by drew stachon
- Resolved by drew stachon
- Resolved by drew stachon
added 254 commits
-
ff94ab52...a7716746 - 253 commits from branch
master
- 0efc928b - Merge branch 'master' into 404730-audit-events-instance-dest
-
ff94ab52...a7716746 - 253 commits from branch
@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 Raghuvanshiadded 29 commits
-
0efc928b...9a741471 - 28 commits from branch
master
- f3cf477e - Merge branch 'master' into 404730-audit-events-instance-dest
-
0efc928b...9a741471 - 28 commits from branch
- Resolved by drew stachon
@jmontal It looks like your approvals fell off, but they're required for merge. Could you have another look and re-approve if nothing's changed?
requested review from @jmontal
removed review request for @jmontal
enabled an automatic merge when the pipeline for 36329eac succeeds
mentioned in commit 61274109
added workflowstaging-canary label and removed workflowin review label
added workflowcanary label and removed workflowstaging-canary label
added self-managed workflowstaging labels and removed self-managed workflowcanary labels
added workflowproduction label and removed workflowstaging label
added releasedcandidate label
added workflowpost-deploy-db-production label and removed workflowproduction label
added releasedpublished label and removed releasedcandidate label