mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-05 15:21:43 +00:00
7f47719768
Simplify LDAPClient and LDAPAccessStorage
78 lines
1.3 KiB
C++
78 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <common/types.h>
|
|
|
|
#include <chrono>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
struct LDAPServerParams
|
|
{
|
|
enum class ProtocolVersion
|
|
{
|
|
V2,
|
|
V3
|
|
};
|
|
|
|
enum class TLSEnable
|
|
{
|
|
NO,
|
|
YES_STARTTLS,
|
|
YES
|
|
};
|
|
|
|
enum class TLSProtocolVersion
|
|
{
|
|
SSL2,
|
|
SSL3,
|
|
TLS1_0,
|
|
TLS1_1,
|
|
TLS1_2
|
|
};
|
|
|
|
enum class TLSRequireCert
|
|
{
|
|
NEVER,
|
|
ALLOW,
|
|
TRY,
|
|
DEMAND
|
|
};
|
|
|
|
enum class SASLMechanism
|
|
{
|
|
UNKNOWN,
|
|
SIMPLE
|
|
};
|
|
|
|
ProtocolVersion protocol_version = ProtocolVersion::V3;
|
|
|
|
String host;
|
|
std::uint16_t port = 636;
|
|
|
|
TLSEnable enable_tls = TLSEnable::YES;
|
|
TLSProtocolVersion tls_minimum_protocol_version = TLSProtocolVersion::TLS1_2;
|
|
TLSRequireCert tls_require_cert = TLSRequireCert::DEMAND;
|
|
String tls_cert_file;
|
|
String tls_key_file;
|
|
String tls_ca_cert_file;
|
|
String tls_ca_cert_dir;
|
|
String tls_cipher_suite;
|
|
|
|
SASLMechanism sasl_mechanism = SASLMechanism::SIMPLE;
|
|
|
|
String auth_dn_prefix;
|
|
String auth_dn_suffix;
|
|
|
|
String user;
|
|
String password;
|
|
|
|
std::chrono::seconds operation_timeout{40};
|
|
std::chrono::seconds network_timeout{30};
|
|
std::chrono::seconds search_timeout{20};
|
|
std::uint32_t search_limit = 100;
|
|
};
|
|
|
|
}
|