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: internal audit logging system #14950

Open
wants to merge 131 commits into
base: main
Choose a base branch
from

Conversation

oliverqx
Copy link

@oliverqx oliverqx commented May 9, 2024

/claim #1461

What does this PR do?

This PR adds an internal audit logging system to cal.com. Its designed to log actions using the expected audit-log clients.

  • Fixes [CAL-1710] Audit log #1461 (GitHub issue number)
  • Fixes CAL-1710 (Linear issue number - should be visible at the bottom of the GitHub issue description)

I recorded a 10 minute video showing my work. In the video I show how this internal audit logging system enables audit log app development by developing the BoxyHQ integration. You can find the video here: https://youtu.be/Nbi8Tr1Ny9E

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected)
  • I have added a Docs issue here if this PR makes changes that would require a documentation change
  • I have added or modified automated tests that prove my fix is effective or that my feature works (PRs might be rejected if logical changes are not properly tested)

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

add settings row.
Copy link

vercel bot commented May 9, 2024

@oliverqx is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@algora-pbc algora-pbc bot mentioned this pull request May 9, 2024
@github-actions github-actions bot added ❗️ migrations contains migration files 3 points Created by SyncLinear.com enterprise area: enterprise, audit log, organisation, SAML, SSO foundation Medium priority Created by Linear-GitHub Sync labels May 9, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@github-actions github-actions bot added organizations area: organizations, orgs ✨ feature New feature or request 🎨 needs design Before engineering kick-off, a designer needs to submit a mockup 💎 Bounty A bounty on Algora.io 🚧 wip / in the making This is currently being worked on labels May 9, 2024
Copy link
Contributor

github-actions bot commented May 9, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@oliverqx oliverqx changed the title Feature: Internal Audit Log System feat: internal audit logging system May 9, 2024
@oliverqx
Copy link
Author

oliverqx commented May 9, 2024

I'm trying to compile a list of all possible actions that can be logged by the audit system. So far I've this:

Webhooks
	- Create
	- Modify
		Event Triggers
		Subscriber URL
		Secret
		Payload Template
	- Enable	
	- Disable
	- Delete
API Keys
	- Create
	- Modify
		- Name
Schedule
	- Modified
		Available Hours
		Date Overrides
		Timezone
		Metadata
	- Created
	- Deleted
Bookings
	- Modified
		Reschedule
		Edit Location
	- Created
	- Cancelled
	- Reschedule Requested
Event-Types
	- Modified
		Event Setup
		Availability
		Limits
		Advanced
		Recurring
		Apps
		Workflows
		Webhooks
		Visibility
	- Created
	- Duplicate
	- Delete
Teams
	- Modified
		Members
		Profile
		Apperance
		Availability
	- Created
	- Duplicate
	- Deleted
User Profile
	- Modified
		Profile
		General
		Calendar	
		Conferencing
		Appearance
		Out of Office
	- Created
	- Delete
Password
	- Modified
	- Created
	- Delete
Impersonation
	- On
	- Off

cc: @PeerRich

@oliverqx
Copy link
Author

cc: @baileypumfleet

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

- Preparing to create audit log app context
- settings and keys go in appKey
- modify: remove AuditLogSystemTriggerEvents.SYSTEM_TEMPLATE_UPDATED
- modify: add AuditLogSystemTriggerEvents.SYSTEM_MISC to allow for implementation specific events without modifying schema
- add: AuditLogAppTriggerEvents.APP_KEYS_UPDATED
based on path this will return the events metadata, should be moved to core later
- avoided recursion so its a loop by choice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 points Created by SyncLinear.com 🙋 Bounty claim 💎 Bounty A bounty on Algora.io community Created by Linear-GitHub Sync enterprise area: enterprise, audit log, organisation, SAML, SSO ✨ feature New feature or request foundation Medium priority Created by Linear-GitHub Sync ❗️ migrations contains migration files 🎨 needs design Before engineering kick-off, a designer needs to submit a mockup organizations area: organizations, orgs 🚧 wip / in the making This is currently being worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-1710] Audit log
4 participants