gregtwallace / certwarden

Cert Warden is a centralized ACME Client. It provides an API for certificate consumers to fetch their individual keys and certs with API keys.
https://www.certwarden.com/
Other
176 stars 6 forks source link

Config File Example Missing #28

Closed KodySalak closed 9 months ago

KodySalak commented 9 months ago

Not sure how to format the Cloudflare DNS challenge since there isn't an example of it, and the container now is in a restart loop.

Logs:

2023-10-11T03:35:47.735Z    info    app/logger.go:132   init logging started (log level: debug)
2023-10-11T03:35:47.735Z    info    app/app_create.go:38    starting LeGo CertHub v0.13.0
2023-10-11T03:35:47.741Z    info    app/logger.go:134   main logging started (log level: debug)
2023-10-11T03:35:47.744Z    debug   sqlite/setup.go:132 database user_version is current (2)
2023-10-11T03:35:47.745Z    info    acme/directory.go:102   starting acme directory refresh service (https://acme-staging-v02.api.letsencrypt.org/directory)
2023-10-11T03:35:47.745Z    info    acme/directory.go:102   starting acme directory refresh service (https://acme-v02.api.letsencrypt.org/directory)
2023-10-11T03:35:47.745Z    info    acme/directory.go:76    updating directory from https://acme-staging-v02.api.letsencrypt.org/directory
2023-10-11T03:35:47.746Z    info    acme/directory.go:76    updating directory from https://acme-v02.api.letsencrypt.org/directory
2023-10-11T03:35:47.746Z    error   challenges/service.go:76    failed to configure challenge provider(s) (cloudflare config missing an account (email and global key) or api token)
2023-10-11T03:35:47.747Z    error   app/app_create.go:149   failed to configure app challenges (cloudflare config missing an account (email and global key) or api token)
2023-10-11T03:35:47.747Z    error   app/run.go:64   failed to create app (cloudflare config missing an account (email and global key) or api token)

Config

'challenges':
  'dns_checker':
    'skip_check_wait_seconds': 40
    'dns_services':
      - 'primary_ip': '1.1.1.1'
        'secondary_ip': '1.0.0.1'
      - 'primary_ip': '9.9.9.9'
        'secondary_ip': '149.112.112.112'
      - 'primary_ip': '8.8.8.8'
        'secondary_ip': '8.8.4.4'
  'providers':
    # If any provider is configured, the default will not be
    'dns_01_cloudflare':
      - 'domains':
          - '*'
      - 'accounts':
          'email': '<my@email.address>'
          'global_api_key': '<My API Key>'

I tried multiple different variations of the YAML, including the below:

  'providers':
    # If any provider is configured, the default will not be
    'dns_01_cloudflare':
      - 'domains':
          - '*'
      - 'accounts':
          -  'email': '<my@email.address>'
             'global_api_key': '<My API Key>'
  'providers':
    # If any provider is configured, the default will not be
    'dns_01_cloudflare':
      - 'domains':
          - '*'
      - 'accounts':
          -  'email': '<my@email.address>'
          -  'global_api_key': '<My API Key>'
  'providers':
    # If any provider is configured, the default will not be
    'dns_01_cloudflare':
      - 'domains':
          - '*'
      'accounts':
           'email': '<my@email.address>'
        -  'global_api_key': '<My API Key>'

To no avail.

KodySalak commented 9 months ago

Fixed.

There are two files. One is config.DEFAULT.yaml and one is config.EXAMPLE.yaml (which is left out of the binaries in the release).

Might be good to put these files in this project for ease-of-access, as it was an actual pain in the a$$ to find out there was an example file.

Same thing goes for the release note:

1: LeGo config MUST be updated using the new provider format which includes specifying domains. See the example config file.

Where??? I found it after looking for a minute, but linking them (or placing in this repo) would be great since you have the project split up into multiple repos.

gregtwallace commented 9 months ago

I separated the config to two files for better clarity but forgot to actually add the copy steps to include the new file in the release packages and docker container. I will fix this. Thanks for pointing it out.

KodySalak commented 9 months ago

Apologies for the snarkiness - thank you for updating your release notes.

gregtwallace commented 9 months ago

No worries. There were a ton of changes between releases so I was bound to miss something. I understand the frustration.