keygen-sh / keygen-api

Keygen is a fair source software licensing and distribution API built with Ruby on Rails. For developers, by developers.
https://keygen.sh
Other
844 stars 57 forks source link

Add audit trail for every request per-account #197

Closed ezekg closed 6 years ago

ezekg commented 6 years ago

See: https://github.com/2ndQuadrant/audit-trigger and https://github.com/pgaudit/pgaudit. Would be useful both for enterprise customers, as well as keeping track of requests/responses per-account.

Related to #135.

ezekg commented 6 years ago

Note GDPR compliance.

ezekg commented 6 years ago
{
  “log”: {
    “bearer”: “{UUID}”,
    “method”: “POST”,
    “endpoint”: “/v1/accounts/foobar/licenses”,
    “ip”: “192.168.1.1”,
    “ua”: “python/requests”,
    “status”: 200,
    …
  }
}
ezekg commented 6 years ago

Good ref: https://gist.github.com/jugyo/300e93d6624375fe4ed8674451df4fe0

ezekg commented 6 years ago

https://ieftimov.com/writing-rails-middleware

ezekg commented 6 years ago

Marking as dup.