7#ifndef HTTP_COMMAND_CONFIG_H
8#define HTTP_COMMAND_CONFIG_H
36 return (socket_type_);
43 socket_type_ = socket_type;
50 return (socket_address_);
57 socket_address_ = socket_address;
64 return (socket_port_);
71 socket_port_ = socket_port;
78 return (http_headers_);
85 http_headers_ = headers;
94 return (auth_config_);
103 auth_config_ = auth_config;
110 return (trust_anchor_);
154 return (cert_required_);
162 cert_required_ = required;
171 return (emulate_agent_response_);
178 emulate_agent_response_ = emulate_agent_response;
199 void checkTlsSetup(
bool require_tls)
const;
202 std::string socket_type_;
208 uint16_t socket_port_;
217 std::string trust_anchor_;
220 std::string cert_file_;
223 std::string key_file_;
229 bool emulate_agent_response_;
The IOAddress class represents an IP addresses (version agnostic)
HTTP command config aka HTTP control socket info class.
virtual isc::data::ElementPtr toElement() const
Unparse a configuration object.
bool getEmulateAgentResponse() const
Returns emulate agent response flag.
static std::string DEFAULT_AUTHENTICATION_REALM
Default HTTP authentication realm.
uint16_t getSocketPort() const
Returns socket port.
void setEmulateAgentResponse(const bool emulate_agent_response)
Sets emulate agent response flag.
~HttpCommandConfig()=default
Virtual destructor.
const isc::http::CfgHttpHeaders & getHttpHeaders() const
Returns http-headers configuration.
void setTrustAnchor(const std::string &ca)
Sets trust-anchor TLS parameter.
std::string getSocketType() const
Returns socket type.
static isc::asiolink::IOAddress DEFAULT_SOCKET_ADDRESS
Default socket address (127.0.0.1).
void setCertRequired(bool required)
Sets cert-required TLS parameter.
const isc::http::HttpAuthConfigPtr & getAuthConfig() const
Returns HTTP authentication configuration.
static uint16_t DEFAULT_SOCKET_PORT
Default socket port.
std::string getCertFile() const
Returns cert-file TLS parameter.
std::string getTrustAnchor() const
Returns trust-anchor TLS parameter.
void setAuthConfig(const isc::http::HttpAuthConfigPtr &auth_config)
Sets HTTP authentication configuration.
isc::asiolink::IOAddress getSocketAddress() const
Returns socket address.
HttpCommandConfig(isc::data::ConstElementPtr config)
Constructor.
void setSocketAddress(const isc::asiolink::IOAddress &socket_address)
Sets socket address.
void setKeyFile(const std::string &key)
Sets key-file TLS parameter.
void setCertFile(const std::string &cert)
Sets cert-file TLS parameter.
void setHttpHeaders(const isc::http::CfgHttpHeaders &headers)
Sets http-headers configuration.
std::string getKeyFile() const
Returns key-file TLS parameter.
void setSocketType(const std::string &socket_type)
Sets socket type.
bool getCertRequired() const
Returns cert-required TLS parameter.
void setSocketPort(const uint16_t socket_port)
Sets socket port.
boost::shared_ptr< HttpSocketInfo > HttpSocketInfoPtr
Pointer to a HttpSocketInfo object.
boost::shared_ptr< HttpCommandConfig > HttpCommandConfigPtr
Pointer to a HttpCommandConfig object.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< HttpAuthConfig > HttpAuthConfigPtr
Type of shared pointers to HTTP authentication configuration.
boost::shared_ptr< HttpListener > HttpListenerPtr
Pointer to the HttpListener.
std::vector< CfgHttpHeader > CfgHttpHeaders
Collection of config HTTP headers.
Defines the logger used by the top-level component of kea-lfc.
Structure used to store HTTP/HTTPS connection data.
HttpCommandConfigPtr config_
Pointer to the socket config.
bool usable_
Flag which indicates if socket can be reused.
HttpSocketInfo()
Constructor.
~HttpSocketInfo()=default
Destructor.
isc::http::HttpListenerPtr listener_
Pointer to HTTP/HTTPS listener.
Abstract class for configuration Cfg_* classes.
Base class for user context.