opentelekomcloud-docs / object-storage-service

Open Telekom Cloud Object Storage Service docs
Apache License 2.0
0 stars 1 forks source link

Uploading an Object #60

Closed PushAndRun closed 1 year ago

PushAndRun commented 1 year ago

Issue on page: https://github.com/opentelekomcloud-docs/object-storage-service/blob/main/api-ref/source/getting_started/uploading_an_object.rst

Executing the code from the example with updated SK/AK and URL returns a 403 error. The error message states that the calculated and submitted signatures are different. I experienced the same issue when trying to build a request manually in JS.

dsabelni commented 1 year ago

Can you please share a request details (body and headers) and full response body?

PushAndRun commented 1 year ago

No sorry, I did not keep the project. But I pasted literally only the sample code from the linked page and updated the AK/SK as well as the OBS path.

dsabelni commented 1 year ago

No problem, I´ll try to replicate the issue.

dsabelni commented 1 year ago

I was able to replicate the problem, internal ticket was created. Some points that may help you solve the problem while the documentation page is not yet updated:

dsabelni commented 1 year ago

Hello @PushAndRun ! After some discussions with colleagues we've came to the conclusion that the original code presented in the documentation works. My mistake when trying to get this code to work was that I've used OBS endpoint instead of the bucket endpoint (which consists of bucketName + OBSendpoint): I were using HttpPut httpPut = new HttpPut("http://obs-endpoint/objecttest1"); instead of HttpPut httpPut = new HttpPut("http://bucketname.obs-endpoint/objecttest1"); when using the second option everything works for me. Can you please check if you were using the correct endpoint?

PushAndRun commented 1 year ago

Hi Dimitrii, Thanks for having another look into it! I included the bucket name but forgot the object name in the end... You are right, the code here is correct and the problem is between chair and screen. Sorry! However, I would propose to improve the error message. A 403 error message without additional information seems in this case misleading to me, even if it makes sense from a technical perspective.

dsabelni commented 1 year ago

I agree with your proposal and I've created an internal ticket for that. But if you don't mind I'll close this GitHub issue.