__init__.py 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. """
  2. The `~certbot_dns_dnspod.dns_dnspod` plugin automates the process of
  3. completing a ``dns-01`` challenge (`~acme.challenges.DNS01`) by creating, and
  4. subsequently removing, TXT records using the DNSPod API.
  5. Named Arguments
  6. ---------------
  7. ======================================== =====================================
  8. ``--dns-dnspod-credentials`` DNSPod credentials_ INI file.
  9. (Required)
  10. ``--dns-dnspod-propagation-seconds`` The number of seconds to wait for DNS
  11. to propagate before asking the ACME
  12. server to verify the DNS record.
  13. (Default: 30)
  14. ======================================== =====================================
  15. Credentials
  16. -----------
  17. Use of this plugin requires a configuration file containing DNSPod API
  18. credentials, obtained from your DNSPod
  19. `API page <https://www.dnspod.cn/docs/index.html>`_.
  20. .. code-block:: ini
  21. :name: credentials.ini
  22. :caption: Example credentials file:
  23. # DNSPod API credentials used by Certbot
  24. dns_dnspod_api_id = 12345
  25. dns_dnspod_api_token = 1234567890abcdef1234567890abcdef
  26. The path to this file can be provided interactively or using the
  27. ``--dns-dnspod-credentials`` command-line argument. Certbot records the path
  28. to this file for use during renewal, but does not store the file's contents.
  29. .. caution::
  30. You should protect these API credentials as you would the password to your
  31. DNSPod account. Users who can read this file can use these credentials to
  32. issue arbitrary API calls on your behalf. Users who can cause Certbot to run
  33. using these credentials can complete a ``dns-01`` challenge to acquire new
  34. certificates or revoke existing certificates for associated domains, even if
  35. those domains aren't being managed by this server.
  36. Certbot will emit a warning if it detects that the credentials file can be
  37. accessed by other users on your system. The warning reads "Unsafe permissions
  38. on credentials configuration file", followed by the path to the credentials
  39. file. This warning will be emitted each time Certbot uses the credentials file,
  40. including for renewal, and cannot be silenced except by addressing the issue
  41. (e.g., by using a command like ``chmod 600`` to restrict access to the file).
  42. Examples
  43. --------
  44. .. code-block:: bash
  45. :caption: To acquire a certificate for ``example.com``
  46. certbot certonly \\
  47. --dns-dnspod \\
  48. --dns-dnspod-credentials ~/.secrets/certbot/dnspod.ini \\
  49. -d example.com
  50. .. code-block:: bash
  51. :caption: To acquire a single certificate for both ``example.com`` and
  52. ``www.example.com``
  53. certbot certonly \\
  54. --dns-dnspod \\
  55. --dns-dnspod-credentials ~/.secrets/certbot/dnspod.ini \\
  56. -d example.com \\
  57. -d www.example.com
  58. .. code-block:: bash
  59. :caption: To acquire a certificate for ``example.com``, waiting 60 seconds
  60. for DNS propagation
  61. certbot certonly \\
  62. --dns-dnspod \\
  63. --dns-dnspod-credentials ~/.secrets/certbot/dnspod.ini \\
  64. --dns-dnspod-propagation-seconds 60 \\
  65. -d example.com
  66. """