Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store ACME_DIRECTORY into ca.conf #2971

Closed
wants to merge 1 commit into from
Closed

Store ACME_DIRECTORY into ca.conf #2971

wants to merge 1 commit into from

Conversation

pini-gh
Copy link

@pini-gh pini-gh commented May 30, 2020

See issue #2970.
The use case is when one wants to script an account email address change.
Something like:

  for ca_conf in <acme.sh_conf_home>/ca/*/ca.conf; do
    eval $(grep '^ACME_DIRECTORY=' "$ca_conf")
    acme.sh --update-account --config_home <acme.sh_conf_home> --server "$ACME_DIRECTORY" --accountemail <new_email>
  done

The use case is when one wants to script an account email address change.
Something like:
  for ca_conf in <acme.sh_conf_home>/ca/*/ca.conf; do
    eval $(grep '^ACME_DIRECTORY=' "$ca_conf")
    acme.sh --update-account --config_home <acme.sh_conf_home> --server "$ACME_DIRECTORY" --accountemail <new_email>
  done
@pini-gh
Copy link
Author

pini-gh commented Jun 1, 2020

Neil (in #2970):

But I won't accept the PR for just the case that you want to enumerate all the CA to update email.

This is not just about my use case. This is about fixing a currently broken data model.

@acmesh-official acmesh-official deleted a comment from auto-comment bot Jun 5, 2020
@Neilpang
Copy link
Member

Neilpang commented Jun 5, 2020

what "data model" ?

@pini-gh
Copy link
Author

pini-gh commented Jun 5, 2020

what "data model" ?

Rephrasing #2970:

  • An acme.sh configuration directory is tied to one and only one email address
  • An acme.sh configuration directory can hold several accounts for different ACME service providers. These accounts are configured under <acme.sh_conf_dir>/ca/<service_provider_fqdn>.
  • In case one need to update the default configuration email, there is no way to retrieve the acme_directory setting tied to each account to accomplish this task.

I need this information for my fork of docker-letsencrypt-nginx-proxy-companion to work with acme.sh as Let's Encrypt client. Because this image allows default email changes and is expected to update the accounts under the default configuration directory automatically.

For now I patch acme.sh when building the docker image, but this is not ideal.

BTW this is a one line patch with no possible side effect at all.

@pini-gh
Copy link
Author

pini-gh commented Jun 7, 2020

OK, I've found another way to workaround this issue: use 'default' config for empty account email only.

Keeping this PR open still, since other people could run into the same issue.

@pini-gh
Copy link
Author

pini-gh commented Dec 5, 2020

Closing this PR now, as I'm deleting my fork.

@pini-gh pini-gh closed this Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants