diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index 79837310ec4a..b4a9eee04cac 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -940,7 +940,10 @@ if (ThreadFuzzer::instance().isEffective()) updateLevels(*config, logger()); global_context->setClustersConfig(config, has_zookeeper); global_context->setMacros(std::make_unique(*config, "macros", log)); - global_context->setExternalAuthenticatorsConfig(*config); + + auto & access_control = global_context->getAccessControl(); + access_control.setExternalAuthenticatorsConfig(*config); + access_control.setRowPoliciesConfig(*config); global_context->loadOrReloadDictionaries(*config); global_context->loadOrReloadModels(*config); @@ -1069,6 +1072,7 @@ if (ThreadFuzzer::instance().isEffective()) auto & access_control = global_context->getAccessControl(); if (config().has("custom_settings_prefixes")) access_control.setCustomSettingsPrefixes(config().getString("custom_settings_prefixes")); + access_control.setRowPoliciesConfig(config()); /// Initialize access storages. try diff --git a/programs/server/config.xml b/programs/server/config.xml index def64607caf5..d09804baf040 100644 --- a/programs/server/config.xml +++ b/programs/server/config.xml @@ -559,6 +559,34 @@ default + + 1 + + + Whether the permissive row policies are always required to see any rows. + If the flag is 1 then if for some table only restrictive policies exist without permissive ones any user won't see any rows. + If the flag is 0 then in the above case each user will see rows chosen by applied restrictive policies. --> + 0 + + 0 + + + +