Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Production: Audit logs #10

Open
blackandred opened this issue Jun 6, 2020 · 3 comments
Open

Production: Audit logs #10

blackandred opened this issue Jun 6, 2020 · 3 comments
Labels
FEATURE New feature or request Required by Harbor RiotKit's Harbor release dependency
Milestone

Comments

@blackandred
Copy link
Contributor

blackandred commented Jun 6, 2020

The idea:
I think that on production it would be nice to have audit logs of all operations performed in RKD (when eg. RKD_AUDIT_LOG=true).

Why?

  • Increase transparency of administrators operations (knowledge who to ask for help, when his/her changes broken something)
  • In emergency cases the administrator can lookup what happened really
  • In automated deployment with Ansible in Harbor it can be possible to see what failed during Ansible run

Proposed solution:
When RKD_AUDIT_LOG=true in .env is present, then log every command to a log file eg. .rkd/audit-log-2020-05-01.log in a format, example:

[Y-m-d H:i:s] [commit] [SUDO_USER if any else current user] command
[2020-05-01 08:41:31] [9f990a2] [tech.admin] rkd :harbor:service:up --name iwa_ait_api --strategy rolling
[2020-05-01 08:45:00] [9f990a2] [tech.admin] rkd :harbor:gateway:reload :harbor:ssl:reload

Potential issues:
Passwords leaking - user must be aware of the risk, documentation should inform about this

@blackandred blackandred added the FEATURE New feature or request label Jun 6, 2020
@blackandred
Copy link
Contributor Author

blackandred commented Jun 6, 2020

In next stages audit log can also catch events of started/stopped/killed/failed containers (can be handled by Harbor - not as part of RKD of course)

@blackandred
Copy link
Contributor Author

Idea: An output of each task could be always logged in to files (file per task per execution time for example) when audit log is enabled

blackandred added a commit that referenced this issue Jun 11, 2020
blackandred added a commit that referenced this issue Jun 11, 2020
blackandred added a commit that referenced this issue Jun 11, 2020
blackandred added a commit that referenced this issue Jun 11, 2020
@blackandred blackandred added the Required by Harbor RiotKit's Harbor release dependency label Jun 12, 2020
@blackandred
Copy link
Contributor Author

Partially implemented for RKD 1.0, moving to RKD 1.1, cannot afford for so many tasks to release.

@blackandred blackandred modified the milestones: RKD 2.0, RKD 2.1 Jul 21, 2020
@blackandred blackandred modified the milestones: RKD 2.1, RKD 2.2, RKD 2.3 Aug 12, 2020
@blackandred blackandred modified the milestones: RKD 2.3, RKD 2.4 Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FEATURE New feature or request Required by Harbor RiotKit's Harbor release dependency
Projects
None yet
Development

No branches or pull requests

1 participant