mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 10:38:41 -04:00
Bug: Invalid signature during record creation on OVH with mode: api #182
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @P4uLT on GitHub (Mar 13, 2022).
Originally assigned to: @qdm12 on GitHub.
Bad Request: ERROR cannot list records: bad HTTP status: 400 Bad Request: Invalid signature:
Is this urgent: Yes
DNS provider(s) you use: OVH
Program version:
Running version latest built on 2022-02-26T13:23:18Z (commit b1a69e0)What are you using to run the container: docker-compose
Extra information (optional)
Logs:
Configuration file (remove your credentials!):
Host OS: Openmediavault running docker.
@cthybert commented on GitHub (Oct 20, 2022):
same issue here
@edaubert commented on GitHub (Dec 28, 2022):
Same issue here and it seems the same as https://github.com/qdm12/ddns-updater/issues/244
I use
Running version latest built on 2022-12-14T20:23:40Z (commit 3fd82ab)Here is the log I have
I try to reproduce this request using https://eu.api.ovh.com/console/#/domain/zone/%7BzoneName%7D/record~GET
Everything seems to be OK.
@edaubert commented on GitHub (Jan 4, 2023):
According to https://docs.ovh.com/gb/en/api/first-steps-with-ovh-api/
X-Ovh-Signature:should be defined according to"$1$" + SHA1_HEX(AS+"+"+CK+"+"+METHOD+"+"+QUERY+"+"+BODY+"+"+TSTAMP)When I look on
89711cd76d/internal/settings/providers/ovh/headers.go (L22)It seems to me that it is not the same implementation
I see
p.appSecret + "+" + p.consumerKey + "+" + httpMethod + "+" + p.apiURL.String() + "+" + url.Path + "+" + string(body) + "+" + strconv.Itoa(int(timestamp)),I have an interrogation about
p.apiURL.String() + "+" + url.PathIf apiURL and url.Path should be concatenate, it doesn't need to have
"+".Am I wrong ?
@edaubert commented on GitHub (Jan 10, 2023):
Ok so after some atempts, I finally found the issue.
p.apiURL.String() + "+" + url.Pathgive us something likehttps://eu.api.ovh.com/1.0/1.0/domain/zone/<domain>/recordThe issue here is
1.0/1.0/, we should only have one time the API version.This is due to the way the URL is built on the different request because p.apiURL is already used to build the path of the complete url we want to call.
Additionnally, we need to specify the query parameters.
So we should set something like
https://eu.api.ovh.com/1.0/domain/zone/<domain>/record?fieldType=A&subDomain=<subdomain>.I am going to build a PR about this.
@fredericrous commented on GitHub (Feb 1, 2023):
hey @edaubert , thank you for contributing. I tried to use your PR but it was failing.
I'm having issues with my NAS since 2 weeks already and didn't get time to diagnose, I was hopping this PR was the solution
looking at the code only, the implementation for the signature looks good https://github.com/ovh/go-ovh/blob/master/ovh/ovh.go#L300
@edaubert commented on GitHub (Feb 6, 2023):
Hi @fredericrous,
Sorry I did not apply linters I guess.
I will build another pull request to fix that and try to reproduce the github actions to be sure everything is fine on the verify phase.
@qdm12 commented on GitHub (Jun 12, 2023):
This should be fixed by #431