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

Support for OVH API v2 #2385

Open
1 task done
Kaauw opened this issue Dec 23, 2024 · 1 comment
Open
1 task done

Support for OVH API v2 #2385

Kaauw opened this issue Dec 23, 2024 · 1 comment

Comments

@Kaauw
Copy link

Kaauw commented Dec 23, 2024

Welcome

  • Yes, I've searched similar issues on GitHub and didn't find any.

How do you use lego?

Through Traefik

Detailed Description

Hello Team,

While trying to generate a certificate for an application through traefik, I have an error while using an existing API Key.

When looking in the log, it try to reach /domain/zone/<name>/record but it's only available trough API V1. Currently, I'm using API V2.

2024-12-23T13:47:12Z ERR github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:528 > Unable to obtain ACME certificate for domains error="unable to generate a certificate for the domains [njos.be *.njos.be]: error: one or more domains had a problem:\n[*.njos.be] [*.njos.be] acme: error presenting token: ovh: error when call api to add record (/domain/zone/njos.be/record): OVHcloud API error (status code 403): Client::Forbidden: \"This credential is not valid\" (X-OVH-Query-Id: [...]\n[njos.be] [njos.be] acme: error presenting token: ovh: error when call api to add record (/domain/zone/njos.be/record): OVHcloud API error (status code 403): Client::Forbidden: \"This credential is not valid\" (X-OVH-Query-Id: [...])\n" ACME CA=https://acme-v02.api.letsencrypt.org/directory acmeCA=https://acme-v02.api.letsencrypt.org/directory domains=["njos.be","*.njos.be"] providerName=njos.acme routerName=test@docker rule=Host(`test.njos.be`)

Because the API Key is strictly filtering API V2 targets, it's not working.

It would be great to have an environment variables and all the logic to choose between both API.

Regards,

Ben

@ldez
Copy link
Member

ldez commented Dec 23, 2024

Hello,

From what I can see, the v2 is in beta, there are missing endpoints.

I didn't find endpoints to create/delete records.

ping @rbeuque74 @yomovh

FYI, lego uses the official OVH API client: https://github.com/ovh/go-ovh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants