Code Monkey home page Code Monkey logo

certbot-dns-infomaniak's Introduction

certbot-dns-infomaniak

Infomaniak DNS Authenticator plugin for certbot

This plugin enables usage of Infomaniak public API to complete dns-01 challenges.

Issue a token

At your Infomaniak manager dashboard, to to the API section and generate a token with "Domain" scope

Installation

pip install certbot-dns-infomaniak

Usage

Via environment variable

export INFOMANIAK_API_TOKEN=xxx
certbot certonly \
  --authenticator dns-infomaniak \
  --server https://acme-v02.api.letsencrypt.org/directory \
  --agree-tos \
  --rsa-key-size 4096 \
  -d 'death.star'

If certbot requires elevated rights, the following command must be used instead:

export INFOMANIAK_API_TOKEN=xxx
sudo --preserve-env=INFOMANIAK_API_TOKEN certbot certonly \
  --authenticator dns-infomaniak \
  --server https://acme-v02.api.letsencrypt.org/directory \
  --agree-tos \
  --rsa-key-size 4096 \
  -d 'death.star'

Via INI file

Certbot will emit a warning if it detects that the credentials file can be accessed by other users on your system. The warning reads "Unsafe permissions on credentials configuration file", followed by the path to the credentials file. This warning will be emitted each time Certbot uses the credentials file, including for renewal, and cannot be silenced except by addressing the issue (e.g., by using a command like chmod 600 to restrict access to the file).

--authenticator dns-infomaniak select the authenticator plugin (Required)
--dns-infomaniak-credentials Infomaniak Token credentials INI file. (Required)

An example credentials.ini file:

dns_infomaniak_token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

To start using DNS authentication for Infomaniak, pass the following arguments on certbot's command line:

certbot certonly \
  --authenticator dns-infomaniak \
  --dns-infomaniak-credentials <path to file> \
  --server https://acme-v02.api.letsencrypt.org/directory \
  --agree-tos \
  --rsa-key-size 4096 \
  -d 'death.star'

Automatic renewal

By default, certbot installs a service that periodically renews its certificates automatically. In order to do this, the command must know the API key, otherwise it will fail silently.

In order to enable automatic renewal for your wildcard certificates, you will need to edit /lib/systemd/system/certbot.service. In there, add the following line in Service, with <YOUR_API_TOKEN> replaced with your actual token:

Environment="INFOMANIAK_API_TOKEN=<YOUR_API_TOKEN>"

Acknowledgments

Based on certbot-dns-ispconfig plugin at https://github.com/m42e/certbot-dns-ispconfig/

certbot-dns-infomaniak's People

Contributors

reneluria avatar fuechslein avatar a-detiste avatar robb-fr avatar mxjeff avatar pr000t avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.