16#include <boost/shared_ptr.hpp> 
   17#include <boost/multi_index_container.hpp> 
   18#include <boost/multi_index/hashed_index.hpp> 
   19#include <boost/multi_index/mem_fun.hpp> 
   20#include <boost/multi_index/random_access_index.hpp> 
   56              const std::set<std::string>& domains,
 
   78    void setID(
const std::string& 
id) {
 
 
  107        return (server_infos_);
 
 
  114        server_infos_.push_back(server_info);
 
 
  119        server_infos_.clear();
 
 
  135        return (server_principal_);
 
 
  142        server_principal_ = server_principal;
 
 
  149        return (key_name_suffix_);
 
 
  156        key_name_suffix_ = key_name_suffix;
 
 
  182        return (cred_principal_);
 
 
  189        cred_principal_ = cred_principal;
 
 
  196        return (tkey_lifetime_);
 
 
  203        return (gss_replay_flag_);
 
 
  210        gss_replay_flag_ = flag;
 
 
  217        return (gss_sequence_flag_);
 
 
  224        gss_sequence_flag_ = flag;
 
 
  231        tkey_lifetime_ = tkey_lifetime;
 
 
  238        return (rekey_interval_);
 
 
  245        rekey_interval_ = rekey_interval;
 
 
  252        return (retry_interval_);
 
 
  259        retry_interval_ = retry_interval;
 
 
  266        return (tkey_proto_);
 
 
  273        tkey_proto_ = tkey_proto;
 
 
  287        fallback_ = fallback;
 
 
  294        return (exchange_timeout_);
 
 
  302        exchange_timeout_ = exchange_timeout;
 
 
  350    std::set<std::string> domains_;
 
  362    std::string server_principal_;
 
  365    std::string key_name_suffix_;
 
  368    std::string cred_principal_;
 
  371    bool gss_replay_flag_;
 
  374    bool gss_sequence_flag_;
 
  377    uint32_t tkey_lifetime_;
 
  380    uint32_t rekey_interval_;
 
  383    uint32_t retry_interval_;
 
  392    uint32_t exchange_timeout_;
 
 
  408typedef boost::multi_index_container<
 
  412    boost::multi_index::indexed_by<
 
  414        boost::multi_index::random_access<
 
  415            boost::multi_index::tag<DnsServerIndexTag>
 
  418        boost::multi_index::hashed_unique<
 
  419            boost::multi_index::tag<DnsServerIdTag>,
 
  420            boost::multi_index::const_mem_fun<
DnsServer, std::string,
 
  454        servers_.push_back(server);
 
 
  461        return (servers_rev_map_);
 
 
  479        servers_rev_map_.clear();
 
 
  491        return (client_keytab_);
 
 
  498        client_keytab_ = client_keytab;
 
 
  505        return (creds_cache_);
 
 
  512        creds_cache_ = creds_cache;
 
 
  525        return (max_tkey_lifetime_);
 
 
  532        max_tkey_lifetime_ = max_tkey_lifetime;
 
 
  543    std::string client_keytab_;
 
  546    std::string creds_cache_;
 
  549    uint32_t max_tkey_lifetime_;
 
 
Protocol
Protocol to use on the fetch.
The IOAddress class represents an IP addresses (version agnostic)
static const uint32_t STANDARD_DNS_PORT
defines DNS standard port value
GSS-TSIG hook configuration for a server.
static const std::list< std::string > STAT_NAMES
Server TKEY exchange statistics names.
uint32_t getRekeyInterval() const
Get the rekey interval.
void setKeyLifetime(uint32_t tkey_lifetime)
Set the TKEY lifetime.
void checkKeyNameSuffix()
Check and fix the GSS-TSIG key name suffix.
void setKeyNameSuffix(const std::string &key_name_suffix)
Set the GSS-TSIG key name suffix.
static const isc::data::SimpleKeywords SERVER_PARAMETERS
This table defines all server parameters.
const std::string & getServerPrincipal() const
Get the DNS server principal.
void setExchangeTimeout(uint32_t exchange_timeout)
Set the TKEY exchange timeout.
virtual void resetStats()
Reset statistics.
void setServerPrincipal(const std::string &server_principal)
Set the DNS server principal.
void clearServerInfos()
Clear the server info list.
uint16_t getPort() const
Get the server port.
virtual ~DnsServer()
Destructor.
uint32_t getExchangeTimeout() const
Get the TKEY exchange timeout.
const isc::d2::DnsServerInfoStorage & getServerInfos() const
Get the server info list.
bool getFallback() const
Get the fallback flag.
const std::string & getClientPrincipal() const
Get the client/credentials principal.
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.
void buildKeyNameSuffix()
Build the GSS-TSIG key name suffix.
isc::asiodns::IOFetch::Protocol getKeyProto() const
Get the TKEY protocol.
std::string getID() const
Get the ID.
void addServerInfo(isc::d2::DnsServerInfoPtr server_info)
Add a server info to the list.
void setID(const std::string &id)
Set the ID.
static constexpr size_t DEFAULT_REKEY_INTERVAL
The rekey timer interval (expressed in seconds).
void setClientPrincipal(const std::string &cred_principal)
Set the client/credentials principal.
isc::data::ElementPtr toElement() const
Unparse a DNS server object.
void setRetryInterval(uint32_t retry_interval)
Set the retry interval.
const isc::asiolink::IOAddress & getIpAddress() const
Get the server IP address.
void setGssReplayFlag(bool flag)
Set the GSS (anti) replay flag.
const std::string & getKeyNameSuffix() const
Get the GSS-TSIG key name suffix.
bool getGssReplayFlag() const
Get the GSS (anti) replay flag.
uint32_t getRetryInterval() const
Get the retry interval.
void setRekeyInterval(uint32_t rekey_interval)
Set the rekey interval.
void setKeyProto(isc::asiodns::IOFetch::Protocol tkey_proto)
Set the TKEY protocol.
static constexpr size_t DEFAULT_KEY_LIFETIME
The default TKEY lifetime (expressed in seconds).
static constexpr size_t DEFAULT_EXCHANGE_TIMEOUT
The default TKEY exchange timeout (expressed in milliseconds).
bool getGssSequenceFlag() const
Get the GSS sequence flag.
static constexpr size_t DEFAULT_RETRY_INTERVAL
The retry timer interval (expressed in seconds).
void buildServerInfo(isc::d2::D2CfgContextPtr d2_config)
Convert the list of DNS domains to the server info list.
isc::asiolink::IntervalTimerPtr & getTimer()
Get timer used to rekey or to retry on error.
void setGssSequenceFlag(bool flag)
Set the GSS sequence flag.
void setFallback(bool fallback)
Set the fallback flag.
uint32_t getKeyLifetime() const
Get the TKEY lifetime.
const std::string & getCredsCache() const
Get the credentials cache specification.
const DnsServerList & getServerList() const
Get the DNS server list.
uint32_t getMaxKeyLifetime() const
Get the maximum TKEY lifetime.
virtual ~GssTsigCfg()
Destructor.
DnsServerPtr getServer(const isc::d2::DnsServerInfoPtr &server_info) const
Get the DNS server from a server info.
const std::string & getClientKeyTab() const
Get the client key table specification.
void setClientKeyTab(const std::string &client_keytab)
Set the client key table specification.
void setCredsCache(const std::string &creds_cache)
Set the credentials cache specification.
const DnsServerRevMap & getServerRevMap() const
Get the DNS server reverse map.
void buildServerRevMap(isc::d2::D2CfgContextPtr d2_config)
Build the reverse map.
void clearServers()
Clear the DNS server list and reverse map.
void configure(isc::data::ConstElementPtr params)
Configure.
static const isc::data::SimpleKeywords GLOBAL_PARAMETERS
This table defines all global parameters.
void setMaxKeyLifetime(uint32_t max_tkey_lifetime)
Set the maximum TKEY lifetime.
void addServer(DnsServerPtr server)
Add a DNS server to the list.
boost::shared_ptr< isc::asiolink::IntervalTimer > IntervalTimerPtr
boost::shared_ptr< DdnsDomain > DdnsDomainPtr
Defines a pointer for DdnsDomain instances.
boost::shared_ptr< DnsServerInfo > DnsServerInfoPtr
Defines a pointer for DnsServerInfo instances.
std::vector< DnsServerInfoPtr > DnsServerInfoStorage
Defines a storage container for DnsServerInfo pointers.
boost::shared_ptr< D2CfgContext > D2CfgContextPtr
Pointer to a configuration context.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
std::map< std::string, isc::data::Element::types > SimpleKeywords
This specifies all accepted keywords with their types.
std::map< isc::d2::DnsServerInfoPtr, DnsServerPtr > DnsServerRevMap
A map of DNS server info and DNS server.
boost::shared_ptr< DnsServer > DnsServerPtr
A pointer to a DNS server.
boost::multi_index_container< DnsServerPtr, boost::multi_index::indexed_by< boost::multi_index::random_access< boost::multi_index::tag< DnsServerIndexTag > >, boost::multi_index::hashed_unique< boost::multi_index::tag< DnsServerIdTag >, boost::multi_index::const_mem_fun< DnsServer, std::string, &DnsServer::getID > > > > DnsServerList
A list of DNS server.
Defines the logger used by the top-level component of kea-lfc.
Abstract class for configuration Cfg_* classes.
Base class for user context.
Tag for the id access index for searching DNS server.
Tag for the random access index for searching DNS server.