mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-22 15:52:13 +00:00
Add a dedicated auth::config struct that carries all configuration options needed by auth modules. The config is created per-shard using sharded_parameter to ensure updateable_value fields are shard-local. The config is stored as a member in auth::service and passed by const reference to factories so that each auth module can receive its configuration when constructed. The modules themselves are not yet converted — they still read from db::config via the query processor. The stored config is also used in describe_roles() to read the superuser name, eliminating the default_superuser() call that reached into db::config via the query processor. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
34 lines
770 B
C++
34 lines
770 B
C++
/*
|
|
* Copyright (C) 2026-present ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.1
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
#include <seastar/core/sstring.hh>
|
|
|
|
#include "utils/updateable_value.hh"
|
|
|
|
namespace auth {
|
|
|
|
struct config {
|
|
std::string auth_superuser_name;
|
|
std::string auth_superuser_salted_password;
|
|
seastar::sstring saslauthd_socket_path;
|
|
std::vector<std::unordered_map<seastar::sstring, seastar::sstring>> auth_certificate_role_queries;
|
|
seastar::sstring ldap_url_template;
|
|
seastar::sstring ldap_attr_role;
|
|
seastar::sstring ldap_bind_dn;
|
|
seastar::sstring ldap_bind_passwd;
|
|
utils::updateable_value<uint32_t> permissions_update_interval_in_ms;
|
|
};
|
|
|
|
}
|