retracedhq/retraced
GitHub: retracedhq/retraced
Stars: 444 | Forks: 35
# Retraced Audit Log
Retraced is the easiest way to integrate a compliant audit log into your application.
It provides a searchable, exportable record of read/write events.
Client libraries are available for [Go](https://github.com/retracedhq/retraced-go) and [Javascript](https://github.com/retracedhq/retraced-js).
## Documentation
Please head to [https://github.com/retracedhq/docs](https://github.com/retracedhq/docs) for detailed documentation on how to get started with Retraced.
- [Step by step tutorial video](https://www.youtube.com/watch?v=4vBxw4kqdwE)
## Usage
### Running with docker-compose
**Note:** `ADMIN_ROOT_TOKEN` has been set to `dev` so you can test the setup locally. Please remember to change this (and other relevant sensitive env vars/secrets) in production.
### Run an example to see how Retraced works
Git checkout the Logs Viewer [repo](https://github.com/retracedhq/logs-viewer) and run `npm i` followed by `npm run dev` to start an example which uses Retraced to show you some auto generated events. Refresh the UI a few times for the auto-generated audit logs to kick in. You can also ingest a few custom logs using the following curl command:-
curl -X POST -H "Content-Type: application/json" -H "Authorization: token=dev" -d '{
"action": "some.record.created",
"teamId": "boxyhq",
"group": {
"id": "dev",
"name": "dev"
},
"crud": "c",
"created": "2023-01-16T15:48:44.573Z",
"source_ip": "127.0.0.1",
"actor": {
"id": "jackson@boxyhq.com",
"name": "Jackson"
},
"target": {
"id": "100",
"name": "tasks",
"type": "Tasks"
}
}' http://localhost:3000/auditlog/publisher/v1/project/dev/event
### Running with Skaffold
You could alternatively use Skaffold instead of docker-compose to run Retraced locally.
## Swagger Documentation
Swagger spec is generated from source using [TSOA](https://github.com/lukeautry/tsoa)
By default, a swagger spec is built as part of `npm run build`, and is served by express at `/publisher/v1/swagger.json`.
#### Generating a spec
To generate swagger.json from Typescript sources use
npm run swagger
The outputs will be written to build/swagger.json
标签:自动化攻击