...
Currently, in SecurityAuthenticationHttpHandler, we already have each request audit logged. For each incoming request, we log the clientIP, the URL from HTTPRequest and the responseCode from HTTPResponse. To log the request body or response body, we annotate the RESTful endpoint methods with a new custom annotation AuditPolicy such as:
Expand |
---|
Code Block |
---|
| /**
* Annotates a RESTful endpoint method to indicate which content needs to be audit logged.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface AuditPolicy {
boolean requestBody() default false;
boolean responseBody() default false;
} |
|
Code Block |
---|
|
/**
* Annotates a RESTful endpoint method to indicate which content needs to be audit logged.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface AuditPolicy {
boolean requestBody() default false;
boolean responseBody() default false;
} |
...