Merged
Conversation
- Add SecurityEvent struct with realm_id, metadata, ip tracking - Fix syntax errors in Display implementation - Support for multi-tenant security event logging #317
- Add SecurityEventRepository trait with store_event, get_events, count_events methods - Add SecurityEventPolicy trait for permission checks - Add SecurityEventFilter value object for flexible event filtering - Add EventExportRequest and ExportFormat for future export functionality
…_by_id, count_events - Add SecurityEventPolicy trait with can_view_events, can_export_events - Add SecurityEventFilter value object for flexible filtering with pagination - Add EventExportRequest and ExportFormat for future export features - Add public re-exports in mod.rs for cleaner imports
- Add ActorType enum (user, service_account, admin, system) - Add EventStatus enum (success, failure) - Add new event types: PasswordReset, UserCreated, UserDeleted, ClientCreated, ClientDeleted - Restructure SecurityEvent: actor_id/actor_type, status, target_type/target_id, resource, trace_id - Rename metadata to details for consistency - Add builder pattern methods (with_actor, with_target, with_context, with_details) Replace async_trait with native impl Future in repository traits
Add SeaWatch domain, entities, repository and DB migration. Introduce SecurityEventId wrapper, SeaORM entity and mapper, convert Postgres repository to async fns and adjust ports/value objects. Add frontend SeaWatch pages, nav, routes and UI components plus a React Query toggle.
Add SecurityEventRepository (SE) as a generic to service types and implementations across domains. Wire PostgresSecurityEventRepository into application setup. Update SecurityEvent::new to accept actor_id and record security events (e.g. role create/delete, client create). Add mocking and test plumbing for the security event repository.
Extract SecurityMetrics, StrangeEventsAnalysis and FlaggedUsers into separate components and update PageOverview to use them Add a prop-driven FlaggedUsers component and move inline widgets into new files
Implement HTTP handler, router and OpenAPI docs. Add core seawatch modules: policies, services, ports and value objects (FetchEventsInput), derive PartialEq for SecurityEvent, and wire the service into the HTTP server and API docgen.
LeadcodeDev
approved these changes
Nov 21, 2025
NolwennD
pushed a commit
to NolwennD/ferriskey
that referenced
this pull request
Nov 22, 2025
* - Add SecurityEventType enum with login, role, realm, client events - Add SecurityEvent struct with realm_id, metadata, ip tracking - Fix syntax errors in Display implementation - Support for multi-tenant security event logging ferriskey#317 * add ports and value objects for security events - Add SecurityEventRepository trait with store_event, get_events, count_events methods - Add SecurityEventPolicy trait for permission checks - Add SecurityEventFilter value object for flexible event filtering - Add EventExportRequest and ExportFormat for future export functionality * - Add SecurityEventRepository trait with store_event, get_events, get_by_id, count_events - Add SecurityEventPolicy trait with can_view_events, can_export_events - Add SecurityEventFilter value object for flexible filtering with pagination - Add EventExportRequest and ExportFormat for future export features - Add public re-exports in mod.rs for cleaner imports * Restructure domain layer to match specification from discussion ferriskey#273: - Add ActorType enum (user, service_account, admin, system) - Add EventStatus enum (success, failure) - Add new event types: PasswordReset, UserCreated, UserDeleted, ClientCreated, ClientDeleted - Restructure SecurityEvent: actor_id/actor_type, status, target_type/target_id, resource, trace_id - Rename metadata to details for consistency - Add builder pattern methods (with_actor, with_target, with_context, with_details) Replace async_trait with native impl Future in repository traits * add database migration for security_events table * add infrastructure layer with mapper and repository * feat: add SeaWatch security events feature Add SeaWatch domain, entities, repository and DB migration. Introduce SecurityEventId wrapper, SeaORM entity and mapper, convert Postgres repository to async fns and adjust ports/value objects. Add frontend SeaWatch pages, nav, routes and UI components plus a React Query toggle. * feat: integrate SecurityEventRepository across services Add SecurityEventRepository (SE) as a generic to service types and implementations across domains. Wire PostgresSecurityEventRepository into application setup. Update SecurityEvent::new to accept actor_id and record security events (e.g. role create/delete, client create). Add mocking and test plumbing for the security event repository. * fix: remove unused Settings import from nav-security * fix: refactor SeaWatch overview into UI components Extract SecurityMetrics, StrangeEventsAnalysis and FlaggedUsers into separate components and update PageOverview to use them Add a prop-driven FlaggedUsers component and move inline widgets into new files * feat: add Seawatch HTTP module and handler stub * feat: add Seawatch security-events endpoint Implement HTTP handler, router and OpenAPI docs. Add core seawatch modules: policies, services, ports and value objects (FetchEventsInput), derive PartialEq for SecurityEvent, and wire the service into the HTTP server and API docgen. * fix: eslint rules --------- Co-authored-by: brogouh <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.