Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement audit log #503

Merged
merged 1 commit into from
Aug 2, 2024
Merged

feat: implement audit log #503

merged 1 commit into from
Aug 2, 2024

Commits on Aug 2, 2024

  1. feat: implement audit log

    This PR implements audit logs. To enable it you have to set the `--audit-log-dir` flag
    to a directory where the audit logs will be stored. The audit logs are stored in a JSON format.
    
    Example:
    ```json
    {"event_type":"update","resource_type":"PublicKeys.omni.sidero.dev","event_ts":1722537710182,"event_data":{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36","ip_address":"<snip>","user_id":"a19a7a38-1793-4262-a9ef-97bc00c7a155","role":"Admin","email":"[email protected]","confirmation_type":"auth0","fingerprint":"15acb974f769bdccd38a4b28f282b78736b80bc7","public_key_expiration":1722565909}}
    ```
    
    Keep in mind that `event_ts` are in milliseconds instead of seconds.
    Field `event_data` contains all relevant information about the event.
    
    To enabled it in the development environment you will have to add the
    `--audit-log-dir /tmp/omni-data/audit-logs` line to `docker-compose.override.yml`
    or run `generate-certs` again.
    
    For siderolabs#37
    
    Signed-off-by: Dmitriy Matrenichev <[email protected]>
    DmitriyMV committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    d194d59 View commit details
    Browse the repository at this point in the history