-
Notifications
You must be signed in to change notification settings - Fork 647
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
security/acme-client switching from staging to prod leads to account error #1528
Comments
|
I can confirm this issue with the same steps to reproduce. |
|
Same |
|
Same. This can be avoided by creating dedicated accounts for STAGING and PROD and to make sure to change those in each and every certificate when changing the global PROD/STAGING setting. |
|
Not in my case, even changing account doesn't help : `
|
|
You need to start from scratch by cleaning up the artifacts first, otherwise the account mixup will persist. |
|
Got the exact same error as cited in the bug report. However I used jpawlowski's suggestion. Switching to a new LE account fixed the problem. But needed to run (re-) issue twice. It seems the first (re-) issue just registered the new LE account and stopped there. The output below came from acme.sh with a --debug 2 flag. This is recent pull request (#1531 debug change is buried but it's there) not yet integrated into OPNsense. So, yes, I'm running a self-patched system. This level of detail may be different on your system (YMMV). Second try using the same LE account as registered above. Did nothing more than hit “Forcefully (re-) issue the selected certificate?” button a second time. Cert issued. Success! But perhaps there is a bug, that is, it should issue a cert the first time through? |
|
I did as well, but unfortunatelly getting this :
|
|
That’s just the regular limiter when you have tried too often and there are pending validations. Wait for them to time out, it should usually take 1-2 hours. |
|
So. I cannot get this working at all...Created all fresh. Last Acme Status : validation failed Log: |
|
@miodzicho I think that's an unrelated problem. Please open a new issue and provide more details about your Let's Encrypt plugin and certificate configuration. |
I think this can be solved. Currently we'll create a new directory for every LE account: plugins/security/acme-client/src/opnsense/scripts/OPNsense/AcmeClient/certhelper.php Line 347 in a878826
It should be pretty easy to modify this to not only use the internal Account ID but also include the LE environment in the path. This should allow to use the "same" account for both the LE staging and production environments. However, this will provide a challenge for all existing configurations, because we have to migrate all accounts to the new (staging or production) path. I'll try to figure this out. |
|
@jpawlowski I've created a fix in fraenki@5866358, would you do a quick review? |
|
Patch 5866358 fixed the issue for me, I had restored my config.xml previously and was having trouble getting my existing certificate to renew even after rekeying etc. I was switching around to the staging environment etc. After deleting/recreating everything again I was still having issues. Applied patch, renewed, and it seems to be working now. I was getting the same invalid account URL message from the staging server URL. |
|
@ErikJStaab Thanks for testing! I'm closing this issue, the fix will be available in the upcoming release 1.27 of the os-acme-client plugin. |
I tried with different accounts, even a new one, but with the same result.
What i noticed after some extra digging is that the error states the invalid account URL as "https://acme-staging-v02.api.letsencrypt.org/acme/acct/9468460\" which is clearly pointing at the LE staging environment although i changed my setting to use the production environment.
Is the script trying to get a real certificate from the staging environment??? I can't imagine, otherwise a lot of people would have the same problem.
I also noticed the following lines in the log:
It is always the same key hash, but i cannot find where it is coming from. I would expect that it changes when i use a new account, but it doesn't.
Steps to reproduce:
Kind regards,
Jack.
Originally posted by @jekare in #1473 (comment)
The text was updated successfully, but these errors were encountered: