-
Notifications
You must be signed in to change notification settings - Fork 38
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
Omni audit logs #37
Comments
Audit log retention: start with 30 days. User access: downloading all logs concatenated together. Events logged:
Fields:
Format: JSON Implementation ideas:
|
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 15, 2024
Using so-called phantom types we can use the types themselves as keys directly without loosing performance. You no longer need to remember which type was attached to the thing you passed in context and can look up all fields access directly. Part of siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 15, 2024
Using so-called phantom types we can use the types themselves as keys directly without loosing performance. You no longer need to remember which type was attached to the thing you passed in context and can look up all fields access directly. Part of siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 15, 2024
Using so-called phantom types we can use the types themselves as keys directly without loosing performance. You no longer need to remember which type was attached to the thing you passed in context and can look up all fields access directly. Part of siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 15, 2024
Using so-called phantom types we can use the types themselves as keys directly without loosing performance. You no longer need to remember which type was attached to the thing you passed in context and can look up all fields access directly. Part of siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 15, 2024
Using so-called phantom types we can use the types themselves as keys directly without loosing performance. You no longer need to remember which type was attached to the thing you passed in context and can look up all fields access directly. Part of siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 15, 2024
Using so-called phantom types we can use the types themselves as keys directly without loosing performance. You no longer need to remember which type was attached to the thing you passed in context and can look up all fields access directly. Part of siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 22, 2024
Adds rotating audit log writer. Also minor improvements. For siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 22, 2024
Adds rotating audit log writer. Also minor improvements. For siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 22, 2024
Adds rotating audit log writer. Also minor improvements. For siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 22, 2024
Adds rotating audit log writer. Also minor improvements. For siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 22, 2024
Adds rotating audit log writer. Also minor improvements. For siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 25, 2024
Adds rotating audit log writer. Also minor improvements. For siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 25, 2024
Adds rotating audit log writer. Also minor improvements. For siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Jul 25, 2024
Adds rotating audit log writer. Also minor improvements. For siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
DmitriyMV
added a commit
to DmitriyMV/omni
that referenced
this issue
Aug 1, 2024
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
added a commit
to DmitriyMV/omni
that referenced
this issue
Aug 1, 2024
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
added a commit
to DmitriyMV/omni
that referenced
this issue
Aug 2, 2024
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
added a commit
to DmitriyMV/omni
that referenced
this issue
Aug 2, 2024
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
added a commit
to DmitriyMV/omni
that referenced
this issue
Aug 2, 2024
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
added a commit
to DmitriyMV/omni
that referenced
this issue
Aug 2, 2024
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
added a commit
to DmitriyMV/omni
that referenced
this issue
Aug 12, 2024
This commit implements session tracking and log audit for those types: - [x] auth.PublicKey - [x] auth.AccessPolicy - [x] auth.User - [x] auth.Identity - [x] omni.Machine - [x] omni.MachineLabels - [x] omni.Cluster - [x] omni.MachineSet (only empty owners for update, log create and delete in all cases) - [x] omni.MachineSetNode (only empty owners for update, log create and delete in all cases) - [x] omni.ConfigPatch - [x] Talos API Access - [x] Kubernetes API access Output example: ``` {"event_type":"update","resource_type":"Machines.omni.sidero.dev","event_ts":1723137771180,"event_data":{"session":{"user_agent":"Omni-Internal-Agent"},"machine":{"id":"18cec051-d975-483d-8d43-10ac6421648a","is_connected":true,"management_address":"fdae:41e4:649b:9303:da9b:1ed:a725:c3dd","labels":{"omni.sidero.dev/address":"fdae:41e4:649b:9303:da9b:1ed:a725:c3dd"}}}} {"event_type":"update","resource_type":"Machines.omni.sidero.dev","event_ts":1723137771180,"event_data":{"session":{"user_agent":"Omni-Internal-Agent"},"machine":{"id":"18cec051-d975-483d-8d43-10ac6421648a","is_connected":true,"management_address":"fdae:41e4:649b:9303:da9b:1ed:a725:c3dd","labels":{"omni.sidero.dev/address":"fdae:41e4:649b:9303:da9b:1ed:a725:c3dd"}}}} {"event_type":"update","resource_type":"Machines.omni.sidero.dev","event_ts":1723137771181,"event_data":{"session":{"user_agent":"Omni-Internal-Agent"},"machine":{"id":"18cec051-d975-483d-8d43-10ac6421648a","is_connected":true,"management_address":"fdae:41e4:649b:9303:da9b:1ed:a725:c3dd","labels":{"omni.sidero.dev/address":"fdae:41e4:649b:9303:da9b:1ed:a725:c3dd"}}}} {"event_type":"create","resource_type":"MachineLabels.omni.sidero.dev","event_ts":1723137787549,"event_data":{"session":{"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":"ea002172-b9da-423f-bd1d-b443b8a7b43c","role":"Admin","email":"[email protected]","fingerprint":"da7b997eb68449a12bebc6a3bf4f59beaf167209"},"machine_labels":{"id":"18cec051-d975-483d-8d43-10ac6421648a","labels":{"222":""}}}} {"event_type":"update","resource_type":"MachineLabels.omni.sidero.dev","event_ts":1723137787553,"event_data":{"session":{"user_agent":"Omni-Internal-Agent"},"machine_labels":{"id":"18cec051-d975-483d-8d43-10ac6421648a","labels":{"222":""}}}} {"event_type":"update","resource_type":"MachineLabels.omni.sidero.dev","event_ts":1723137811532,"event_data":{"session":{"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":"ea002172-b9da-423f-bd1d-b443b8a7b43c","role":"Admin","email":"[email protected]","fingerprint":"da7b997eb68449a12bebc6a3bf4f59beaf167209"},"machine_labels":{"id":"18cec051-d975-483d-8d43-10ac6421648a","labels":{"222":"","333":""}}}} {"event_type":"update","resource_type":"MachineLabels.omni.sidero.dev","event_ts":1723137811610,"event_data":{"session":{"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":"ea002172-b9da-423f-bd1d-b443b8a7b43c","role":"Admin","email":"[email protected]","fingerprint":"da7b997eb68449a12bebc6a3bf4f59beaf167209"},"machine_labels":{"id":"18cec051-d975-483d-8d43-10ac6421648a","labels":{"222":"","333":""}}}} {"event_type":"update","resource_type":"MachineLabels.omni.sidero.dev","event_ts":1723137811611,"event_data":{"session":{"user_agent":"Omni-Internal-Agent"},"machine_labels":{"id":"18cec051-d975-483d-8d43-10ac6421648a","labels":{"222":"","333":""}}}} {"event_type":"destroy","resource_type":"MachineLabels.omni.sidero.dev","event_ts":1723137811621,"event_data":{"session":{"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":"ea002172-b9da-423f-bd1d-b443b8a7b43c","role":"Admin","email":"[email protected]","fingerprint":"da7b997eb68449a12bebc6a3bf4f59beaf167209"},"machine_labels":{"id":"18cec051-d975-483d-8d43-10ac6421648a","labels":{"222":"","333":""}}}} {"event_type":"create","resource_type":"Users.omni.sidero.dev","event_ts":1723141793888,"event_data":{"new_user":{"role":"Admin","id":"7903a72c-87af-43b8-94dc-82bd961ab768"},"session":{"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":"ea002172-b9da-423f-bd1d-b443b8a7b43c","role":"Admin","email":"[email protected]","fingerprint":"da7b997eb68449a12bebc6a3bf4f59beaf167209"}}} {"event_type":"create","resource_type":"Identities.omni.sidero.dev","event_ts":1723141793981,"event_data":{"new_user":{"id":"7903a72c-87af-43b8-94dc-82bd961ab768","email":"[email protected]"},"session":{"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":"ea002172-b9da-423f-bd1d-b443b8a7b43c","role":"Admin","email":"[email protected]","fingerprint":"da7b997eb68449a12bebc6a3bf4f59beaf167209"}}} ``` Closes siderolabs#37 Signed-off-by: Dmitriy Matrenichev <[email protected]>
12 tasks
Finally closed in https://github.com/siderolabs/omni-controller/pull/144 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Omni needs to have an audit log accessible in the UI for any action that changes configurations, whether by omnictl or the UI.
I'd suggest different labels for actions affecting Omni (user additions/deletions/role changes etc), Clusters and Machines.
For machines, things like user initiated reboots, or deletions, as well as changes to patches and machine configs, need to be logged.
Update 2024-08-12 Implementation status and tasks
Remaining steps
The text was updated successfully, but these errors were encountered: