Ask Your Question
0

Need clarification X-Container-Write header's Value to make Container Public Writable

asked 2013-01-01 14:20:25 -0600

harika-vakadi gravatar image

Issue is,

While Trying to Make container public-writable, and create object anonymously, e.g. without using credentials/with another user credentials 401 and 403 are being raised.

Header provided in the request to make container public writable is as below

cont_headers = {'X-Container-Write': '-*'}

By doing the above container metadata is updated with X-Container-Write header

Now trying to create an object in the above container

A. Without auth token

headers1 = {'Content-Type': 'application/json', 'Accept': 'application/json'}

B. With another user's auth token

headers2 = {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': token}

Below are response results in nosetests for the respective headers to create an object

======================================================================

FAIL: Make container public-writable, and create object

Traceback (most recent call last): File "/home/harika/tempest_harika/1stJan/ObjectRead_write/tempest/tempest/tests/object_storage/test_object_services.py", line 423, in test_write_public_object_without_using_creds " creds raised exception is %s" % e) AssertionError: Failed to create public writable object without using creds raised exception is Unauthorized -------------------- >> begin captured logging << -------------------- tempest.common.rest_client: ERROR: Request URL: http://10.233.52.240:8080/v1/AUTH_39267990ba0541709641b40d51c06d55/TestContainer932651/Object776680 (http://10.233.52.240:8080/v1/AUTH_392...) tempest.common.rest_client: ERROR: Request Body: Object776680 tempest.common.rest_client: ERROR: Response Headers: {'date': 'Tue, 01 Jan 2013 19:21:26 GMT', 'status': '401', 'content-length': '131', 'content-type': 'text/html; charset=UTF-8', 'x-trans-id': 'tx38f3cdbb4ee24417bc2c6a1ae7be6f54'} tempest.common.rest_client: ERROR: Response Body:

Unauthorized

This server could not verify that you are authorized to access the document you requested.

</html> --------------------- >> end captured logging << ---------------------

======================================================================

FAIL: Make container public-writable, and create object

Traceback (most recent call last): File "/home/harika/tempest_harika/1stJan/ObjectRead_write/tempest/tempest/tests/object_storage/test_object_services.py", line 479, in test_write_public_with_another_user_creds " user creds raised exception is %s" % e) AssertionError: Failed to create public writable object with another user creds raised exception is Unauthorized -------------------- >> begin captured logging << -------------------- tempest.common.rest_client: ERROR: Request URL: http://10.233.52.240:8080/v1/AUTH_39267990ba0541709641b40d51c06d55/TestContainer932651/Object734924 (http://10.233.52.240:8080/v1/AUTH_392...) tempest.common.rest_client: ERROR: Request Body: Object734924 tempest.common.rest_client: ERROR: Response Headers: {'date': 'Tue, 01 Jan 2013 19:21:28 GMT', 'status': '403', 'content-length': '73', 'content-type': 'text/html; charset=UTF-8', 'x-trans-id': 'tx0bca4ee2403c4404a8c4e67812c81617'} tempest.common.rest_client: ERROR: Response Body:

Forbidden

Access was denied to this resource.

</html> --------------------- >> end captured logging << ---------------------


Here can anybody please clarify on proper header to be used to make container public Writeable / Can this be done actually ?

Thanks in advance, Harika

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-01-03 23:18:01 -0600

ravikumar-venkatesan gravatar image

Looks like you are running into known bug https://bugs.launchpad.net/swift/+bug/1020722 (https://bugs.launchpad.net/swift/+bug...) swift_auth middleware disallows access to public Swift URLs

edit flag offensive delete link more
0

answered 2013-01-08 04:44:09 -0600

harika-vakadi gravatar image

Thanks Ravikumar Venkatesan, that solved my question.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-01-01 14:20:25 -0600

Seen: 68 times

Last updated: Jan 08 '13