79 ElementPtr auth = boost::const_pointer_cast<Element>(authentication);
88 ElementPtr d2 = boost::const_pointer_cast<Element>(sockets->get(
"d2"));
93 ElementPtr d4 = boost::const_pointer_cast<Element>(sockets->get(
"dhcp4"));
98 ElementPtr d6 = boost::const_pointer_cast<Element>(sockets->get(
"dhcp6"));
112 bool have_ca = (ca && !ca->stringValue().empty());
113 bool have_cert = (cert && !cert->stringValue().empty());
114 bool have_key = (key && !key->stringValue().empty());
115 if (!have_ca && !have_cert && !have_key) {
122 " all or none of TLS parameters must be set");
126 " all or none of TLS parameters must be set");
130 " all or none of TLS parameters must be set");
152 auto const& sockets_map = ctrl_sockets->mapValue();
153 for (
auto const& cs : sockets_map) {
157 auto mutable_socket_info = boost::const_pointer_cast<Element>(cs.second);
158 std::string socket_name = mutable_socket_info->get(
"socket-name")->stringValue();
160 mutable_socket_info->set(
"validated-socket-name",
Element::create(validated_name));
161 ctx->setControlSocketInfo(mutable_socket_info, cs.first);
170 auth->parse(auth_config);
171 ctx->setAuthConfig(auth);
176 if (headers_config) {
184 ctx->setContext(user_context);
static ElementPtr create(const Position &pos=ZERO_POSITION())
An exception that is thrown if an error occurs while configuring any server.
void checkTlsSetup(const isc::data::ConstElementPtr &config)
Check TLS setup consistency i.e.
static const isc::data::SimpleDefaults AUTH_DEFAULTS
This table defines default values for authentication.
static const isc::data::SimpleDefaults SOCKET_DEFAULTS
This table defines default values for control sockets.
static const isc::data::SimpleDefaults AGENT_DEFAULTS
This table defines default values for global options.
void parse(const CtrlAgentCfgContextPtr &ctx, const isc::data::ConstElementPtr &config, bool check_only)
Parses the control agent configuration.
static size_t setAllDefaults(const isc::data::ElementPtr &global)
Sets all defaults for Control Agent configuration.
void clearIOServices()
Clear the list of IOService objects.
static IOServiceMgr & instance()
Access the IOServiceMgr singleton instance.
static std::string validatePath(const std::string socket_path)
Validates a path against the supported path for unix control sockets.
static std::string getString(isc::data::ConstElementPtr scope, const std::string &name)
Returns a string parameter from a scope.
int_type getIntType(isc::data::ConstElementPtr scope, const std::string &name)
Returns an integer value with range checking from a scope.
static bool getBoolean(isc::data::ConstElementPtr scope, const std::string &name)
Returns a boolean parameter from a scope.
static size_t setDefaults(isc::data::ElementPtr scope, const SimpleDefaults &default_values)
Sets the default values.
Wrapper class that holds hooks libraries configuration.
void verifyLibraries(const isc::data::Element::Position &position, bool multi_threading_enabled) const
Verifies that libraries stored in libraries_ are valid.
void loadLibraries(bool multi_threading_enabled) const
Commits hooks libraries configuration.
Parser for hooks library list.
void parse(HooksConfig &libraries, isc::data::ConstElementPtr value)
Parses parameters value.
static bool unloadLibraries()
Unload libraries.
static void prepareUnloadLibraries()
Prepare the unloading of libraries.
Basic HTTP authentication configuration.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
boost::shared_ptr< CtrlAgentCfgContext > CtrlAgentCfgContextPtr
Pointer to a configuration context.
boost::shared_ptr< const Element > ConstElementPtr
std::vector< SimpleDefault > SimpleDefaults
This specifies all default values in a given scope (e.g. a subnet).
boost::shared_ptr< Element > ElementPtr
boost::shared_ptr< BasicHttpAuthConfig > BasicHttpAuthConfigPtr
Type of shared pointers to basic HTTP authentication configuration.
CfgHttpHeaders parseCfgHttpHeaders(const ConstElementPtr &config)
Parse config HTTP headers.
Defines the logger used by the top-level component of kea-lfc.