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

After updating to 0.13.1 existing api keys do not work anymore #29

Closed ntimo closed 8 months ago

ntimo commented 8 months ago

Hello, after the update to 0.13.1 existing api keys don't work anymore. Is there a way to fix this? If not that would mean a huge amount of work for me. The UI also still displays the old api key correctly but using it gives a 401.

Best wishes, Timo

gregtwallace commented 8 months ago

The new keys are smaller but this should not impact use of old keys. I just checked my prod server and mine have not had an issue. I'm going to guess your issue is actually breaking change # 3 from the 0.13.0 release notes:

3: Removed redirects from old paths. When LeGo added the base path /legocerthub old routes at base / were given redirects to prevent breakage. These redirects are now removed and any clients using the old paths will need their scripts updated.

If your client scripts are making API calls without '/legocerthub' in the path, you'll receive a 401. You can further test by turning on dev mode and the calls to the bad paths will yield a 404 instead.

ntimo commented 8 months ago

Yes you are indeed correct :O Sorry for the issue then. I think returing a 404 would be the better status code, since this is kind of what would have pointed me to the correct direction.

gregtwallace commented 8 months ago

You're right. Next release actually removes dev mode and I was considering changing this to a 404. This has convinced me to make the change.

https://github.com/gregtwallace/legocerthub-backend/commit/7ae88a6efbd6fe7fe896b60a7430a13318f1fdde