-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Audit logs #5646
Merged
Merged
Audit logs #5646
Changes from 77 commits
Commits
Show all changes
81 commits
Select commit
Hold shift + click to select a range
69fc71d
added initail version of clickhouse based analytics
azhavoro 085d111
update image
azhavoro a683ecc
revert change
azhavoro b48011e
Merge remote-tracking branch 'origin/develop' into az/audit_logs
azhavoro 5d303a6
linter
azhavoro a6bdde7
linter
azhavoro de61804
removed Grafana dockerfile
azhavoro 7c39b96
fix csv downloading
azhavoro e3900aa
used UUID for query ID
azhavoro 6996263
added more dashboards
azhavoro 201c867
added user activity table
azhavoro 76464b0
updated rego rules
azhavoro 069b3b6
delete JobCommit
azhavoro 1d439e2
updated grafana dashboards
azhavoro ecbe706
deprecate old services
azhavoro e766e02
fix docker compose
azhavoro fb57f44
update documentation
azhavoro 5733bbf
minor refactoring
azhavoro 9240bf5
update rules
azhavoro 227fb48
logs -> events
azhavoro ec12b71
fix
azhavoro 5522b04
fixed import
azhavoro ec5e62d
Merge remote-tracking branch 'develop' into az/audit_logs
azhavoro f34a622
t
azhavoro a16795f
t
azhavoro bc72b22
fix model
azhavoro c133070
linter
azhavoro 15e5fd7
fix remark
azhavoro 66ba85f
t
azhavoro b718845
try to build images without cache
sizov-kirill 4427bbe
update OPA csv file
azhavoro e619f78
Merge branch 'az/audit_logs' of github.com:opencv/cvat into az/audit_…
azhavoro aa555b2
fix unit tests
azhavoro 04d4b00
update vector config
azhavoro 92cf339
fixed comments
azhavoro 625b318
Merge remote-tracking branch 'develop' into az/audit_logs
azhavoro 6b8b737
update worker_import compose config
azhavoro 7798ace
fixed worker logs
azhavoro 397a861
added ant-btn logging logic
klakhov 1c6e554
wip
azhavoro f137741
code refactoring
azhavoro 1a8a69f
Merge remote-tracking branch 'develop' into az/audit_logs
azhavoro a8b7e16
apply comments part 1
azhavoro 0a5d1df
apply comments part 2
azhavoro 56327c1
remove clogger
azhavoro ff473bd
apply comments part 3
azhavoro da42cca
apply comments part 4
azhavoro 865922c
added log class
klakhov 177e876
apply comments part 5
azhavoro 7987e5e
fix
azhavoro 4850aac
fix
azhavoro 372f8dc
add filtering through the iam for the events endpoint
sizov-kirill 3793b53
remove rules for events from server.rego
sizov-kirill ffdf143
remove rules for events from server.csv
sizov-kirill cebdc39
add newline
sizov-kirill 9eb3111
Merge remote-tracking branch 'origin/az/audit_logs' into az/audit_logs
azhavoro b7cf15d
return 403 when non-admin user try to get events of other user in san…
sizov-kirill 118173a
fix typo
sizov-kirill 8e0c956
change minimal allowed privilege from USER to WORKER
sizov-kirill 647b2e5
add events.csv and opa test scipt generator for events
sizov-kirill 51e9459
Merge remote-tracking branch 'origin/sk/add-opa-filters-for-events' i…
azhavoro e1a2027
rename
azhavoro 21c4f61
fix
azhavoro 8c3ce8e
Merge remote-tracking branch 'origin/develop' into az/audit_logs
azhavoro 3174af1
fix perm
azhavoro d41bfd5
fix
azhavoro ba1cdd8
fix test data, minor improvements
azhavoro 0fc276d
remove SEND_EXCEPTION from server.rego
sizov-kirill a103778
added Active users panel, disable debug messages
azhavoro 1b017b0
fix duration
azhavoro e324432
Merge branch 'az/audit_logs' of github.com:opencv/cvat into az/audit_…
azhavoro 8a86d17
minor code changes
bsekachev 346fb49
remove analytics/deprecated
azhavoro f014890
added user_name, user_email, org_slug fields
azhavoro 0ca4195
Merge branch 'az/audit_logs' of github.com:opencv/cvat into az/audit_…
azhavoro 6a07b98
fix timestamp for server update event
azhavoro 6ddfbf2
comments
azhavoro 97f1971
fix queue
azhavoro 28485c8
updated changelog
azhavoro 30aee83
v8.2.0
azhavoro 5f24fe3
v1.49.0
azhavoro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
CLICKHOUSE_DB="${CLICKHOUSE_DB:-cvat}"; | ||
CLICKHOUSE_USER="${CLICKHOUSE_USER:-user}"; | ||
CLICKHOUSE_PASSWORD="${CLICKHOUSE_PASSWORD:-password}"; | ||
|
||
cat <<EOT > /etc/clickhouse-server/users.d/user.xml | ||
<yandex> | ||
<!-- Docs: <https://clickhouse.tech/docs/en/operations/settings/settings_users/> --> | ||
<users> | ||
<${CLICKHOUSE_USER}> | ||
<profile>default</profile> | ||
<networks> | ||
<ip>::/0</ip> | ||
</networks> | ||
<password>${CLICKHOUSE_PASSWORD}</password> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, do we need to check the value? What if contains |
||
<quota>default</quota> | ||
</${CLICKHOUSE_USER}> | ||
</users> | ||
</yandex> | ||
EOT | ||
|
||
clickhouse-client --query "CREATE DATABASE IF NOT EXISTS ${CLICKHOUSE_DB}"; | ||
|
||
echo " | ||
CREATE TABLE IF NOT EXISTS ${CLICKHOUSE_DB}.events | ||
( | ||
\`scope\` String NOT NULL, | ||
\`obj_name\` String NULL, | ||
\`obj_id\` UInt64 NULL, | ||
\`obj_val\` String NULL, | ||
\`source\` String NOT NULL, | ||
\`timestamp\` DateTime64(3, 'Etc/UTC') NOT NULL, | ||
\`count\` UInt16 NULL, | ||
\`duration\` UInt32 DEFAULT toUInt32(0), | ||
\`project_id\` UInt64 NULL, | ||
\`task_id\` UInt64 NULL, | ||
\`job_id\` UInt64 NULL, | ||
\`user_id\` UInt64 NULL, | ||
\`user_name\` String NULL, | ||
\`user_email\` String NULL, | ||
\`org_id\` UInt64 NULL, | ||
\`org_slug\` String NULL, | ||
\`payload\` String NULL | ||
) | ||
ENGINE = MergeTree | ||
PARTITION BY toYYYYMM(timestamp) | ||
ORDER BY (timestamp) | ||
SETTINGS index_granularity = 8192 | ||
;" | clickhouse-client |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Probably it is necessary to check that CLICKHOUSE_USER value without spaces and special symbols.