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

fix client sig #995

Open
wants to merge 13 commits into
base: sprint-1.17
Choose a base branch
from
Prev Previous commit
Next Next commit
add v2 sig header
Hitenjain14 committed Feb 7, 2024
commit f879b74394e5eaeac347ced286b2bb52a898c789
26 changes: 13 additions & 13 deletions internal/api/util/client/api_client.go
Original file line number Diff line number Diff line change
@@ -645,11 +645,11 @@ func (c *APIClient) V1BlobberGetHashNodeRoot(t *test.SystemTest, blobberGetHashn
var hashnode *model.BlobberGetHashnodeResponse

headers := map[string]string{
"X-App-Client-Id": blobberGetHashnodeRequest.ClientId,
"X-App-Client-Key": blobberGetHashnodeRequest.ClientKey,
"X-App-Client-Signature": blobberGetHashnodeRequest.ClientSignature,
"allocation": blobberGetHashnodeRequest.AllocationID,
"ALLOCATION-ID": blobberGetHashnodeRequest.AllocationID,
"X-App-Client-Id": blobberGetHashnodeRequest.ClientId,
"X-App-Client-Key": blobberGetHashnodeRequest.ClientKey,
"X-App-Client-Signature-V2": blobberGetHashnodeRequest.ClientSignature,
"allocation": blobberGetHashnodeRequest.AllocationID,
"ALLOCATION-ID": blobberGetHashnodeRequest.AllocationID,
}

blobberGetHashNodeRootURL := blobberGetHashnodeRequest.URL + "/" + strings.Replace(GetHashNodeRoot, ":allocation", blobberGetHashnodeRequest.AllocationID, 1)
@@ -2103,10 +2103,10 @@ func (c *APIClient) V1BlobberGetFileRefs(t *test.SystemTest, blobberGetFileRefsR
blobberGetFileRefsURL := blobberGetFileRefsRequest.URL + strings.Replace(GetFileRef, ":allocation_id", blobberGetFileRefsRequest.AllocationID, 1) + "?" + "path=" + blobberGetFileRefsRequest.RemotePath + "&" + "refType=" + blobberGetFileRefsRequest.RefType

headers := map[string]string{
"X-App-Client-Id": blobberGetFileRefsRequest.ClientID,
"X-App-Client-Key": blobberGetFileRefsRequest.ClientKey,
"X-App-Client-Signature": blobberGetFileRefsRequest.ClientSignature,
"ALLOCATION-ID": blobberGetFileRefsRequest.AllocationID,
"X-App-Client-Id": blobberGetFileRefsRequest.ClientID,
"X-App-Client-Key": blobberGetFileRefsRequest.ClientKey,
"X-App-Client-Signature-V2": blobberGetFileRefsRequest.ClientSignature,
"ALLOCATION-ID": blobberGetFileRefsRequest.AllocationID,
}
resp, err := c.executeForServiceProvider(
t,
@@ -2198,10 +2198,10 @@ func (c *APIClient) V1BlobberObjectTree(t *test.SystemTest, blobberObjectTreeReq
blobberObjectTreeURL := blobberObjectTreeRequest.URL + strings.Replace(GetObjectTree, ":allocation_id", blobberObjectTreeRequest.AllocationID, 1) + "?" + "path=" + blobberObjectTreeRequest.Path

headers := map[string]string{
"X-App-Client-Id": blobberObjectTreeRequest.ClientID,
"X-App-Client-Key": blobberObjectTreeRequest.ClientKey,
"X-App-Client-Signature": blobberObjectTreeRequest.ClientSignature,
"ALLOCATION-ID": blobberObjectTreeRequest.AllocationID,
"X-App-Client-Id": blobberObjectTreeRequest.ClientID,
"X-App-Client-Key": blobberObjectTreeRequest.ClientKey,
"X-App-Client-Signature-V2": blobberObjectTreeRequest.ClientSignature,
"ALLOCATION-ID": blobberObjectTreeRequest.AllocationID,
}
resp, err := c.executeForServiceProvider(
t,