![]() |
Kea 3.1.0
|
#include <config.h>
#include <asiolink/io_service_mgr.h>
#include <gss_tsig_context.h>
#include <gss_tsig_impl.h>
#include <gss_tsig_log.h>
#include <process/daemon.h>
#include <exceptions/exceptions.h>
#include <functional>
#include <sstream>
#include <string>
Go to the source code of this file.
Namespaces | |
namespace | isc |
Defines the logger used by the top-level component of kea-lfc. | |
namespace | isc::gss_tsig |
Functions | |
int | command_processed (CalloutHandle &handle) |
This function is called when a command was processed. | |
int | d2_srv_configured (CalloutHandle &handle) |
This function is called when the server finishes (re)configuration. | |
int | get (CalloutHandle &handle) |
The gss-tsig-get command. | |
int | get_all (CalloutHandle &handle) |
The gss-tsig-get-all command. | |
int | key_del (CalloutHandle &handle) |
The gss-tsig-key-del command. | |
int | key_expire (CalloutHandle &handle) |
The gss-tsig-key-expire command. | |
int | key_get (CalloutHandle &handle) |
The gss-tsig-key-get command. | |
int | lists (CalloutHandle &handle) |
The gss-tsig-list command. | |
int | load (LibraryHandle &handle) |
This function is called when the library is loaded. | |
int | multi_threading_compatible () |
This function is called to retrieve the multi-threading compatibility. | |
int | purge (CalloutHandle &handle) |
The gss-tsig-purge command. | |
int | purge_all (CalloutHandle &handle) |
The gss-tsig-purge-all command. | |
int | rekey (CalloutHandle &handle) |
The gss-tsig-rekey command. | |
int | rekey_all (CalloutHandle &handle) |
The gss-tsig-rekey-all command. | |
int | select_key (CalloutHandle &handle) |
This function is called when the server selects a DNS server and optionally a TSIG key. | |
int | unload () |
This function is called when the library is unloaded. | |
Variables | |
GssTsigImplPtr | isc::gss_tsig::impl |
The GSS-TSIG hook implementation object. | |
int command_processed | ( | CalloutHandle & | handle | ) |
This function is called when a command was processed.
Adds an entry to status-get answer.
handle | CalloutHandle. |
Definition at line 285 of file gss_tsig_callouts.cc.
References isc::gss_tsig::GSS_TSIG_COMMAND_PROCESSED_FAILED, isc::gss_tsig::gss_tsig_logger, isc::gss_tsig::impl, and LOG_ERROR.
int d2_srv_configured | ( | CalloutHandle & | handle | ) |
This function is called when the server finishes (re)configuration.
The server reverse map is built and an error is returned when a configuration mismatch is detected.
handle | CalloutHandle. |
Unexpected | when something went really wrong. |
Definition at line 211 of file gss_tsig_callouts.cc.
References isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getStatus(), isc::gss_tsig::impl, isc::asiolink::IOServiceMgr::instance(), CalloutHandle::NEXT_STEP_CONTINUE, CalloutHandle::NEXT_STEP_DROP, isc::hooks::CalloutHandle::NEXT_STEP_DROP, isc::asiolink::IOServiceMgr::registerIOService(), isc::hooks::CalloutHandle::setArgument(), and isc::hooks::CalloutHandle::setStatus().
int get | ( | CalloutHandle & | handle | ) |
The gss-tsig-get command.
This command takes an argument id with a string value.
handle | CalloutHandle. |
Definition at line 47 of file gss_tsig_callouts.cc.
References isc::gss_tsig::impl.
Referenced by isc::perfdhcp::ExchangeStats::appendSent(), isc::dhcp::Dhcpv4Srv::assignLease(), isc::dhcp::CfgSharedNetworks< SharedNetworkPtrType, SharedNetworkCollection >::del(), isc::dhcp::CfgSharedNetworks< SharedNetworkPtrType, SharedNetworkCollection >::del(), isc::dhcp::OptionSpaceContainer< OptionDefContainer, OptionDefinitionPtr, std::string >::deleteItems(), isc::dhcp::CfgSharedNetworks< SharedNetworkPtrType, SharedNetworkCollection >::getByName(), isc::ha::CommunicationState::getRejectedLeaseUpdatesCountFromContainer(), isc::gss_tsig::GssTsigCfg::getServer(), isc::db::PgSqlConnection::initializeSchema(), load(), isc::perfdhcp::ExchangeStats::matchPackets(), isc::dhcp::CfgSharedNetworks< SharedNetworkPtrType, SharedNetworkCollection >::merge(), isc::perfdhcp::ExchangeStats::printTimestamps(), isc::dhcp::Dhcpv4Srv::processLocalizedQuery4(), isc::lease_query::XidQueue< QueryType >::remove(), isc::dhcp::CfgSubnets4::replace(), isc::dhcp::CfgSubnets6::replace(), isc::dhcp::Dhcpv4Srv::selectSubnet(), isc::dhcp::Dhcpv6Srv::selectSubnet(), isc::dhcp::Dhcpv4Srv::selectSubnet4o6(), and isc::dhcp::CfgSharedNetworks< SharedNetworkPtrType, SharedNetworkCollection >::toElement().
int get_all | ( | CalloutHandle & | handle | ) |
The gss-tsig-get-all command.
handle | CalloutHandle. |
Definition at line 56 of file gss_tsig_callouts.cc.
References isc::gss_tsig::impl.
Referenced by load().
int key_del | ( | CalloutHandle & | handle | ) |
The gss-tsig-key-del command.
This command takes an argument name with a string value.
handle | CalloutHandle. |
Definition at line 98 of file gss_tsig_callouts.cc.
References isc::gss_tsig::impl.
Referenced by load().
int key_expire | ( | CalloutHandle & | handle | ) |
The gss-tsig-key-expire command.
This command takes an argument name with a string value.
handle | CalloutHandle. |
Definition at line 87 of file gss_tsig_callouts.cc.
References isc::gss_tsig::impl.
Referenced by load().
int key_get | ( | CalloutHandle & | handle | ) |
The gss-tsig-key-get command.
This command takes an argument name with a string value.
handle | CalloutHandle. |
Definition at line 76 of file gss_tsig_callouts.cc.
References isc::gss_tsig::impl.
Referenced by load().
int lists | ( | CalloutHandle & | handle | ) |
The gss-tsig-list command.
handle | CalloutHandle. |
Definition at line 65 of file gss_tsig_callouts.cc.
References isc::gss_tsig::impl.
Referenced by load().
int load | ( | LibraryHandle & | handle | ) |
This function is called when the library is loaded.
Definition at line 146 of file gss_tsig_callouts.cc.
References get(), get_all(), isc::hooks::LibraryHandle::getParameters(), isc::process::Daemon::getProcName(), isc::gss_tsig::GSS_TSIG_LOAD_FAILED, isc::gss_tsig::GSS_TSIG_LOAD_OK, isc::gss_tsig::gss_tsig_logger, isc::gss_tsig::impl, isc_throw, key_del(), key_expire(), key_get(), lists(), LOG_ERROR, LOG_INFO, purge(), purge_all(), isc::hooks::LibraryHandle::registerCommandCallout(), rekey(), and rekey_all().
int multi_threading_compatible | ( | ) |
This function is called to retrieve the multi-threading compatibility.
Definition at line 199 of file gss_tsig_callouts.cc.
int purge | ( | CalloutHandle & | handle | ) |
The gss-tsig-purge command.
This command takes an argument id with a string value.
handle | CalloutHandle. |
Definition at line 109 of file gss_tsig_callouts.cc.
References isc::gss_tsig::impl.
Referenced by load().
int purge_all | ( | CalloutHandle & | handle | ) |
The gss-tsig-purge-all command.
handle | CalloutHandle. |
Definition at line 118 of file gss_tsig_callouts.cc.
References isc::gss_tsig::impl.
Referenced by load().
int rekey | ( | CalloutHandle & | handle | ) |
The gss-tsig-rekey command.
This command takes an argument id with a string value.
handle | CalloutHandle. |
Definition at line 129 of file gss_tsig_callouts.cc.
References isc::gss_tsig::impl.
Referenced by load(), isc::gss_tsig::GssTsigImpl::processAllServersKeys(), and isc::gss_tsig::GssTsigImpl::processServerKeys().
int rekey_all | ( | CalloutHandle & | handle | ) |
The gss-tsig-rekey-all command.
handle | CalloutHandle. |
Definition at line 138 of file gss_tsig_callouts.cc.
References isc::gss_tsig::impl.
Referenced by load().
int select_key | ( | CalloutHandle & | handle | ) |
This function is called when the server selects a DNS server and optionally a TSIG key.
An usable GSS-TSIG key for the DNS server is looked for:
handle | CalloutHandle. |
Definition at line 252 of file gss_tsig_callouts.cc.
References isc::hooks::CalloutHandle::getArgument(), isc::hooks::CalloutHandle::getStatus(), isc::gss_tsig::impl, CalloutHandle::NEXT_STEP_CONTINUE, CalloutHandle::NEXT_STEP_SKIP, isc::hooks::CalloutHandle::setArgument(), and isc::hooks::CalloutHandle::setStatus().
int unload | ( | ) |
This function is called when the library is unloaded.
Definition at line 186 of file gss_tsig_callouts.cc.
References isc::gss_tsig::gss_tsig_logger, isc::gss_tsig::GSS_TSIG_UNLOAD_OK, isc::gss_tsig::impl, isc::asiolink::IOServiceMgr::instance(), LOG_INFO, and isc::asiolink::IOServiceMgr::unregisterIOService().