![]() |
Kea 3.0.0
|
GSS-TSIG hook configuration for a server. More...
#include <gss_tsig_cfg.h>
Public Member Functions | |
| DnsServer (const std::string &id, const std::set< std::string > &domains, const isc::asiolink::IOAddress &ip_address, uint16_t port=isc::d2::DnsServerInfo::STANDARD_DNS_PORT) | |
| Constructor. | |
| virtual | ~DnsServer () |
| Destructor. | |
| void | addServerInfo (isc::d2::DnsServerInfoPtr server_info) |
| Add a server info to the list. | |
| void | buildKeyNameSuffix () |
| Build the GSS-TSIG key name suffix. | |
| void | buildServerInfo (isc::d2::D2CfgContextPtr d2_config) |
| Convert the list of DNS domains to the server info list. | |
| void | checkKeyNameSuffix () |
| Check and fix the GSS-TSIG key name suffix. | |
| void | clearServerInfos () |
| Clear the server info list. | |
| const std::string & | getClientPrincipal () const |
| Get the client/credentials principal. | |
| uint32_t | getExchangeTimeout () const |
| Get the TKEY exchange timeout. | |
| bool | getFallback () const |
| Get the fallback flag. | |
| bool | getGssReplayFlag () const |
| Get the GSS (anti) replay flag. | |
| bool | getGssSequenceFlag () const |
| Get the GSS sequence flag. | |
| std::string | getID () const |
| Get the ID. | |
| const isc::asiolink::IOAddress & | getIpAddress () const |
| Get the server IP address. | |
| uint32_t | getKeyLifetime () const |
| Get the TKEY lifetime. | |
| const std::string & | getKeyNameSuffix () const |
| Get the GSS-TSIG key name suffix. | |
| isc::asiodns::IOFetch::Protocol | getKeyProto () const |
| Get the TKEY protocol. | |
| uint16_t | getPort () const |
| Get the server port. | |
| uint32_t | getRekeyInterval () const |
| Get the rekey interval. | |
| uint32_t | getRetryInterval () const |
| Get the retry interval. | |
| const isc::d2::DnsServerInfoStorage & | getServerInfos () const |
| Get the server info list. | |
| const std::string & | getServerPrincipal () const |
| Get the DNS server principal. | |
| isc::asiolink::IntervalTimerPtr & | getTimer () |
| Get timer used to rekey or to retry on error. | |
| virtual void | resetStats () |
| Reset statistics. | |
| void | setClientPrincipal (const std::string &cred_principal) |
| Set the client/credentials principal. | |
| void | setExchangeTimeout (uint32_t exchange_timeout) |
| Set the TKEY exchange timeout. | |
| void | setFallback (bool fallback) |
| Set the fallback flag. | |
| void | setGssReplayFlag (bool flag) |
| Set the GSS (anti) replay flag. | |
| void | setGssSequenceFlag (bool flag) |
| Set the GSS sequence flag. | |
| void | setID (const std::string &id) |
| Set the ID. | |
| void | setKeyLifetime (uint32_t tkey_lifetime) |
| Set the TKEY lifetime. | |
| void | setKeyNameSuffix (const std::string &key_name_suffix) |
| Set the GSS-TSIG key name suffix. | |
| void | setKeyProto (isc::asiodns::IOFetch::Protocol tkey_proto) |
| Set the TKEY protocol. | |
| void | setRekeyInterval (uint32_t rekey_interval) |
| Set the rekey interval. | |
| void | setRetryInterval (uint32_t retry_interval) |
| Set the retry interval. | |
| void | setServerPrincipal (const std::string &server_principal) |
| Set the DNS server principal. | |
| isc::data::ElementPtr | toElement () const |
| Unparse a DNS server object. | |
| Public Member Functions inherited from isc::data::CfgToElement | |
| virtual | ~CfgToElement () |
| Destructor. | |
| 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. | |
Static Public Attributes | |
| static constexpr size_t | DEFAULT_EXCHANGE_TIMEOUT = 3000 |
| The default TKEY exchange timeout (expressed in milliseconds). | |
| static constexpr size_t | DEFAULT_KEY_LIFETIME = 3600 |
| The default TKEY lifetime (expressed in seconds). | |
| static constexpr size_t | DEFAULT_REKEY_INTERVAL = 2700 |
| The rekey timer interval (expressed in seconds). | |
| static constexpr size_t | DEFAULT_RETRY_INTERVAL = 120 |
| The retry timer interval (expressed in seconds). | |
| static const isc::data::SimpleKeywords | SERVER_PARAMETERS |
| This table defines all server parameters. | |
| static const std::list< std::string > | STAT_NAMES |
| Server TKEY exchange statistics names. | |
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) | |
GSS-TSIG hook configuration for a server.
Definition at line 33 of file gss_tsig_cfg.h.
| isc::gss_tsig::DnsServer::DnsServer | ( | const std::string & | id, |
| const std::set< std::string > & | domains, | ||
| const isc::asiolink::IOAddress & | ip_address, | ||
| uint16_t | port = isc::d2::DnsServerInfo::STANDARD_DNS_PORT ) |
Constructor.
A server is mainly recognized using its address and port.
| id | An identifier. |
| domains | A list of DNS domains. |
| ip_address | The server IP address. |
| port | The server port (default 53). |
Definition at line 53 of file gss_tsig_cfg.cc.
References DEFAULT_EXCHANGE_TIMEOUT, DEFAULT_KEY_LIFETIME, DEFAULT_REKEY_INTERVAL, and DEFAULT_RETRY_INTERVAL.
|
virtual |
|
inline |
Add a server info to the list.
| server_info | The new server info to add to the list. |
Definition at line 113 of file gss_tsig_cfg.h.
| void isc::gss_tsig::DnsServer::buildKeyNameSuffix | ( | ) |
Build the GSS-TSIG key name suffix.
The GSS-TSIG key name suffix is the DNS part of the DNS server principal i.e. the sub-string between '/' and '@'.
| BadValue | when the DNS server principal has not the expected format (this allows an error at argument parse time). |
Definition at line 99 of file gss_tsig_cfg.cc.
References checkKeyNameSuffix(), and isc_throw.
| void isc::gss_tsig::DnsServer::buildServerInfo | ( | isc::d2::D2CfgContextPtr | d2_config | ) |
Convert the list of DNS domains to the server info list.
For each domain in the list adds the corresponding server. An empty list means to add all servers.
| d2_config | D2 configuration. |
| isc::NotFound | if a domain of the list is not served. |
Definition at line 138 of file gss_tsig_cfg.cc.
References buildServerInfo(), getServerInfos(), and isc_throw.
Referenced by buildServerInfo().
| void isc::gss_tsig::DnsServer::checkKeyNameSuffix | ( | ) |
Check and fix the GSS-TSIG key name suffix.
As a side effect a trailing dot can be added, e.g. when the suffix was built from a Kerberos principal where usually the domain part does not have one.
Definition at line 119 of file gss_tsig_cfg.cc.
References isc_throw, and isc::dns::Name::toText().
Referenced by buildKeyNameSuffix(), and setKeyNameSuffix().
|
inline |
Clear the server info list.
Definition at line 118 of file gss_tsig_cfg.h.
|
inline |
Get the client/credentials principal.
Definition at line 181 of file gss_tsig_cfg.h.
|
inline |
Get the TKEY exchange timeout.
Definition at line 293 of file gss_tsig_cfg.h.
|
inline |
|
inline |
Get the GSS (anti) replay flag.
Definition at line 202 of file gss_tsig_cfg.h.
|
inline |
Get the GSS sequence flag.
Definition at line 216 of file gss_tsig_cfg.h.
|
inline |
|
inline |
Get the server IP address.
Definition at line 85 of file gss_tsig_cfg.h.
|
inline |
Get the TKEY lifetime.
Definition at line 195 of file gss_tsig_cfg.h.
|
inline |
Get the GSS-TSIG key name suffix.
Definition at line 148 of file gss_tsig_cfg.h.
|
inline |
|
inline |
|
inline |
Get the rekey interval.
Definition at line 237 of file gss_tsig_cfg.h.
|
inline |
Get the retry interval.
Definition at line 251 of file gss_tsig_cfg.h.
|
inline |
Get the server info list.
Definition at line 106 of file gss_tsig_cfg.h.
Referenced by buildServerInfo().
|
inline |
Get the DNS server principal.
Definition at line 134 of file gss_tsig_cfg.h.
|
inline |
Get timer used to rekey or to retry on error.
Definition at line 92 of file gss_tsig_cfg.h.
|
virtual |
Reset statistics.
Definition at line 90 of file gss_tsig_cfg.cc.
References isc::stats::StatsMgr::generateName(), isc::stats::StatsMgr::instance(), isc::stats::StatsMgr::reset(), and STAT_NAMES.
|
inline |
Set the client/credentials principal.
| cred_principal | A new client/credentials principal. |
Definition at line 188 of file gss_tsig_cfg.h.
|
inline |
Set the TKEY exchange timeout.
| exchange_timeout | A new TKEY exchange timeout (expressed in milliseconds). |
Definition at line 301 of file gss_tsig_cfg.h.
|
inline |
Set the fallback flag.
| fallback | A new fallback flag. |
Definition at line 286 of file gss_tsig_cfg.h.
|
inline |
Set the GSS (anti) replay flag.
| flag | A new (anti) replay flag value. |
Definition at line 209 of file gss_tsig_cfg.h.
|
inline |
Set the GSS sequence flag.
| flag | A new sequence flag value. |
Definition at line 223 of file gss_tsig_cfg.h.
|
inline |
|
inline |
Set the TKEY lifetime.
| tkey_lifetime | A new TKEY lifetime (expressed in seconds). |
Definition at line 230 of file gss_tsig_cfg.h.
|
inline |
Set the GSS-TSIG key name suffix.
| key_name_suffix | A new GSS-TSIG key name suffix. |
Definition at line 155 of file gss_tsig_cfg.h.
References checkKeyNameSuffix().
|
inline |
Set the TKEY protocol.
| tkey_proto | A new TKEY protocol. |
Definition at line 272 of file gss_tsig_cfg.h.
|
inline |
Set the rekey interval.
| rekey_interval | A new rekey interval (expressed in seconds). |
Definition at line 244 of file gss_tsig_cfg.h.
|
inline |
Set the retry interval.
| retry_interval | A new retry interval (expressed in seconds). |
Definition at line 258 of file gss_tsig_cfg.h.
|
inline |
Set the DNS server principal.
| server_principal | A new DNS server principal. |
Definition at line 141 of file gss_tsig_cfg.h.
|
virtual |
Unparse a DNS server object.
Used to get the full state of a DNS server.
Implements isc::data::CfgToElement.
Definition at line 218 of file gss_tsig_cfg.cc.
References isc::data::UserContext::contextToElement(), Element::create(), Element::createList(), Element::createMap(), getID(), and isc::asiodns::IOFetch::TCP.
|
staticconstexpr |
The default TKEY exchange timeout (expressed in milliseconds).
Default value for TKEY exchange timeout: 3000 milliseconds (3 seconds).
Definition at line 331 of file gss_tsig_cfg.h.
Referenced by DnsServer().
|
staticconstexpr |
The default TKEY lifetime (expressed in seconds).
Default value for TKEY lifetime: 3600 seconds (1 hour).
Definition at line 316 of file gss_tsig_cfg.h.
Referenced by DnsServer(), and isc::gss_tsig::GssTsigCfg::configure().
|
staticconstexpr |
The rekey timer interval (expressed in seconds).
Default value for rekey timer: 2700 seconds (45 minutes).
Definition at line 321 of file gss_tsig_cfg.h.
Referenced by DnsServer(), and isc::gss_tsig::GssTsigCfg::configure().
|
staticconstexpr |
The retry timer interval (expressed in seconds).
Default value for retry timer: 120 seconds (2 minutes).
Definition at line 326 of file gss_tsig_cfg.h.
Referenced by DnsServer(), and isc::gss_tsig::GssTsigCfg::configure().
|
static |
This table defines all server parameters.
Definition at line 36 of file gss_tsig_cfg.h.
Referenced by isc::gss_tsig::GssTsigCfg::configure().
|
static |
Server TKEY exchange statistics names.
Definition at line 45 of file gss_tsig_cfg.h.
Referenced by isc::gss_tsig::GssTsigImpl::configure(), resetStats(), and isc::gss_tsig::GssTsigImpl::stop().