![]() |
Kea 3.2.1-git
|
HTTP command config aka HTTP control socket info class. More...
#include <http_command_config.h>
Public Member Functions | |
| HttpCommandConfig (isc::data::ConstElementPtr config) | |
| Constructor. | |
| ~HttpCommandConfig ()=default | |
| Virtual destructor. | |
| const isc::http::HttpAuthConfigPtr & | getAuthConfig () const |
| Returns HTTP authentication configuration. | |
| std::string | getCertFile () const |
| Returns cert-file TLS parameter. | |
| bool | getCertRequired () const |
| Returns cert-required TLS parameter. | |
| const isc::http::CfgHttpHeaders & | getHttpHeaders () const |
| Returns http-headers configuration. | |
| std::string | getKeyFile () const |
| Returns key-file TLS parameter. | |
| isc::asiolink::IOAddress | getSocketAddress () const |
| Returns socket address. | |
| uint16_t | getSocketPort () const |
| Returns socket port. | |
| std::string | getSocketType () const |
| Returns socket type. | |
| std::string | getTrustAnchor () const |
| Returns trust-anchor TLS parameter. | |
| void | setAuthConfig (const isc::http::HttpAuthConfigPtr &auth_config) |
| Sets HTTP authentication configuration. | |
| void | setCertFile (const std::string &cert) |
| Sets cert-file TLS parameter. | |
| void | setCertRequired (bool required) |
| Sets cert-required TLS parameter. | |
| void | setHttpHeaders (const isc::http::CfgHttpHeaders &headers) |
| Sets http-headers configuration. | |
| void | setKeyFile (const std::string &key) |
| Sets key-file TLS parameter. | |
| void | setSocketAddress (const isc::asiolink::IOAddress &socket_address) |
| Sets socket address. | |
| void | setSocketPort (const uint16_t socket_port) |
| Sets socket port. | |
| void | setSocketType (const std::string &socket_type) |
| Sets socket type. | |
| void | setTrustAnchor (const std::string &ca) |
| Sets trust-anchor TLS parameter. | |
| virtual isc::data::ElementPtr | toElement () const |
| Unparse a configuration object. | |
| Public Member Functions inherited from isc::data::UserContext | |
| void | contextToElement (data::ElementPtr map) const |
| Merge unparse a user_context object. | |
| data::ConstElementPtr | getContext () const |
| Returns const pointer to the user context. | |
| void | setContext (const data::ConstElementPtr &ctx) |
| Sets user context. | |
| Public Member Functions inherited from isc::data::CfgToElement | |
| virtual | ~CfgToElement () |
| Destructor. | |
Static Public Attributes | |
| static std::string | DEFAULT_AUTHENTICATION_REALM = "" |
| Default HTTP authentication realm. | |
| static isc::asiolink::IOAddress | DEFAULT_SOCKET_ADDRESS = IOAddress("127.0.0.1") |
| Default socket address (127.0.0.1). | |
| static uint16_t | DEFAULT_SOCKET_PORT = 8000 |
| Default socket port. | |
| static bool | EMULATE_AGENT_RESPONSE = true |
| Emulation flag. | |
| static std::string | SUPPORTED_SERVICE = "" |
| Supported service. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from isc::data::UserContext | |
| static data::ElementPtr | toElement (data::ConstElementPtr map) |
| Copy an Element map. | |
| Protected Attributes inherited from isc::data::UserContext | |
| data::ConstElementPtr | user_context_ |
| Pointer to the user context (may be NULL). | |
HTTP command config aka HTTP control socket info class.
Definition at line 21 of file http_command_config.h.
| isc::config::HttpCommandConfig::HttpCommandConfig | ( | isc::data::ConstElementPtr | config | ) |
Constructor.
| config | Pointer to the configuration to parse. |
Definition at line 39 of file http_command_config.cc.
References isc::asiolink::IOAddress::IOAddress(), Element::boolean, isc::config::COMMAND_HTTP_SOCKET_SECURITY_WARNING, isc::config::command_logger, Element::create(), DEFAULT_AUTHENTICATION_REALM, DEFAULT_SOCKET_ADDRESS, DEFAULT_SOCKET_PORT, if(), Element::integer, isc_throw, LOG_WARN, Element::map, isc::http::parseCfgHttpHeaders(), isc::data::UserContext::setContext(), isc::util::file::PathChecker::shouldEnforceSecurity(), and Element::string.
Referenced by isc::config::HttpCommandMgrImpl::openCommandSocket().
|
default |
Virtual destructor.
|
inline |
Returns HTTP authentication configuration.
Definition at line 93 of file http_command_config.h.
|
inline |
Returns cert-file TLS parameter.
Definition at line 124 of file http_command_config.h.
|
inline |
Returns cert-required TLS parameter.
Definition at line 153 of file http_command_config.h.
|
inline |
Returns http-headers configuration.
Definition at line 77 of file http_command_config.h.
|
inline |
Returns key-file TLS parameter.
Definition at line 138 of file http_command_config.h.
|
inline |
Returns socket address.
Definition at line 49 of file http_command_config.h.
|
inline |
Returns socket port.
Definition at line 63 of file http_command_config.h.
|
inline |
Returns socket type.
Definition at line 35 of file http_command_config.h.
|
inline |
Returns trust-anchor TLS parameter.
Definition at line 109 of file http_command_config.h.
|
inline |
Sets HTTP authentication configuration.
| auth_config | HTTP authentication configuration. |
Definition at line 102 of file http_command_config.h.
|
inline |
Sets cert-file TLS parameter.
| cert | Server certificate file name. |
Definition at line 131 of file http_command_config.h.
|
inline |
Sets cert-required TLS parameter.
| required | Client certificates are required when true (the default) or optional when false. |
Definition at line 161 of file http_command_config.h.
|
inline |
Sets http-headers configuration.
| headers | Collection of config HTTP headers. |
Definition at line 84 of file http_command_config.h.
|
inline |
Sets key-file TLS parameter.
| key | Server private key file name. |
Definition at line 145 of file http_command_config.h.
|
inline |
Sets socket address.
| socket_address | The new socket address. |
Definition at line 56 of file http_command_config.h.
|
inline |
Sets socket port.
| socket_port | The new socket port. |
Definition at line 70 of file http_command_config.h.
|
inline |
Sets socket type.
| socket_type | The new socket type (should be "http" or "https"). |
Definition at line 42 of file http_command_config.h.
|
inline |
Sets trust-anchor TLS parameter.
| ca | Trust anchor aka Certificate Authority (can be a file name or a directory path). |
Definition at line 117 of file http_command_config.h.
|
virtual |
Unparse a configuration object.
Set authentication.
Implements isc::data::CfgToElement.
Definition at line 235 of file http_command_config.cc.
References isc::http::CfgHttpHeaderstoElement(), isc::data::UserContext::contextToElement(), Element::create(), and Element::createMap().
|
static |
Default HTTP authentication realm.
Definition at line 177 of file http_command_config.h.
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), HttpCommandConfig(), and isc::d2::D2Process::init().
|
static |
Default socket address (127.0.0.1).
Definition at line 171 of file http_command_config.h.
Referenced by isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and HttpCommandConfig().
|
static |
Default socket port.
Definition at line 174 of file http_command_config.h.
Referenced by HttpCommandConfig().
|
static |
Emulation flag.
Definition at line 180 of file http_command_config.h.
|
static |
Supported service.
Definition at line 183 of file http_command_config.h.
Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Process::init().