15#include <boost/multi_index/composite_key.hpp>
16#include <boost/multi_index/ordered_index.hpp>
30typedef boost::multi_index_container<
33 boost::multi_index::indexed_by<
35 boost::multi_index::hashed_unique<
36 boost::multi_index::tag<GssTsigKeyNameTag>,
37 boost::multi_index::const_mem_fun<
ManagedKey, std::string,
43 boost::multi_index::ordered_non_unique<
44 boost::multi_index::tag<GssTsigKeyServerTag>,
45 boost::multi_index::composite_key<
48 boost::multi_index::const_mem_fun<
ManagedKey, std::string,
52 std::chrono::system_clock::time_point,
130 std::chrono::time_point<std::chrono::system_clock> now);
141 bool& useGssTsig,
bool& fallback);
GSS-TSIG hook configuration.
isc::asiolink::IOServicePtr getIOService()
Get the hook I/O service.
void rekeyAllHandler(isc::hooks::CalloutHandle &handle)
The gss-tsig-rekey-all command handler.
std::unique_ptr< std::string > krb5_client_ktname_prev_
The previous value of client key table environment variable.
isc::asiolink::IOServicePtr io_service_
The hook I/O service.
GssTsigImpl()
Constructor.
void purgeAllHandler(isc::hooks::CalloutHandle &handle)
The gss-tsig-purge-all command handler.
void finishConfigure(isc::d2::D2CfgContextPtr d2_config)
Finish configure.
GssTsigCfg cfg_
GSS-TSIG hook configuration.
void commandProcessed(isc::hooks::CalloutHandle &handle)
The command_processed handler.
void start()
Start method.
void keyExpireHandler(isc::hooks::CalloutHandle &handle)
The gss-tsig-key-expire command handler.
void purgeHandler(isc::hooks::CalloutHandle &handle)
The gss-tsig-purge command handler.
void rekeyHandler(isc::hooks::CalloutHandle &handle)
The gss-tsig-rekey command handler.
void getAllHandler(isc::hooks::CalloutHandle &handle) const
The gss-tsig-get-all command handler.
void configure(isc::data::ConstElementPtr config)
Configure.
void keyDelHandler(isc::hooks::CalloutHandle &handle)
The gss-tsig-key-del command handler.
DnsServerPtr getServer(const std::string &id) const
Get the DNS server from its ID.
void processAllServersKeys(bool rekey=false)
Process GSS-TSIG keys for all servers.
ManagedKeyList keys_
Map of GSS-TSIG keys by name.
void setIOService(isc::asiolink::IOServicePtr io_service)
Set the hook I/O service.
ManagedKeyPtr findKey(const d2::DnsServerInfoPtr &server_info, bool &useGssTsig, bool &fallback)
Find a GSS-TSIG key by server info.
void purgeKeys()
Purge very old GSS-TSIG keys.
void processServerKeys(DnsServerPtr server, bool rekey=false)
Process GSS-TSIG keys for a specific server.
std::unique_ptr< std::string > krb5ccname_prev_
The previous value of credential cache environment variable.
void keyGetHandler(isc::hooks::CalloutHandle &handle) const
The gss-tsig-key-get command handler.
isc::asiolink::IntervalTimerPtr purge_timer_
The purge periodic timer.
virtual ~GssTsigImpl()
Destructor.
void listHandler(isc::hooks::CalloutHandle &handle) const
The gss-tsig-list command handler.
void getHandler(isc::hooks::CalloutHandle &handle) const
The gss-tsig-get command handler.
void createKey(DnsServerPtr server, std::chrono::time_point< std::chrono::system_clock > now)
Create new GSS-TSIG key.
GSS-TSIG extension of the D2 TSIG key class.
std::chrono::system_clock::time_point getInception() const
Get the key inception.
std::string getKeyNameStr() const
Get the key name as a string.
std::string getParentID() const
Get the DNS server (parent) ID.
Per-packet callout handle.
int rekey(CalloutHandle &handle)
The gss-tsig-rekey command.
boost::shared_ptr< isc::asiolink::IntervalTimer > IntervalTimerPtr
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
boost::shared_ptr< DnsServerInfo > DnsServerInfoPtr
Defines a pointer for DnsServerInfo instances.
boost::shared_ptr< D2CfgContext > D2CfgContextPtr
Pointer to a configuration context.
boost::shared_ptr< const Element > ConstElementPtr
boost::multi_index_container< ManagedKeyPtr, boost::multi_index::indexed_by< boost::multi_index::hashed_unique< boost::multi_index::tag< GssTsigKeyNameTag >, boost::multi_index::const_mem_fun< ManagedKey, std::string, &ManagedKey::getKeyNameStr > >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< GssTsigKeyServerTag >, boost::multi_index::composite_key< ManagedKey, boost::multi_index::const_mem_fun< ManagedKey, std::string, &ManagedKey::getParentID >, boost::multi_index::const_mem_fun< GssTsigKey, std::chrono::system_clock::time_point, &GssTsigKey::getInception > > > > > ManagedKeyList
A multi index container holding GSS-TSIG keys.
std::unique_ptr< GssTsigImpl > GssTsigImplPtr
Type of pointer to a GSS-TSIG hook configuration.
boost::shared_ptr< DnsServer > DnsServerPtr
A pointer to a DNS server.
boost::shared_ptr< ManagedKey > ManagedKeyPtr
Type of pointer to a Managed GSS-TSIG key.
Defines the logger used by the top-level component of kea-lfc.
Tag for the server ID index for searching GSS-TSIG key.