Skip to content

auditlog: add exports/imports #8550

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

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

ijon
Copy link
Collaborator

@ijon ijon commented Aug 30, 2024

Add audit logging for (database/tables) export and import operations.

Cancel/Forget requests for export/imports are still not audit logged.

KIKIMR-21797

Changelog entry

Add audit logging for (database/tables) export and import operations.

Changelog category

  • Improvement

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@ijon ijon force-pushed the auditlog-add-database-export-import branch from cedfab5 to ce4635e Compare September 2, 2024 15:46

This comment was marked as outdated.

This comment was marked as outdated.

Add audit logging for (database/tables) export and import operations.

Export/import cancel/forget requests are still not logged.

KIKIMR-21797
@ijon ijon force-pushed the auditlog-add-database-export-import branch from ce4635e to bb6235c Compare September 2, 2024 16:00

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

Comment on lines -247 to 246
static TString GetUid(const google::protobuf::Map<TString, TString>& labels) {
auto it = labels.find("uid");
if (it == labels.end()) {
return TString();
}

return it->second;
return true;
}
Copy link
Collaborator Author

@ijon ijon Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetUid has moved to schemeshard_xxport__helpers.*

Comment on lines -83 to -88
NAudit::TAuditLogBackends CreateTestAuditLogBackends(std::vector<std::string>& buffer) {
NAudit::TAuditLogBackends logBackends;
logBackends[NKikimrConfig::TAuditConfig::TXT].emplace_back(new TMemoryLogBackend(buffer));
return logBackends;
}

Copy link
Collaborator Author

@ijon ijon Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CreateTestAuditLogBackends() moved to ut_helpers/auditlog_helpers.*

- rename `tx_id` to `id`
- rename `export_uid` to `uid`
- add testing for `uid`
- add additional parts for export to yt

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

Copy link

github-actions bot commented Sep 3, 2024

2024-09-03 11:09:49 UTC Pre-commit check linux-x86_64-release-clang14 for 6e85fee has started.
2024-09-03 11:12:55 UTC ya make is running...
🟢 2024-09-03 11:19:35 UTC Build successful.

Copy link

github-actions bot commented Sep 3, 2024

2024-09-03 11:09:52 UTC Pre-commit check linux-x86_64-relwithdebinfo for 6e85fee has started.
2024-09-03 11:12:58 UTC ya make is running...
🟡 2024-09-03 12:23:14 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
40730 35294 0 6 5406 24

2024-09-03 12:26:51 UTC ya make is running... (failed tests rerun, try 2)
🟢 2024-09-03 12:36:43 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
42 (only retried tests) 22 0 0 0 20

🟢 2024-09-03 12:36:50 UTC Build successful.
🟡 2024-09-03 12:37:24 UTC ydbd size 8.3 GiB changed* by +466.5 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 199ba9d merge: 6e85fee diff diff %
ydbd size 8 917 968 560 Bytes 8 918 446 240 Bytes +466.5 KiB +0.005%
ydbd stripped size 481 779 912 Bytes 481 810 472 Bytes +29.8 KiB +0.006%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Sep 3, 2024

2024-09-03 11:10:05 UTC Pre-commit check linux-x86_64-release-asan for 6e85fee has started.
2024-09-03 11:13:42 UTC ya make is running...
🔴 2024-09-03 13:02:07 UTC Some tests failed, follow the links below.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
11493 11380 0 38 38 37

🟢 2024-09-03 13:03:09 UTC Build successful.
🟡 2024-09-03 13:03:50 UTC ydbd size 5.5 GiB changed* by +575.0 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 199ba9d merge: 6e85fee diff diff %
ydbd size 5 954 133 800 Bytes 5 954 722 584 Bytes +575.0 KiB +0.010%
ydbd stripped size 1 489 375 920 Bytes 1 489 479 248 Bytes +100.9 KiB +0.007%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@ijon ijon requested a review from molotkov-and September 3, 2024 11:47
@ijon ijon merged commit a418278 into ydb-platform:main Sep 3, 2024
10 of 12 checks passed
@ijon ijon deleted the auditlog-add-database-export-import branch September 3, 2024 13:47
KirillKurdyukov pushed a commit to KirillKurdyukov/ydb that referenced this pull request Sep 4, 2024
Add audit logging for (database/tables) export and import operations.

Export/import cancel/forget requests are still not logged.

KIKIMR-21797
ijon added a commit to ijon/ydb that referenced this pull request Sep 4, 2024
Add audit logging for (database/tables) export and import operations.

Export/import cancel/forget requests are still not logged.

KIKIMR-21797
ijon added a commit to ijon/ydb that referenced this pull request Sep 4, 2024
Add audit logging for (database/tables) export and import operations.

Export/import cancel/forget requests are still not logged.

KIKIMR-21797
ijon added a commit to ijon/ydb that referenced this pull request Sep 4, 2024
Add audit logging for (database/tables) export and import operations.

Export/import cancel/forget requests are still not logged.

KIKIMR-21797
ijon added a commit to ijon/ydb that referenced this pull request Sep 4, 2024
Add audit logging for (database/tables) export and import operations.

Export/import cancel/forget requests are still not logged.

KIKIMR-21797
ijon added a commit that referenced this pull request Sep 5, 2024
Add audit logging for (database/tables) export and import operations.

Cancel/Forget requests for export/imports are still not audit logged.

KIKIMR-21797

merge #8550 (a418278) from `main`.
ijon added a commit that referenced this pull request Sep 5, 2024
Add audit logging for (database/tables) export and import operations.

Cancel/Forget requests for export/imports are still not audit logged.

KIKIMR-21797

merge #8550 (a418278) from `main`.
spuchin pushed a commit to spuchin/ydb that referenced this pull request Sep 9, 2024
Add audit logging for (database/tables) export and import operations.

Cancel/Forget requests for export/imports are still not audit logged.

KIKIMR-21797

merge ydb-platform#8550 (a418278) from `main`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants