Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: emit audit event+webhook when user is removed from a group #640

Merged
merged 3 commits into from
Jun 13, 2024

Conversation

anujk14
Copy link
Contributor

@anujk14 anujk14 commented Jun 11, 2024

We require a webhook which notifies downstream services about removal of user from groups. This PR introduces that into the service.

The reason for doing this in service is so that this event is triggered even if different handlers are used to perform this action.

The idea behind adding this instead of adding more and more information into policy events is to provide an easy to understand event to downstream services so that appropriate action can be taken by them. A few more events such as this will be introduced in subsequent PRs.

Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontier ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 12, 2024 6:31am

@anujk14 anujk14 requested review from kushsharma and rsbh June 11, 2024 11:49
@coveralls
Copy link

coveralls commented Jun 11, 2024

Pull Request Test Coverage Report for Build 9464981920

Details

  • 0 of 6 (0.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.001%) to 9.311%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/webhook/service.go 0 1 0.0%
core/group/service.go 0 5 0.0%
Files with Coverage Reduction New Missed Lines %
core/group/service.go 1 0.0%
Totals Coverage Status
Change from base Build 9417646654: -0.001%
Covered Lines: 9642
Relevant Lines: 103552

💛 - Coveralls

core/group/service.go Outdated Show resolved Hide resolved
core/group/service.go Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jun 12, 2024

Pull Request Test Coverage Report for Build 9477509847

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 6 (0.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.08%) to 9.388%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/webhook/service.go 0 1 0.0%
core/group/service.go 0 5 0.0%
Files with Coverage Reduction New Missed Lines %
core/group/service.go 1 0.0%
Totals Coverage Status
Change from base Build 9417646654: 0.08%
Covered Lines: 9887
Relevant Lines: 105319

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 12, 2024

Pull Request Test Coverage Report for Build 9477836973

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 11 (0.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.08%) to 9.387%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/webhook/service.go 0 1 0.0%
core/group/service.go 0 10 0.0%
Files with Coverage Reduction New Missed Lines %
core/group/service.go 1 0.0%
Totals Coverage Status
Change from base Build 9417646654: 0.08%
Covered Lines: 9887
Relevant Lines: 105324

💛 - Coveralls

@anujk14 anujk14 merged commit 6d7907e into main Jun 13, 2024
7 checks passed
@anujk14 anujk14 deleted the IDE-321-group-removal-webhook branch June 13, 2024 06:09
anujk14 added a commit that referenced this pull request Jun 14, 2024
* feat: emit audit event+webhook when user is removed from a group

* emit event as soon as relation is deleted

* fix: send group org id instead of platform org id in user removal event
anujk14 added a commit that referenced this pull request Jun 18, 2024
…#646)

* feat: add audit log event for group deletion

* move audit event for user removal to service

* emit event on disabling org

* feat: emit audit event+webhook when user is removed from a group (#640)

* feat: emit audit event+webhook when user is removed from a group

* emit event as soon as relation is deleted

* fix: send group org id instead of platform org id in user removal event

* feat(admin_ui): add filter, loader and sorting to the tables (#643)

* chore: update apsara version

* refactor: remove loading check from column definitions

* refactor: remove loading check from roles and user table

* refactor: remove loading check from billing list

* refactor: remove loading check from groups list

* refactor: remove loading check from projects list

* refactor: remove loading check from users list

* refactor: remove loading check from products list

* refactor: remove loading check from preferences list

* refactor: remove loading check and add filter in invoices list

* fix(admin_ui): type mismatch in apsara datatable (#644)

* ci: set goreleaser to v1 (#645)

* trigger audit event after relation and repository have both been updated

---------

Co-authored-by: Rishabh Mishra <me@rsbh.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants