Commit Graph
29 Commits
Author SHA1 Message Date
Zach ShepherdandBrad Warren 314f4bbe22 client: allow callers to add information to the user agent (#4690)
This change introduces a new flag to allow callers to add information to
the user agent without replacing it entirely.

This allows people re-packaging or wrapping Certbot to influence its user
agent string. They may which to do this so that stats/metrics related to
their distribution are available to boulder.

This is beneficial for both the Certbot team and the party re-packaging
Certbot as it allows the custom user agent to match the Certbot user
agent as closely as possible, allowing data about use of the re-packaged
version to be collected along side or separately from vanilla certbot.
2017-08-01 11:34:35 -07:00
Zach ShepherdandBrad Warren 3f86e13acc LuaDNS DNS Authenticator (#4605)
Implement an Authenticator which can fulfill a dns-01 challenge using
the LuaDNS API. Applicable only for domains using LuaDNS for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-luadns -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file without an email.
    * Path to credentials file with an invalid email.
    * Path to credentials file without a token.
    * Path to credentials file with an invalid token.
    * Domain name not registered to LuaDNS account.
2017-06-16 14:43:12 -07:00
Zach ShepherdandBrad Warren 32f7e82a69 add module-level documentation for DNS Made Easy (#4845)
Add module-level documentation describing the use of
certbot-dns-dnsmadeeasy, including discussion of credential management.
2017-06-16 13:30:24 -07:00
Zach ShepherdandBrad Warren 87f6e18ac4 Add certbot-dns-dnsmadeeasy to release script (#4844) 2017-06-16 10:35:52 -07:00
Zach ShepherdandBrad Warren f51d345d5b Low-impact cleanup of IDisplay (#4818)
Remove unused help-related display code. When NcursesDisplay was
removed[1], help was deprecated. This change removes the remaining
bits and pieces of code.

Remove unused escape-related display code. When NcursesDisplay was
removed[1], escape was deprecated. This change removes the remaining
bits and pieces of code.

Remove uses of unused menu parameters.

Remove unused default_status/default_state argument from checklist.
(This seems safe because not only is it unused, the parameter has
different names in the interface and implementation)

1 - d54cb76432

Resolves #4795.
2017-06-15 17:14:38 -07:00
Zach ShepherdandBrad Warren 0a269f31d0 DNS Made Easy DNS Authenticator (#4603)
Implement an Authenticator which can fulfill a dns-01 challenge using
the DNS Made Easy API. Applicable only for domains using DNS Made Easy.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
   (`http://api.sandbox.dnsmadeeasy.com/V2.0` used as the
    `api_endpoint` for all manual testing)
    * Used `certbot certonly --dns-dnsmadeeasy -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid API key.
    * Path to credentials file with a malformed API key.
    * Path to credentials file with an invalid Secret key.
    * Path to credentials file with a malformed Secret key.
    * Domain name not registered to DNS Made Easy account.
2017-06-15 16:41:00 -07:00
Zach ShepherdandBrad Warren a04f63bd31 route53: autogenerate documentation (#4816)
Creates documentation boilerplate for certbot-dns-route53 using
tools/sphinx-quickstart.sh.

Adds trivial `authenticator.rst` and `dns_route53.rst` files.
2017-06-09 16:01:59 -07:00
Zach ShepherdandBrad Warren a06dec3660 route53: avoid listing the plugin twice in the UI (#4794)
Without this change, the Route53 plugin is listed twice when running
Certbot interactively (once under the old name, once under the new name).

This change ensures only the new name is shown, while maintaining hidden
backwards compatibility with the old name.
2017-06-07 15:16:52 -07:00
Zach ShepherdandBrad Warren af8dae6cb2 Check domains for accidental inclusion of a scheme (#4788)
Currently, accidentally including a scheme with the domain name does not
produce a particularly helpful error message.

Examples without this change:
1. `certbot certonly -d https://test.example.com --webroot`:

Saving debug log to /tmp/certbot/logs/letsencrypt.log
Obtaining a new certificate
An unexpected error occurred:
The request message was malformed :: Error creating new authz :: Invalid character in DNS name
Please see the logfiles in /tmp/certbot/logs for more details.

2. `certbot certonly -d http://hoeveelmensengaveneeneuroomtezienhoeveelmenseneeneurogaven.example.com`

Requested domain http://hoeveelmensengaveneeneuroomtezienhoeveelmenseneeneurogaven.example.com is not a FQDN because label http://hoeveelmensengaveneeneuroomtezienhoeveelmenseneeneurogaven is too long.

Examples with this change:
1. `certbot certonly -d https://test.example.com --webroot`:

Requested name https://test.example.com appears to be a URL, not a FQDN. Try again without the leading "https://".

2. `certbot certonly -d http://hoeveelmensengaveneeneuroomtezienhoeveelmenseneeneurogaven.example.com`

Requested name http://hoeveelmensengaveneeneuroomtezienhoeveelmenseneeneurogaven.example.com appears to be a URL, not a FQDN. Try again without the leading "http://".

(Resolves #4785)
2017-06-06 15:51:16 -07:00
Zach ShepherdandBrad Warren e749937465 route53: rename to match other DNS plugins (#4747)
This change renames certbot-route53 to certbot-dns-route53 and updates
the package's setup.py file to maintain backwards compatibility.

Testing Done:
 * Run `certbot` with `-a certbot-route53:auth`, verify the plugin runs.
 * Run `certbot` with `--dns-route53`, verify the plugin runs.
2017-06-06 15:41:04 -07:00
Zach ShepherdandBrad Warren f0e1be55d6 route53: make sleep duration configurable like other DNS authenticators (#4771)
* Re-structure perform to allow for easier refactoring

* Refactor to use dns_common

* Make ttl a class variable, like other plugins
2017-06-05 21:20:17 -07:00
Zach ShepherdandBrad Warren a926d42bd6 Use certificate instead of cert in DNS plugin descriptions (#4784) 2017-06-05 19:06:35 -07:00
Zach ShepherdandBrad Warren 4448a86013 Handle releasing of DNS subpackages not yet included in certbot-auto (#4779)
Add the DNS subpackages being considered for future inclusion in
certbot-auto as non-certbot-auto packages for the 0.15.0 release.
2017-06-05 17:59:56 -07:00
Zach ShepherdandBrad Warren 2325438b56 route53: fix error handling (#4760)
Make error handling match other plugins:
 * Raise `PluginError` instead of errors from underlying libraries
 * Swallow errors during cleanup
2017-06-05 17:09:03 -07:00
Zach ShepherdandBrad Warren 6ee934b667 route53: shorten description to one line (#4772)
The new description is less informative than the current one, but its
shorter length makes the interactive plugin selection prompt easier
to read.
2017-06-05 11:44:22 -07:00
Zach ShepherdandBrad Warren c9ff9e3c7a route53: add unit tests (#4725)
This change introduces unit tests to cover all lines of the route53
plugin except for the timeout in `_wait_for_change`.
2017-05-31 15:25:24 -07:00
Zach ShepherdandBrad Warren 40e8fc4dec Handle releasing subpackages not included in certbot-auto (#4758)
This change refactors the release script to handle subpackages which are
not bundled as a part of cerbot-auto.

The script now allows developers to define subpackages as either being
included in certbot-auto, or not.

The script then uses one of three sets of subpackages for each operation:
 * The version number is updated for all non-certbot subpackages
   (and certbot itself is handled separately)
 * sdists and wheels are created for all non-certbot subpackages
   (and certbot itself is handled separately)
 * Testing is performed for all subpackages
 * Hashes are pinned for certbot-auto subpackages (including certbot)
2017-05-31 15:05:55 -07:00
Zach ShepherdandBrad Warren 6048bfa87b route53: update setup.py to follow repo conventions (#4731)
This change updates the setup script for the route53 plugin to more
closely match conventions from other packages in the repository.

Notable changes:
 * The version number is bumped to match the rest of Certbot.
 * The package now requires a matching version of ACME and core Certbot.
 * Contact information is updated.
 * Additional versions of Python are listed.
2017-05-26 14:44:05 -07:00
Zach ShepherdandBrad Warren 4146685104 route53: tweak source organization to match other packages (#4729)
This change re-organizes some ancillary files to more closely match
repository conventions.
2017-05-26 11:28:55 -07:00
Zach ShepherdandBrad Warren c827c9ec5f NS1 DNS Authenticator (#4602)
Implement an Authenticator which can fulfill a dns-01 challenge using
the NS1 DNS API. Applicable only for domains using NS1 DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-nsone -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-nsone -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting dnsimple interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid token.
    * Path to credentials file without a token.
    * Domain name not registered to NS1 account.
2017-05-26 11:24:38 -07:00
Zach ShepherdandGitHub ddd10548c8 route53: re-use boto3 client in wait (#4724)
This change re-uses the boto3 client in the wait method of the route53
authenticator in order to make it more mockable for testing purposes.
2017-05-24 10:37:08 -07:00
Zach ShepherdandBrad Warren fb02877268 DNSimple DNS Authenticator (#4587)
Implement an Authenticator which can fulfill a dns-01 challenge using
the DNSimple DNS API. Applicable only for domains using DNSimple DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-dnsimple -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-dnsimple -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting dnsimple interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid token.
    * Path to credentials file without a token.
    * Domain name not registered to DNSimple account.
2017-05-22 17:06:04 -07:00
Zach ShepherdandBrad Warren c3434bac26 DNS plugins: fix whitespace issue in authenticator pydoc (#4699) 2017-05-19 16:39:25 -07:00
Zach ShepherdandBrad Warren 49c41da4f1 CloudXNS DNS Authenticator (#4585)
Implement an Authenticator which can fulfill a dns-01 challenge using
the CloudXNS DNS API. Applicable only for domains using CloudXNS DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-cloudxns -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-cloudxns -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting cloudxns interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Domain name not registered to CloudXNS account.
2017-05-19 16:23:53 -07:00
Zach ShepherdandBrad Warren 7da5381968 Common code for Lexicon-based DNS authenticators (#4583)
Introduce abstract classes to provide base functionality for Lexicon-based DNS Authenticator plugins and corresponding test cases.
2017-05-18 14:05:47 -07:00
Zach ShepherdandBrad Warren 4caff11371 Google Cloud DNS Authenticator (#4581)
Implement an Authenticator which can fulfill a dns-01 challenge using
the Google Cloud DNS API. Applicable only for domains using Google Cloud
DNS for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-google -d`, specifying a credentials
      file as a command line argument. Verified that a certificate was
      successfully obtained without user interaction.
    * Used `certbot certonly --dns-google -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting google interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Domain name not registered to Google Cloud Platform account.
2017-05-17 11:26:26 -07:00
Zach ShepherdandBrad Warren 71451dd54b security: preserve permissions on renewal conf (#4430)
Ensure that permissions are preserved when renewal data is written to
conf files. This allows users to limit access to the file, if they wish.

Testing done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual Testing
    * Got a new certificate. Restricted the permissions on the renewal
      conf. Renewed the certificate. Verified that the new renewal conf
      permissions matched.
2017-05-11 15:49:34 -07:00
Zach ShepherdandBrad Warren 6670f828ef Deduplicate package lists in tox.ini (#4608)
Use substitution of values form other sections[1] to deduplicate information
in tox.ini, including pip install arguments and package paths.

1 - https://tox.readthedocs.io/en/latest/config.html#substitution-for-values-from-other-sections
2017-05-08 11:54:12 -07:00
Zach ShepherdandBrad Warren b41472afce Enhance display.util to support input validation (#4372)
* display: support validation of user input

To avoid each caller of `display.input` and `display.directory_select`
needing to implement validation logic, this allows for a validator to be
supplied as a part of the call.

Following the existing pattern from `webroot`, this validator is expected
to throw a `Error` when it encounters invalid input. The user then
receives a `notification` is re-prompted.

Testing Done:
 * tox -e py27
 * tox -e lint

* plugins: update webroot to use display's validation functionality

This change updates the webroot plugin to use the now-built-in validation
functionality in display, reducing duplicated code.

Testing Done:
 * tox -e py27
 * tox -e lint

* display: move validation logic to ops

To avoid adding complexity to `IDisplay` methods, move validation logic
to helper methods in `display.ops`.

Testing Done:
 * tox -e py27
 * tox -e lint
2017-04-24 17:36:00 -07:00