Refactor and enhance auditing within heartbeat components#1004
Closed
cgalibern wants to merge 20 commits intoopensvc:mainfrom
Closed
Refactor and enhance auditing within heartbeat components#1004cgalibern wants to merge 20 commits intoopensvc:mainfrom
cgalibern wants to merge 20 commits intoopensvc:mainfrom
Conversation
- Consolidated configuration fields into a `cfg` struct for better encapsulation. - Replaced inline client creation with reusable client logic in `cfg`. - Added dynamic subscription updates for configuration changes. - Improved error handling and logging during client updates.
…ndling - Introduced `attachActiveAuditIfAny` to reattach ongoing audits during hbrelay operations. - Added filters for `AuditStart` and `AuditStop` events to hbrelay subscriptions. - Improved handling of audit subsystem mapping and logging.
…rt multiple subsystem matchers
- Introduced `EnableAudit` in transmitters and receivers to integrate with auditing. - Added `hbaudit` package for managing audit session tracking and event handling. - Enhanced logging for `AuditStart` and `AuditStop` events.
…e `hb.common` subsystem
… across heartbeat components
…lity - Added specific prefixes (e.g., `msgToTx`, `msgFromRx`) to log messages for better context identification. - Enhanced log clarity when tracing operations across heartbeat components.
…arity - Replaced `hb.common` with `hb.peer_dropper` in audit subsystem references. - Renamed `peerDropWorker` to `peerDropper` for consistency.
- Integrated `EnableAudit` in `hb.main` to activate auditing with context. - Removed `AuditStart` and `AuditStop` handling for cleaner implementation. - Adjusted subscription naming for better clarity (`daemon.hb.janitor`).
…ctrl`, and `hb.peer_dropper` - Added new subsystems to list of audit targets for expanded logging capabilities.
…for streamlined password parsing - Removed `getPasswordKM` in favor of `ParseKeyMetaRelWithFallback` for improved handling of password parsing with fallback logic. - Simplified legacy backward compatibility code.
- Modified log prefix to include `main` for more precise context in log entries.
… for clarity - Adjusted log prefix for better traceability by renaming `hbctrl:peerDropper` to `hb:peer_dropper`. - Updated subscription name from `daemon.hb.peer_drop_worker` to `daemon.hb.peer_dropper` to align with naming conventions.
- Removed redundant subsystem checks in `AuditStart` and `AuditStop` handlers. - Streamlined calls to `HandleAuditStart` and `HandleAuditStop` with consistent parameters.
…eartbeat configure
…eartbeat components
During cluster join, the hb relay can start before its secret configuration objects are available. As a result, the heartbeat previously failed to start, leaving no opportunity for proper configuration afterward. This change allows the hb relay to start and wait for password resolution by subscribing to the passwordFrom configuration object. Additional updates: - Added a nil check for the client in the ticker loop to avoid unnecessary executions. - Improved logging in refreshClient to enhance debugging and traceability. - Fix missed initial password update
Contributor
Author
|
replaced by #1005 |
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.
Summary
This pull request introduces several improvements and refactors to auditing and logging within the heartbeat (
hb) components. Key updates include subsystem expansions, better integration ofEnableAudit, log contextualization, and hbrelay enhancements.Key Changes
hb.main,hb.ctrl, andhb.peer_dropper.EnableAuditinto transmitters, receivers,hb.main, andhb.ctrl.EnableAuditcapabilities.hb.maintraceability.peerDropWorker->peerDropper.String()method forKeyMeta.