Skip to content

Final Cedarling Log Design

Michael Schwartz edited this page Sep 18, 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

  • subscribeToLogStream() - Enables real-time log streaming, where developers can subscribe to a stream of logs as they are generated.
  • getLogById(id: String) - get specific log
  • getLogIds() - returns a list of all log ids.

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