diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-17 19:55:36 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-17 19:55:36 +0200 |
| commit | 380195f7cd5e57acf2c1cf2bc41069e6b0b979ed (patch) | |
| tree | 32a88fb22a7fbe8f1fd5c105156d1f928c93950d /src/audit.h | |
| download | bokf-0.1.0.tar.gz bokf-0.1.0.zip | |
Initial commit: daemon, clients, docs, Docker deploy pipelinev0.1.0
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 |
