certbot.plugins.dns_common module

Common code for DNS Authenticator Plugins.

class certbot.plugins.dns_common.DNSAuthenticator(config, name)[source]

Bases: certbot.plugins.common.Plugin

Base class for DNS Authenticators

classmethod add_parser_arguments(add, default_propagation_seconds=10)[source]

Add plugin arguments to the CLI argument parser.

NOTE: If some of your flags interact with others, you can use cli.report_config_interaction to register this to ensure values are correctly saved/overridable during renewal.

Parameters:add (callable) – Function that proxies calls to argparse.ArgumentParser.add_argument prepending options with unique plugin name prefix.
class certbot.plugins.dns_common.CredentialsConfiguration(filename, mapper=<function CredentialsConfiguration.<lambda>>)[source]

Bases: object

Represents a user-supplied filed which stores API credentials.


Ensures that the supplied set of variables are all present in the file.

Parameters:required_variables (dict) – Map of variable which must be present to error to display.
Raises:errors.PluginError – If one or more are missing.

Find a configuration value for variable var, as transformed by mapper.

Parameters:var (str) – The variable to get.
Returns:The value of the variable.
Return type:str

Ensure that the specified file exists.


Ensure that the specified file exists and warn about unsafe permissions.


Return a list of progressively less-specific domain names.

One of these will probably be the domain name known to the DNS provider.

>>> base_domain_name_guesses('foo.bar.baz.example.com')
['foo.bar.baz.example.com', 'bar.baz.example.com', 'baz.example.com', 'example.com', 'com']
Parameters:domain (str) – The domain for which to return guesses.
Returns:The a list of less specific domain names.
Return type:list