Skip to content

Final Cedarling Log Design

Michael Schwartz edited this page Sep 20, 2024 · 8 revisions

Log Schema

Name Description Type
id unique identifier for this event string
time Time of decision integer
logkind decision, system, metric string
request_id unique id of the request string
pdp_id unique id of cedarling string
application_id name of application from bootstrap properties string
decision ALLOW or DENY string
Principal Cedar principal string
Action Cedar Action string
Resource Cedar Resource string
Context Cedar Context string
diagnostics Any resulting diagnostics string
msg Any other message string

Log Interface

  • popLogs() - Return logs and remove them from the Cedarling DB
  • getLogById(id: String) - get specific log
  • getLogIds() - returns a list of all log ids.
  • filterLogs(field, value) - for example, decision = DENY, or action = view .

Cedarling log types

In Cedarling-Nativity-Plan Bootstrap properties we have variable CEDARLING_LOG_TYPE that may contain next values:

  • off
  • memory
  • std_out
  • lock

Log type off

This log type is do nothing. It means that all logs will be ignored.

Log type memory

This log type holds all logs in database (in memory/or not) with some eviction policy.

Log type std_out

This log type writes all logs to stdout or stderr (It should be discussed). Without storing or additional handling log messages.

For note:

  • stdout - The standard output stream, which is used for normal output from the program.
  • stderr - The standard error stream, which is used for error messages and diagnostics issued by the program.

Log type lock

This log type will send logs to the server (corporate feature). Will be discussed later.

Clone this wiki locally