Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Reach the OVHcloud API at its new addresses, `api.eu.ovhcloud.com` for `ovh-eu` and `api.ca.ovhcloud.com` for `ovh-ca`, as go-ovh 1.10.0 does; an outbound filter that only lets `eu.api.ovh.com` or `ca.api.ovh.com` through needs the new name. The links that open the key creation page use the same addresses.

## [1.0.3] - 2026-11-11

### Changed
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Data

internal/catalog/snapshots/ and internal/catalog/testdata/ are derived from the
public API descriptions (schemas) published by OVHcloud at
https://eu.api.ovh.com/1.0/, https://ca.api.ovh.com/1.0/ and
https://api.eu.ovhcloud.com/1.0/, https://api.ca.ovhcloud.com/1.0/ and
https://api.us.ovhcloud.com/1.0/.

-------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ Prenez celui qui correspond à la région de votre compte, telle que la nomment

**`ovh-eu`**

<https://eu.api.ovh.com/createToken/?GET=/me/api/credential&GET=/me/api/credential/*&GET=/me/api/application&GET=/me/api/application/*&DELETE=/me/api/credential/*&DELETE=/me/api/application/*>
<https://api.eu.ovhcloud.com/createToken/?GET=/me/api/credential&GET=/me/api/credential/*&GET=/me/api/application&GET=/me/api/application/*&DELETE=/me/api/credential/*&DELETE=/me/api/application/*>

**`ovh-ca`**

<https://ca.api.ovh.com/createToken/?GET=/me/api/credential&GET=/me/api/credential/*&GET=/me/api/application&GET=/me/api/application/*&DELETE=/me/api/credential/*&DELETE=/me/api/application/*>
<https://api.ca.ovhcloud.com/createToken/?GET=/me/api/credential&GET=/me/api/credential/*&GET=/me/api/application&GET=/me/api/application/*&DELETE=/me/api/credential/*&DELETE=/me/api/application/*>

**`ovh-us`**

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ one matching the region of your account, as the official SDKs name it.

**`ovh-eu`**

<https://eu.api.ovh.com/createToken/?GET=/me/api/credential&GET=/me/api/credential/*&GET=/me/api/application&GET=/me/api/application/*&DELETE=/me/api/credential/*&DELETE=/me/api/application/*>
<https://api.eu.ovhcloud.com/createToken/?GET=/me/api/credential&GET=/me/api/credential/*&GET=/me/api/application&GET=/me/api/application/*&DELETE=/me/api/credential/*&DELETE=/me/api/application/*>

**`ovh-ca`**

<https://ca.api.ovh.com/createToken/?GET=/me/api/credential&GET=/me/api/credential/*&GET=/me/api/application&GET=/me/api/application/*&DELETE=/me/api/credential/*&DELETE=/me/api/application/*>
<https://api.ca.ovhcloud.com/createToken/?GET=/me/api/credential&GET=/me/api/credential/*&GET=/me/api/application&GET=/me/api/application/*&DELETE=/me/api/credential/*&DELETE=/me/api/application/*>

**`ovh-us`**

Expand Down
3 changes: 2 additions & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ in all. Writes are sent again too, since a call refused for its rate did nothing
| `GET` | `/1.0/` and the `*.json` schemas it lists | Building the route catalogue, without authentication |

Accepted endpoints are `ovh-eu`, `ovh-ca` and `ovh-us`. The Kimsufi and SoYouStart entries of
the `go-ovh` table resolve to hosts outside `api.ovh.com` and are refused.
the `go-ovh` table resolve to hosts on their own domains, `kimsufi.com` and `soyoustart.com`, and
are refused.

The management key needs these rules, declared in `ovh.ManagementRules`. A test ties every rule,
`ovh.AddressRule` included, to a call the client makes, and every call under `/me` to a rule.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.27.0

toolchain go1.27.4

require github.com/ovh/go-ovh v1.9.0
require github.com/ovh/go-ovh v1.10.0

require (
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nu
github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg=
github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g=
github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM=
github.com/ovh/go-ovh v1.9.0 h1:6K8VoL3BYjVV3In9tPJUdT7qMx9h0GExN9EXx1r2kKE=
github.com/ovh/go-ovh v1.9.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c=
github.com/ovh/go-ovh v1.10.0 h1:TlH3Y7FRxgnPeYJHPbNSCESU8GkX2Sxo2ifaiS+IwH8=
github.com/ovh/go-ovh v1.10.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
Expand Down
2 changes: 1 addition & 1 deletion internal/httpapi/handoff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestHandoffCarriesEveryRuleToThePageOfTheRegion(t *testing.T) {
}

got := decode[handoffResponse](t, rec).URL
if !strings.HasPrefix(got, "https://eu.api.ovh.com/createToken/?") {
if !strings.HasPrefix(got, "https://api.eu.ovhcloud.com/createToken/?") {
t.Fatalf("url = %q, want the page of the configured region", got)
}
for _, want := range []string{
Expand Down
2 changes: 1 addition & 1 deletion internal/httpapi/inventory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestTheSessionCarriesTheSensitiveBranchesOfTheAudit(t *testing.T) {
func TestTheSessionCarriesThePageThatIssuesAManagementKey(t *testing.T) {
got := decode[sessionResponse](t, request(t, newTestServer(t, inventoryFixture()), "/api/session", true)).ManagementKeyURL

if !strings.HasPrefix(got, "https://eu.api.ovh.com/createToken/?") {
if !strings.HasPrefix(got, "https://api.eu.ovhcloud.com/createToken/?") {
t.Fatalf("managementKeyUrl = %q, want the page of the configured region", got)
}
for _, rule := range []string{"GET=/me/api/credential", "DELETE=/me/api/credential/*"} {
Expand Down
2 changes: 1 addition & 1 deletion internal/ovh/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
)

// supportedEndpoints is deliberately narrower than the SDK table. The Kimsufi and
// SoYouStart entries point at hosts outside api.ovh.com, which the outbound rule does
// SoYouStart entries point at hosts on their own domains, which the outbound rule does
// not cover, and supporting them has not been decided.
var supportedEndpoints = []string{"ovh-eu", "ovh-ca", "ovh-us"}

Expand Down
8 changes: 4 additions & 4 deletions internal/ovh/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ func TestUnsupportedEndpointsAreRefused(t *testing.T) {

func TestTheCreateTokenPageIsOnTheHostOfTheRegion(t *testing.T) {
cases := map[string]string{
"ovh-eu": "https://eu.api.ovh.com/createToken/",
"ovh-ca": "https://ca.api.ovh.com/createToken/",
"ovh-eu": "https://api.eu.ovhcloud.com/createToken/",
"ovh-ca": "https://api.ca.ovhcloud.com/createToken/",
"ovh-us": "https://api.us.ovhcloud.com/createToken/",
}

Expand All @@ -320,7 +320,7 @@ func TestTheCreateTokenLinkCarriesTheRulesReadably(t *testing.T) {
t.Fatalf("CreateTokenURL: %v", err)
}

want := "https://eu.api.ovh.com/createToken/" +
want := "https://api.eu.ovhcloud.com/createToken/" +
"?GET=/me/api/credential" +
"&GET=/me/api/credential/*" +
"&GET=/me/api/application" +
Expand Down Expand Up @@ -364,7 +364,7 @@ func TestAnUnusualRulePathIsEscaped(t *testing.T) {
if err != nil {
t.Fatalf("CreateTokenURL: %v", err)
}
if want := "https://eu.api.ovh.com/createToken/?GET=/me/api%3Fx%3D1%26y%3D2%20z%23f"; got != want {
if want := "https://api.eu.ovhcloud.com/createToken/?GET=/me/api%3Fx%3D1%26y%3D2%20z%23f"; got != want {
t.Errorf("link = %q, want %q", got, want)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/publicip/publicip.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// The call is never made on its own. It happens when the reader asks for the address, or
// restricts the credential the tool runs with, which cannot be done safely without knowing
// it. The whole feature can be switched off, so that an instance can be run with nothing but
// api.ovh.com on its outbound path.
// the OVHcloud API on its outbound path.
package publicip

import (
Expand Down
4 changes: 2 additions & 2 deletions ovh.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[default]
; The region of your account, as the official SDKs name it: ovh-eu, ovh-ca or ovh-us.
; The Kimsufi and SoYouStart endpoints are not accepted, because they resolve to hosts
; outside api.ovh.com.
; on their own domains, kimsufi.com and soyoustart.com.
endpoint=ovh-eu

[ovh-eu]
Expand All @@ -31,7 +31,7 @@ endpoint=ovh-eu
; those.
;
; This link opens the OVHcloud page with exactly those rules prefilled:
; https://eu.api.ovh.com/createToken/?GET=/me/api/credential&GET=/me/api/credential/*&GET=/me/api/application&GET=/me/api/application/*&DELETE=/me/api/credential/*&DELETE=/me/api/application/*
; https://api.eu.ovhcloud.com/createToken/?GET=/me/api/credential&GET=/me/api/credential/*&GET=/me/api/application&GET=/me/api/application/*&DELETE=/me/api/credential/*&DELETE=/me/api/application/*
application_key=
application_secret=
consumer_key=
Expand Down