diff options
Diffstat (limited to 'src/audit.h')
| -rw-r--r-- | src/audit.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/audit.h b/src/audit.h new file mode 100644 index 0000000..2031734 --- /dev/null +++ b/src/audit.h @@ -0,0 +1,19 @@ +#ifndef BOKF_AUDIT_H +#define BOKF_AUDIT_H + +#include <sqlite3.h> +#include <stdint.h> + +#include "yyjson.h" + +int audit_append(sqlite3 *db, int64_t org_id, int64_t user_id, int64_t token_id, + const char *action, const char *request_json, + const char *result_code, char **err); + +/* 0 = chain verified, 1 = chain broken, -1 = error */ +int audit_verify(sqlite3 *db, int64_t *checked, int64_t *bad_seq, char **err); + +/* Serialize command args for the audit log with secrets removed. */ +char *audit_args_json(yyjson_val *args); + +#endif |
