Package vaultWeb.security.aspects
Class SecurityAuditAspect
java.lang.Object
vaultWeb.security.aspects.SecurityAuditAspect
Aspect that logs security-relevant events for audit purposes.
This aspect intercepts methods annotated with AuditSecurityEvent and logs details
including username, event type, timestamp, IP address, and success/failure status.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlogFailure(org.aspectj.lang.JoinPoint joinPoint, AuditSecurityEvent auditSecurityEvent, Throwable ex) Logs failed security operations.voidlogSuccess(org.aspectj.lang.JoinPoint joinPoint, AuditSecurityEvent auditSecurityEvent, Object result) Logs successful security operations.
-
Constructor Details
-
SecurityAuditAspect
public SecurityAuditAspect()
-
-
Method Details
-
logSuccess
public void logSuccess(org.aspectj.lang.JoinPoint joinPoint, AuditSecurityEvent auditSecurityEvent, Object result) Logs successful security operations.- Parameters:
joinPoint- the join point providing access to the method being invokedauditSecurityEvent- the annotation containing the event type
-
logFailure
public void logFailure(org.aspectj.lang.JoinPoint joinPoint, AuditSecurityEvent auditSecurityEvent, Throwable ex) Logs failed security operations.- Parameters:
joinPoint- the join point providing access to the method being invokedauditSecurityEvent- the annotation containing the event typeex- the throwable that was thrown
-