{"action":"created","issue":{"url":"https://api.github.com/repos/privacyidea/privacyidea/issues/780","repository_url":"https://api.github.com/repos/privacyidea/privacyidea","labels_url":"https://api.github.com/repos/privacyidea/privacyidea/issues/780/labels{/name}","comments_url":"https://api.github.com/repos/privacyidea/privacyidea/issues/780/comments","events_url":"https://api.github.com/repos/privacyidea/privacyidea/issues/780/events","html_url":"https://github.com/privacyidea/privacyidea/issues/780","id":256629456,"number":780,"title":"Audit log retention times for different log entries","user":{"login":"cornelinux","id":1908620,"avatar_url":"https://avatars1.githubusercontent.com/u/1908620?v=4","gravatar_id":"","url":"https://api.github.com/users/cornelinux","html_url":"https://github.com/cornelinux","followers_url":"https://api.github.com/users/cornelinux/followers","following_url":"https://api.github.com/users/cornelinux/following{/other_user}","gists_url":"https://api.github.com/users/cornelinux/gists{/gist_id}","starred_url":"https://api.github.com/users/cornelinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cornelinux/subscriptions","organizations_url":"https://api.github.com/users/cornelinux/orgs","repos_url":"https://api.github.com/users/cornelinux/repos","events_url":"https://api.github.com/users/cornelinux/events{/privacy}","received_events_url":"https://api.github.com/users/cornelinux/received_events","type":"User","site_admin":false},"labels":[{"id":104206893,"url":"https://api.github.com/repos/privacyidea/privacyidea/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":481361905,"url":"https://api.github.com/repos/privacyidea/privacyidea/labels/Topic:Audit","name":"Topic:Audit","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-11T08:59:50Z","updated_at":"2017-09-11T20:22:43Z","closed_at":null,"author_association":"OWNER","body":"Allow different retention times for different audit entries.\r\n\r\n    POST /token/init\r\n    DELETE /token\r\n\r\nmight be more important to keep for a looooong time, than ``GET /token``.\r\n\r\nSo the administrator should be able to define different retention times.\r\n\r\n## Approach 1: Expiration time in the audit table.\r\n\r\nAdd another db table column with the expiration date.\r\n\r\nProblem: We can not (easily) change this later.\r\n\r\n## Approach 2: Specify during rotation\r\n\r\nWe could add additional parameters to \"pi-manage rotate_audit\".\r\n\r\nOr we could add a switch like \"--config\" and use internal configuration on the rotation of the events:\r\n\r\n* default age\r\n* age per event...\r\n\r\nThen we would simply rotate according to the internal configuration and the ``pi-manage rotate_audit`` would trigger the rotation.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/privacyidea/privacyidea/issues/comments/328647537","html_url":"https://github.com/privacyidea/privacyidea/issues/780#issuecomment-328647537","issue_url":"https://api.github.com/repos/privacyidea/privacyidea/issues/780","id":328647537,"user":{"login":"cornelinux","id":1908620,"avatar_url":"https://avatars1.githubusercontent.com/u/1908620?v=4","gravatar_id":"","url":"https://api.github.com/users/cornelinux","html_url":"https://github.com/cornelinux","followers_url":"https://api.github.com/users/cornelinux/followers","following_url":"https://api.github.com/users/cornelinux/following{/other_user}","gists_url":"https://api.github.com/users/cornelinux/gists{/gist_id}","starred_url":"https://api.github.com/users/cornelinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cornelinux/subscriptions","organizations_url":"https://api.github.com/users/cornelinux/orgs","repos_url":"https://api.github.com/users/cornelinux/repos","events_url":"https://api.github.com/users/cornelinux/events{/privacy}","received_events_url":"https://api.github.com/users/cornelinux/received_events","type":"User","site_admin":false},"created_at":"2017-09-11T20:22:43Z","updated_at":"2017-09-11T20:22:43Z","author_association":"OWNER","body":"We could define the following rules with **approach 2**:\r\n\r\n| event | action | option |\r\n|---------|----------|----------|\r\n| GET token/* | time | 1y | \r\n| * | time | 1y  |\r\n| DELETE token/* |  time | 5y |\r\n| POST token/init | time | 8y |\r\n| POST audit/* | count | 100000/10000 |\r\n\r\n\"count\" could be a high watermark and a low watermark."}}
{"actor":{"display_login":"cornelinux"}}