Uploaded image for project: 'Community Linux Engineering'
  1. Community Linux Engineering
  2. CLE-789

Add admin changes auditing

XMLWordPrintable

    • rhel-cle-nexus

      If one of creators or admins change an event, we currently have no audit log about it (or do we, is there something in the app logs?). That might be a problem if one of accounts get compromised, weird things start happening, and we don't know which one.

      The idea is that we would log at least the major changes that are done for events. This would include:
      1. Creating an event
      2. Modifying an event - which fields were adjusted
      3. Modifying users - which users were touched

      I don't think we support event deletion, so I think this is all. Say if you think of anything else.

      This would not only go to app log, but also to an internal audit db table, so that it's accessible permanently and can be displayed in the admin interface as well. The included data could look something like:
      ```
      <timestamp> | <FAS ID of the author> | <change type> | <changed object - event ID or user ID > | <changed fields>
      ```
      So e.g. for creating testday ID 13, then editing some fields of it, and then modifying the role of user ID 76 it would contain:
      ```
      2025-09-03T15:47:02+0 | kparal | testday_create | 13 | |
      2025-09-03T15:53:36+0 | kparal | testday_modify | 13 | name, start, format |
      2025-09-10T07:11:08+0 | kparal | user_modify | 76 | role |
      ```

      In the admin interface, we could have then an Audit log page, where this would be listed, ideally in some readable manner:
      ```
      2025-09-03 15:47:02 UTC: kparal created testday 13 <link>
      2025-09-03 15:53:36 UTC: kparal modified testday 13 <link> editing fields "name, start, format"
      2025-09-10 07:11:08 UTC: kparal modified user 76 (FAS: lruzicka) editing fields "role"
      ```

              Unassigned Unassigned
              cle_bot CLE bot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: