Kea 3.1.0
gss_tsig_callouts.cc File Reference
#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>
+ Include dependency graph for gss_tsig_callouts.cc:

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.
 

Function Documentation

◆ command_processed()

int command_processed ( CalloutHandle & handle)

This function is called when a command was processed.

Adds an entry to status-get answer.

Parameters
handleCalloutHandle.
Returns
always 0.

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.

◆ d2_srv_configured()

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.

Parameters
handleCalloutHandle.
Returns
always 0.
Exceptions
Unexpectedwhen 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().

+ Here is the call graph for this function:

◆ get()

◆ get_all()

int get_all ( CalloutHandle & handle)

The gss-tsig-get-all command.

Parameters
handleCalloutHandle.
Returns
always 0.

Definition at line 56 of file gss_tsig_callouts.cc.

References isc::gss_tsig::impl.

Referenced by load().

◆ key_del()

int key_del ( CalloutHandle & handle)

The gss-tsig-key-del command.

This command takes an argument name with a string value.

Parameters
handleCalloutHandle.
Returns
always 0.

Definition at line 98 of file gss_tsig_callouts.cc.

References isc::gss_tsig::impl.

Referenced by load().

◆ key_expire()

int key_expire ( CalloutHandle & handle)

The gss-tsig-key-expire command.

This command takes an argument name with a string value.

Parameters
handleCalloutHandle.
Returns
always 0.

Definition at line 87 of file gss_tsig_callouts.cc.

References isc::gss_tsig::impl.

Referenced by load().

◆ key_get()

int key_get ( CalloutHandle & handle)

The gss-tsig-key-get command.

This command takes an argument name with a string value.

Parameters
handleCalloutHandle.
Returns
always 0.

Definition at line 76 of file gss_tsig_callouts.cc.

References isc::gss_tsig::impl.

Referenced by load().

◆ lists()

int lists ( CalloutHandle & handle)

The gss-tsig-list command.

Parameters
handleCalloutHandle.
Returns
always 0.

Definition at line 65 of file gss_tsig_callouts.cc.

References isc::gss_tsig::impl.

Referenced by load().

◆ load()

int load ( LibraryHandle & handle)

This function is called when the library is loaded.

Returns
always 0.

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().

+ Here is the call graph for this function:

◆ multi_threading_compatible()

int multi_threading_compatible ( )

This function is called to retrieve the multi-threading compatibility.

Returns
1 which means compatible with multi-threading.

Definition at line 199 of file gss_tsig_callouts.cc.

◆ purge()

int purge ( CalloutHandle & handle)

The gss-tsig-purge command.

This command takes an argument id with a string value.

Parameters
handleCalloutHandle.
Returns
always 0.

Definition at line 109 of file gss_tsig_callouts.cc.

References isc::gss_tsig::impl.

Referenced by load().

◆ purge_all()

int purge_all ( CalloutHandle & handle)

The gss-tsig-purge-all command.

Parameters
handleCalloutHandle.
Returns
always 0.

Definition at line 118 of file gss_tsig_callouts.cc.

References isc::gss_tsig::impl.

Referenced by load().

◆ rekey()

int rekey ( CalloutHandle & handle)

The gss-tsig-rekey command.

This command takes an argument id with a string value.

Parameters
handleCalloutHandle.
Returns
always 0.

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().

◆ rekey_all()

int rekey_all ( CalloutHandle & handle)

The gss-tsig-rekey-all command.

Parameters
handleCalloutHandle.
Returns
always 0.

Definition at line 138 of file gss_tsig_callouts.cc.

References isc::gss_tsig::impl.

Referenced by load().

◆ select_key()

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:

  • if GSS-TSIG is not enabled: just return with CONTINUE
  • if a key was found: overwrite the selected key with it and return with CONTINUE
  • if no key was found but GSS-TSIG is enabled: return with SKIP (i.e. implement this as GSS-TSIG is required)
Parameters
handleCalloutHandle.
Returns
always 0.

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().

+ Here is the call graph for this function:

◆ unload()

int unload ( )

This function is called when the library is unloaded.

Returns
always 0.

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().

+ Here is the call graph for this function: