Skip to content

Commit edf6fd1

Browse files
akinrosslhercot
authored andcommitted
[bugfix] Fix path for signature calculation for private_key authentication in plugin framework provider resources
1 parent 9064b40 commit edf6fd1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/provider/utils.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ func CheckDn(ctx context.Context, client *client.Client, dn string, diags *diag.
4343

4444
func DoRestRequest(ctx context.Context, diags *diag.Diagnostics, client *client.Client, path, method string, payload *container.Container) *container.Container {
4545

46+
// Ensure path starts with a slash to assure signature is created correctly
47+
if !strings.HasPrefix("/", path) {
48+
path = fmt.Sprintf("/%s", path)
49+
}
50+
4651
restRequest, err := client.MakeRestRequest(method, path, payload, true)
4752
if err != nil {
4853
diags.AddError(

0 commit comments

Comments
 (0)