mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 09:13:19 +03:00
[PR #26] [MERGED] feat: add audit log with email notification #965
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/26
Author: @stonith404
Created: 9/9/2024
Status: ✅ Merged
Merged: 9/9/2024
Merged by: @stonith404
Base:
main← Head:feat/audit-log📝 Commits (5)
3e77217add email notifications4d30a24add audit log3897fb8add db cleanup for audit loga50a8f6improve audit log table on mobile73fc8f1add test📊 Changes
51 files changed (+944 additions, -163 deletions)
View changed files
📝
.env.example(+1 -0)📝
CONTRIBUTING.md(+1 -1)📝
Dockerfile(+2 -1)📝
README.md(+1 -0)➕
backend/email-templates/login-with-new-device.html(+119 -0)📝
backend/go.mod(+1 -0)📝
backend/go.sum(+2 -0)📝
backend/internal/bootstrap/router_bootstrap.go(+6 -4)📝
backend/internal/controller/app_config_controller.go(+9 -9)➕
backend/internal/controller/audit_log_controller.go(+56 -0)📝
backend/internal/controller/oidc_controller.go(+2 -2)📝
backend/internal/controller/webauthn_controller.go(+4 -10)📝
backend/internal/dto/app_config_dto.go(+6 -0)➕
backend/internal/dto/audit_log_dto.go(+17 -0)📝
backend/internal/job/db_cleanup.go(+7 -1)📝
backend/internal/model/app_config.go(+7 -0)➕
backend/internal/model/audit_log.go(+50 -0)📝
backend/internal/service/app_config_service.go(+32 -7)➕
backend/internal/service/audit_log_service.go(+85 -0)➕
backend/internal/service/email_service.go(+67 -0)...and 31 more files
📄 Description
This PR adds an audit log that logs every login and client authorization.
Additionally, if a login was done on a new device or location an email gets sent. The email server must be setup in the application configuration first.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.