@@ -149,15 +149,12 @@ void StartNameServer() {
149149 brpc::ServerOptions options;
150150 std::unique_ptr<openmldb::auth::UserAccessManager> user_access_manager;
151151 std::unique_ptr<openmldb::authn::BRPCAuthenticator> server_authenticator;
152- if (!FLAGS_skip_grant_tables) {
153- user_access_manager =
154- std::make_unique<openmldb::auth::UserAccessManager>(name_server->GetSystemTableIterator ());
155- server_authenticator = std::make_unique<openmldb::authn::BRPCAuthenticator>(
156- [&user_access_manager](const std::string& host, const std::string& username, const std::string& password) {
157- return user_access_manager->IsAuthenticated (host, username, password);
158- });
159- options.auth = server_authenticator.get ();
160- }
152+ user_access_manager = std::make_unique<openmldb::auth::UserAccessManager>(name_server->GetSystemTableIterator ());
153+ server_authenticator = std::make_unique<openmldb::authn::BRPCAuthenticator>(
154+ [&user_access_manager](const std::string& host, const std::string& username, const std::string& password) {
155+ return user_access_manager->IsAuthenticated (host, username, password);
156+ });
157+ options.auth = server_authenticator.get ();
161158
162159 options.num_threads = FLAGS_thread_pool_size;
163160 brpc::Server server;
@@ -259,14 +256,12 @@ void StartTablet() {
259256 std::unique_ptr<openmldb::auth::UserAccessManager> user_access_manager;
260257 std::unique_ptr<openmldb::authn::BRPCAuthenticator> server_authenticator;
261258
262- if (!FLAGS_skip_grant_tables) {
263- user_access_manager = std::make_unique<openmldb::auth::UserAccessManager>(tablet->GetSystemTableIterator ());
264- server_authenticator = std::make_unique<openmldb::authn::BRPCAuthenticator>(
265- [&user_access_manager](const std::string& host, const std::string& username, const std::string& password) {
266- return user_access_manager->IsAuthenticated (host, username, password);
267- });
268- options.auth = server_authenticator.get ();
269- }
259+ user_access_manager = std::make_unique<openmldb::auth::UserAccessManager>(tablet->GetSystemTableIterator ());
260+ server_authenticator = std::make_unique<openmldb::authn::BRPCAuthenticator>(
261+ [&user_access_manager](const std::string& host, const std::string& username, const std::string& password) {
262+ return user_access_manager->IsAuthenticated (host, username, password);
263+ });
264+ options.auth = server_authenticator.get ();
270265 options.num_threads = FLAGS_thread_pool_size;
271266 brpc::Server server;
272267 if (server.AddService (tablet, brpc::SERVER_DOESNT_OWN_SERVICE) != 0 ) {
0 commit comments