Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 49,383
    • Issues 49,383
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,566
    • Merge requests 1,566
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #300961
Closed
Open
Issue created Feb 03, 2021 by Dan Jensen@djensenContributor0 of 6 checklist items completed0/6 checklist items

Impersonation start/stop audit events not appearing on the group-level page

Problem to solve

Audit Events for "impersonation start/stop" are not appearing in the group-level Audit Events page. Although the impersonation actions are appearing, it would be helpful to show the start/stop as well.

Proposal

Audit Events for beginning and ending an impersonation session should appear in the group-level audit log when the impersonated user belongs to a group (in addition to the instance-level audit log as they do already).

image

In this table, that is represented by the top three rows.

Proposal note

This is about showing instance-level AuditEvents in the group-level Audit log, which is closely related to showing project-level AuditEvents in the group-level Audit log.

Implementation plan

backend weight 3️⃣

  1. Update ImpersonationAuditEventService to accept an optional entity.
  2. Create a service to create an ImpersonationEvent for each user.groups in batches as a background job.
    • See inserting into tables in batches docs.
    • Do this only for a the user's direct memberships, ie exclude inherited subgroups.
  3. Create a Started Impersonation in users_controller.rb using the new service.
  4. Create a Stopped Impersonation in application_controller.rb using the new service.
  5. Update audit events docs.
  6. Update specs.
Edited Feb 01, 2022 by Dan Jensen
Assignee
Assign to
Time tracking