Terracotta-OSS / terracotta-apis

Apache License 2.0
6 stars 25 forks source link

support audit logging on the server #321

Closed myronkscott closed 4 years ago

myronkscott commented 4 years ago

Provide a way for any component to write messages to the audit logs of the server.

myronkscott commented 4 years ago

@saurabhagas or @mathieucarbou Is audit logging going to be used at bootstrap or only runtime?

saurabhagas commented 4 years ago

@saurabhagas or @mathieucarbou Is audit logging going to be used at bootstrap or only runtime?

Both - there's some audit logging during server startup (e.g. parsing whitelist file), and other during runtime (e.g. connections from clients)

myronkscott commented 4 years ago

@saurabhagas or @mathieucarbou Is audit logging going to be used at bootstrap or only runtime?

Both - there's some audit logging during server startup (e.g. parsing whitelist file), and other during runtime (e.g. connections from clients)

this is problematic in the current implementation. This service is bootstrapped itself very late so is not available during configuration.

mathieucarbou commented 4 years ago

@saurabhagas or @mathieucarbou Is audit logging going to be used at bootstrap or only runtime?

Both - there's some audit logging during server startup (e.g. parsing whitelist file), and other during runtime (e.g. connections from clients)

this is problematic in the current implementation. This service is bootstrapped itself very late so is not available during configuration.

@saurabhagas : the way we have implemented the auditing by decorating the DC service and using the listeners, the audit logs methods are only called when the server has reached a final state (like STARTING, ACTIVE, etc).

The PR is here @myronkscott if you want to have a look at what was done: https://github.com/Terracotta-OSS/terracotta-platform/pull/757

saurabhagas commented 4 years ago

@myronkscott what are the next steps for this PR? Do we merge so that that tc-core changes can be done based on the new API?