[backend] feat(audit-logging): improv properties (#5480)#5923
Open
RomuDeuxfois wants to merge 1 commit into
Open
[backend] feat(audit-logging): improv properties (#5480)#5923RomuDeuxfois wants to merge 1 commit into
RomuDeuxfois wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors audit logging configuration by introducing a new AuditLogProperties component and updating default properties to use a unified enabled/transports/include-reads scheme.
Changes:
- Replaced legacy audit log property keys in
application.propertieswithopenaev.audit-logs.enabled,openaev.audit-logs.transports, andopenaev.audit-logs.include-reads. - Added
AuditLogPropertiesto load/validate the new audit logging settings. - Updated
AuditRequestValidatorto useAuditLogPropertiesfor read-audit inclusion logic.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| openaev-api/src/main/resources/application.properties | Switches audit logging configuration to the new unified keys and removes the API logging block. |
| openaev-api/src/main/java/io/openaev/config/audit_log/AuditLogProperties.java | New component to represent/validate audit logging enablement and transport selection. |
| openaev-api/src/main/java/io/openaev/aop/audit_log/AuditRequestValidator.java | Uses the new properties object for deciding whether READ/SEARCH should be audited. |
d09b712 to
bd646b0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
openaev-api/src/main/java/io/openaev/utils/log/transport/AuditESLogTransportUtils.java:38
- issue (critical): The new
enginetransport path relies onengineService.indexDocument(...), but the currentEngineServiceonly provides a default implementation that throwsUnsupportedOperationException, and neitherOpenSearchServicenorElasticServiceoverride it. Enabling theenginetransport will therefore always fail to index audit events. Either implementindexDocumentin the concrete engine services, or change this transport to use an existing indexing API that is supported by both engines.
@Override
public boolean isEnabled() {
return auditLogProperties.isTransportEnabled(AuditLogProperties.TRANSPORT_ENGINE);
}
private static final String AUDIT_LOG_INDEX = "audit-log";
private final EngineService engineService;
private final EngineConfig engineConfig;
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.