aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcherednik <dcherednik@ydb.tech>2022-09-24 22:45:58 +0300
committerdcherednik <dcherednik@ydb.tech>2022-09-24 22:45:58 +0300
commit3299297793246023532c2fcd8e08baaaf7e1006a (patch)
tree927955955152ec0c06b7da0ebc96f0a9c24701cd
parent5db281b96a25fdced40fb6e21a00c2c501ad0662 (diff)
downloadydb-3299297793246023532c2fcd8e08baaaf7e1006a.tar.gz
Add gRpc request audit feature flag.
-rw-r--r--ydb/core/grpc_services/grpc_request_check_actor.h4
-rw-r--r--ydb/core/protos/config.proto1
-rw-r--r--ydb/core/testlib/basics/feature_flags.h1
3 files changed, 5 insertions, 1 deletions
diff --git a/ydb/core/grpc_services/grpc_request_check_actor.h b/ydb/core/grpc_services/grpc_request_check_actor.h
index 89dd8dc6139..c5bc34a83b2 100644
--- a/ydb/core/grpc_services/grpc_request_check_actor.h
+++ b/ydb/core/grpc_services/grpc_request_check_actor.h
@@ -111,7 +111,9 @@ public:
}
}
- AuditLog(GrpcRequestBaseCtx_, CheckedDatabaseName_, GetSubject(), ctx);
+ if (AppData(ctx)->FeatureFlags.GetEnableGrpcAudit()) {
+ AuditLog(GrpcRequestBaseCtx_, CheckedDatabaseName_, GetSubject(), ctx);
+ }
// Simple rps limitation
static NRpcService::TRlConfig rpsRlConfig(
diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto
index 68b84ff8efd..57b064c0c9e 100644
--- a/ydb/core/protos/config.proto
+++ b/ydb/core/protos/config.proto
@@ -715,6 +715,7 @@ message TFeatureFlags {
optional bool EnableFailureInjectionTermination = 71 [default = false];
optional bool EnableChunkLocking = 72 [default = false];
optional bool EnableNotNullDataColumns = 73 [default = false];
+ optional bool EnableGrpcAudit = 74 [default = false];
}
diff --git a/ydb/core/testlib/basics/feature_flags.h b/ydb/core/testlib/basics/feature_flags.h
index c512e2b5080..c1b2dc06b93 100644
--- a/ydb/core/testlib/basics/feature_flags.h
+++ b/ydb/core/testlib/basics/feature_flags.h
@@ -39,6 +39,7 @@ public:
FEATURE_FLAG_SETTER(EnablePredicateExtractForDataQueries)
FEATURE_FLAG_SETTER(EnableNotNullDataColumns)
FEATURE_FLAG_SETTER(EnableArrowFormatAtDatashard)
+ FEATURE_FLAG_SETTER(EnableGrpcAudit)
TDerived& SetEnableMvcc(std::optional<bool> value) {
if (value) {