-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add Organizational event logging feature #2868
Conversation
a0e4ef6
to
090fb86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks like a good start, I think we should provide a way to disable event logging for those who aren't interested in the functionality, though.
Other than that seems like we're going to have to add a lot of event logging calls for all the available EventTypes (all of them except UserClient* and CipherClient* which are collected and sent from the client it seems)
57ddaf1
to
22b5dad
Compare
838fc63
to
dd6faa2
Compare
Ok, I have made some larger updates now. It would be really cool if some other longtime contributors also check this PR and give there comments where needed 😄 (hinting @dani-garcia & @jjlin mostly, but others are also welcome, the more the better). Some items you can disregard upfront (Since i will remove these from this PR):
I also want to check if i can just have one The items not yet checked above are still on the ToDo list, all other items should be there (and if you think otherwise, please point them out). Thanks in advance! |
3ae78be
to
963dbb7
Compare
f3a8363
to
88167c4
Compare
Checking Bitwarden and the events (https://bitwarden.com/help/event-logs/#what-are-event-logs) it looks like they keep the events indefinitely. I still tend to add a job to clean-up. But maybe we need to disable it by default? |
3cd40a4
to
9aa6159
Compare
9aa6159
to
bdc1cd1
Compare
8ef4ce0
to
1e20761
Compare
I Think this PR is ready for review. Please provide your comments. |
Can I test this feature on my docker installation? How? |
There is no image yet for this. If you really want I can build an image. But I would at least recommend to create a backup of the database before starting it. If you want, let me know which image type, arch (x86_64, armv7) and base (Debian or Alpine). |
I have a fresh installation for my organisation and this feature would be great for me. |
If you dare, I have build the images locally and pushed them to my Docker Hub. See: https://hub.docker.com/r/blackdex/vaultwarden/tags |
I risk it with enthusiasm, I try it right away. |
I have pull a new image and recreate the container but the log list dont appears, what am I doing wrong? |
You need to enable it. It is disabled by default. Lines 84 to 87 in 1e20761
|
You are a man!! Works great! Thank you so much 👍 |
I'll test this as well with a clone of my production setup. |
1e20761
to
8305ea9
Compare
This PR adds event/audit logging support for organizations. By default this feature is disabled, since it does log a lot and adds extra database transactions. All events are touched except a few, since we do not support those features (yet), like SSO for example. This feature is tested with multiple clients and all database types. Fixes dani-garcia#229
8305ea9
to
2ea9b66
Compare
Hi, can I go back to the "latest" version without risk? Thank you |
Yes you can, but as always, create a backup. |
ORG_EVENTS_ENABLED=true seems not to work fo me. |
It should work just fine. Those are read-only config items, which should work, and are not stored within the Check the admin setting under the read-only section. |
This PR adds event/audit logging support for organizations.
By default this feature is disabled, since it does log a lot and adds
extra database transactions.
All events are touched except a few, since we do not support those
features (yet), like SSO for example.
This feature is tested with multiple clients and all database types.
Fixes #229
Checklist:
User ✔️
UserUpdatedTempPasswordUserMigratedKeyToKeyConnectorCipher ✔️
Collection ✔️
Group ✔️
Org User ✔️
OrganizationUserUnlinkedSsoOrganizationUserResetPasswordEnrollOrganizationUserResetPasswordWithdrawOrganizationUserAdminResetPasswordOrganizationUserResetSsoLinkOrganizationUserFirstSsoLoginOrganization ✔️
OrganizationVaultAccessedOrganizationEnabledSsoOrganizationDisabledSsoOrganizationEnabledKeyConnectorOrganizationDisabledKeyConnectorOrganizationSponsorshipsSyncedMisc: