Skip to content

Commit 3721d62

Browse files
Merge branch 'main' into oas-bot-23836109914/iaas
2 parents 84e015d + 2ea840d commit 3721d62

File tree

59 files changed

+618
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+618
-52
lines changed

CHANGELOG.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
- `git`: [v0.11.1](services/git/CHANGELOG.md#v0111)
2323
- **Dependencies:** Bump STACKIT SDK core module from `v0.23.0` to `v0.24.0`
2424
- `iaas`:
25+
- [v1.9.0](services/iaas/CHANGELOG.md#v190)
26+
- **Feature:** Add `Cascade` field to `ApiDeleteVolumeRequest` model
27+
- **Feature:** Add `ConfigDrive` field to `CreateServerPayload` and `Server` model
28+
- [v1.8.2](services/iaas/CHANGELOG.md#v182)
29+
- **Dependencies:** Bump SDK resourcemanager module from `v0.21.0` to `v0.21.1`
2530
- [v1.8.1](services/iaas/CHANGELOG.md#v181)
2631
- **Dependencies:** Bump STACKIT SDK core module from `v0.23.0` to `v0.24.0`
2732
- [v1.8.0](services/iaas/CHANGELOG.md#v180)
@@ -74,8 +79,11 @@
7479
- **Dependencies:** Bump STACKIT SDK core module from `v0.23.0` to `v0.24.0`
7580
- `serverupdate`: [v1.4.2](services/serverupdate/CHANGELOG.md#v142)
7681
- **Dependencies:** Bump STACKIT SDK core module from `v0.23.0` to `v0.24.0`
77-
- `serviceaccount`: [v0.15.1](services/serviceaccount/CHANGELOG.md#v0151)
78-
- **Dependencies:** Bump STACKIT SDK core module from `v0.23.0` to `v0.24.0`
82+
- `serviceaccount`:
83+
- [v0.16.0](services/serviceaccount/CHANGELOG.md#v0160)
84+
- **Feature:** Add `TokenEndpoint` field to `ServiceAccount` model
85+
- [v0.15.1](services/serviceaccount/CHANGELOG.md#v0151)
86+
- **Dependencies:** Bump STACKIT SDK core module from `v0.23.0` to `v0.24.0`
7987
- `serviceenablement`: [v1.4.2](services/serviceenablement/CHANGELOG.md#v142)
8088
- **Dependencies:** Bump STACKIT SDK core module from `v0.23.0` to `v0.24.0`
8189
- `sfs`: [v0.6.2](services/sfs/CHANGELOG.md#v062)
@@ -99,9 +107,11 @@
99107
- **Dependencies:** Bump STACKIT SDK core module from `v0.21.1` to `v0.24.0`
100108
- `vpn`: [v0.4.1](services/vpn/CHANGELOG.md#v041)
101109
- **Dependencies:** Bump STACKIT SDK core module from `v0.23.0` to `v0.24.0`
102-
103-
- `core`: [v0.24.0](core/CHANGELOG.md#v0240)
104-
- **Bugfix:** Allow setting waiter timeouts via context, that are longer than the default timeout.
110+
- `core`:
111+
- [v0.24.1](core/CHANGELOG.md#v0241)
112+
- **Improvement:** Fix misleading error messages in authentication setup and credentials parsing.
113+
- [v0.24.0](core/CHANGELOG.md#v0240)
114+
- **Bugfix:** Allow setting waiter timeouts via context, that are longer than the default timeout.
105115

106116
## Release (2026-03-27)
107117
- `alb`:

core/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v0.24.1
2+
- **Improvement:** Fix misleading error messages in authentication setup and credentials parsing.
3+
14
## v0.24.0
25
- **Bugfix:** Allow setting waiter timeouts via context, that are longer than the default timeout.
36

core/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.24.0
1+
v0.24.1

core/auth/auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func SetupAuth(cfg *config.Configuration) (rt http.RoundTripper, err error) {
5454
} else if cfg.WorkloadIdentityFederation {
5555
wifRoundTripper, err := WorkloadIdentityFederationAuth(cfg)
5656
if err != nil {
57-
return nil, fmt.Errorf("configuring no auth client: %w", err)
57+
return nil, fmt.Errorf("configuring workload identity federation client: %w", err)
5858
}
5959
return wifRoundTripper, nil
6060
} else if cfg.ServiceAccountKey != "" || cfg.ServiceAccountKeyPath != "" {
@@ -278,7 +278,7 @@ func readCredentialsFile(path string) (*Credentials, error) {
278278
var credentials Credentials
279279
err = json.Unmarshal(credentialsRaw, &credentials)
280280
if err != nil {
281-
return nil, fmt.Errorf("unmaPrivateKeyrshalling credentials: %w", err)
281+
return nil, fmt.Errorf("unmarshalling credentials: %w", err)
282282
}
283283
return &credentials, nil
284284
}

core/auth/auth_test.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,18 @@ func TestReadCredentials(t *testing.T) {
367367
}
368368
}
369369

370+
func TestReadCredentialsFileErrorMessage(t *testing.T) {
371+
setTemporaryHome(t)
372+
373+
_, err := readCredentialsFile("test_resources/test_invalid_structure.json")
374+
if err == nil {
375+
t.Fatalf("error expected")
376+
}
377+
if !strings.Contains(err.Error(), "unmarshalling credentials") {
378+
t.Fatalf("expected unmarshalling credentials error, got %s", err)
379+
}
380+
}
381+
370382
func TestDefaultAuth(t *testing.T) {
371383
privateKey, err := generatePrivateKey()
372384
if err != nil {
@@ -768,6 +780,23 @@ func TestKeyAuthPemInsteadOfJsonKeyErrorHandling(t *testing.T) {
768780
}
769781
}
770782

783+
func TestSetupAuthWorkloadIdentityErrorMessage(t *testing.T) {
784+
setTemporaryHome(t)
785+
t.Setenv("STACKIT_SERVICE_ACCOUNT_EMAIL", "")
786+
t.Setenv("STACKIT_FEDERATED_TOKEN_FILE", "")
787+
788+
_, err := SetupAuth(&config.Configuration{WorkloadIdentityFederation: true})
789+
if err == nil {
790+
t.Fatalf("error expected")
791+
}
792+
if !strings.Contains(err.Error(), "configuring workload identity federation client") {
793+
t.Fatalf("expected workload identity federation error, got %s", err)
794+
}
795+
if strings.Contains(err.Error(), "configuring no auth client") {
796+
t.Fatalf("unexpected no auth error message: %s", err)
797+
}
798+
}
799+
771800
func TestNoAuth(t *testing.T) {
772801
for _, test := range []struct {
773802
desc string

examples/auditlog/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/stackitcloud/stackit-sdk-go/services/auditlog => ../../servic
77

88
require (
99
github.com/stackitcloud/stackit-sdk-go/core v0.24.0
10-
github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.1.5
10+
github.com/stackitcloud/stackit-sdk-go/services/auditlog v0.3.2
1111
)
1212

1313
require (

examples/authentication/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/stackitcloud/stackit-sdk-go/services/dns => ../../services/dn
77

88
require (
99
github.com/stackitcloud/stackit-sdk-go/core v0.24.0
10-
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.6
10+
github.com/stackitcloud/stackit-sdk-go/services/dns v0.19.2
1111
)
1212

1313
require (

examples/authorization/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.21
55
// This is not needed in production. This is only here to point the golangci linter to the local version instead of the last release on GitHub.
66
replace github.com/stackitcloud/stackit-sdk-go/services/authorization => ../../services/authorization
77

8-
require github.com/stackitcloud/stackit-sdk-go/services/authorization v0.12.0
8+
require github.com/stackitcloud/stackit-sdk-go/services/authorization v0.14.2
99

1010
require (
1111
github.com/golang-jwt/jwt/v5 v5.3.1 // indirect

examples/backgroundrefresh/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/stackitcloud/stackit-sdk-go/services/dns => ../../services/dn
77

88
require (
99
github.com/stackitcloud/stackit-sdk-go/core v0.24.0
10-
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.6
10+
github.com/stackitcloud/stackit-sdk-go/services/dns v0.19.2
1111
)
1212

1313
require (

examples/configuration/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replace github.com/stackitcloud/stackit-sdk-go/services/dns => ../../services/dn
77

88
require (
99
github.com/stackitcloud/stackit-sdk-go/core v0.24.0
10-
github.com/stackitcloud/stackit-sdk-go/services/dns v0.17.6
10+
github.com/stackitcloud/stackit-sdk-go/services/dns v0.19.2
1111
github.com/stackitcloud/stackit-sdk-go/services/postgresql v0.12.1
1212
)
1313

0 commit comments

Comments
 (0)