Actions
Bug #982
closedradosgw should fail with UnresolvableGrantByEmailAddress on add_email_grant to unknown email
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
from s3-tests, radosgw gives 403 error, aws has a better & more explicit error:
def test_bucket_acl_grant_email_notexist(): # behavior not documented by amazon bucket = get_new_bucket() policy = bucket.get_acl() policy.acl.add_email_grant('FULL_CONTROL', NONEXISTENT_EMAIL) e = assert_raises(boto.exception.S3ResponseError, bucket.set_acl, policy) eq(e.status, 400) eq(e.reason, 'Bad Request') eq(e.error_code, 'UnresolvableGrantByEmailAddress')
$ S3TEST_CONF=tv.conf ./virtualenv/bin/nosetests test_s3:test_bucket_acl_grant_email_notexist F ====================================================================== FAIL: test_s3.test_bucket_acl_grant_email_notexist ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tv/src/s3-tests.git/virtualenv/lib/python2.6/site-packages/nose/case.py", line 187, in runTest self.test(*self.arg) File "/home/tv/src/s3-tests.git/test_s3.py", line 527, in test_bucket_acl_grant_email_notexist eq(e.status, 400) File "/home/tv/src/s3-tests.git/virtualenv/lib/python2.6/site-packages/nose/tools.py", line 31, in eq_ assert a == b, msg or "%r != %r" % (a, b) AssertionError: 403 != 400 -------------------- >> begin captured logging << -------------------- boto: DEBUG: path=/ boto: DEBUG: auth_path=/ boto: DEBUG: Canonical: GET Tue, 05 Apr 2011 17:21:49 GMT / boto: DEBUG: Method: GET boto: DEBUG: Path: / boto: DEBUG: Data: boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:21:49 GMT', 'Content-Length': '0', 'Authorization': 'AWS TKKZ1DX83O7ZCTWHE0YD:SaO8AddPM7ckQW7/lbO5W22OgzI=', 'User-Agent': 'Boto/2.0b4 (linux2)'} boto: DEBUG: Host: localhost:7280 boto: DEBUG: establishing HTTP connection boto: DEBUG: path=/ boto: DEBUG: auth_path=/ boto: DEBUG: Canonical: GET Tue, 05 Apr 2011 17:21:49 GMT / boto: DEBUG: Method: GET boto: DEBUG: Path: / boto: DEBUG: Data: boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:21:49 GMT', 'Content-Length': '0', 'Authorization': 'AWS O54XVCC9MQ9Q72TWP5Y1:BrCjHc1EWsbRS6dzN2+daHFVTzc=', 'User-Agent': 'Boto/2.0b4 (linux2)'} boto: DEBUG: Host: localhost:7280 boto: DEBUG: establishing HTTP connection boto: DEBUG: path=/test-tv-r9utz6wwb4ajgz8l7qf0z-1/ boto: DEBUG: auth_path=/test-tv-r9utz6wwb4ajgz8l7qf0z-1/ boto: DEBUG: Canonical: PUT Tue, 05 Apr 2011 17:21:49 GMT /test-tv-r9utz6wwb4ajgz8l7qf0z-1/ boto: DEBUG: Method: PUT boto: DEBUG: Path: /test-tv-r9utz6wwb4ajgz8l7qf0z-1/ boto: DEBUG: Data: boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:21:49 GMT', 'Content-Length': '0', 'Authorization': 'AWS O54XVCC9MQ9Q72TWP5Y1:fLMfdX7HCmngO/sjz2wXnHyNi+w=', 'User-Agent': 'Boto/2.0b4 (linux2)'} boto: DEBUG: Host: localhost:7280 boto: DEBUG: path=/test-tv-r9utz6wwb4ajgz8l7qf0z-1/ boto: DEBUG: auth_path=/test-tv-r9utz6wwb4ajgz8l7qf0z-1/ boto: DEBUG: path=/test-tv-r9utz6wwb4ajgz8l7qf0z-1/?acl boto: DEBUG: auth_path=/test-tv-r9utz6wwb4ajgz8l7qf0z-1/?acl boto: DEBUG: Canonical: GET Tue, 05 Apr 2011 17:21:50 GMT /test-tv-r9utz6wwb4ajgz8l7qf0z-1/?acl boto: DEBUG: Method: GET boto: DEBUG: Path: /test-tv-r9utz6wwb4ajgz8l7qf0z-1/?acl boto: DEBUG: Data: boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:21:50 GMT', 'Content-Length': '0', 'Authorization': 'AWS O54XVCC9MQ9Q72TWP5Y1:SGR8hflqFCO/eNKBnOaumpQVdFs=', 'User-Agent': 'Boto/2.0b4 (linux2)'} boto: DEBUG: Host: localhost:7280 boto: DEBUG: path=/test-tv-r9utz6wwb4ajgz8l7qf0z-1/ boto: DEBUG: auth_path=/test-tv-r9utz6wwb4ajgz8l7qf0z-1/ boto: DEBUG: path=/test-tv-r9utz6wwb4ajgz8l7qf0z-1/?acl boto: DEBUG: auth_path=/test-tv-r9utz6wwb4ajgz8l7qf0z-1/?acl boto: DEBUG: Canonical: PUT Tue, 05 Apr 2011 17:21:50 GMT /test-tv-r9utz6wwb4ajgz8l7qf0z-1/?acl boto: DEBUG: Method: PUT boto: DEBUG: Path: /test-tv-r9utz6wwb4ajgz8l7qf0z-1/?acl boto: DEBUG: Data: <AccessControlPolicy><Owner><ID>O54XVCC9MQ9Q72TWP5Y1</ID><DisplayName>Mr. Foo</DisplayName></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>O54XVCC9MQ9Q72TWP5Y1</ID><DisplayName>Mr. Foo</DisplayName></Grantee><Permission>FULL_CONTROL</Permission></Grant><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress>doesnotexist@dreamhost.com.invalid</EmailAddress></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy> boto: DEBUG: Headers: {'Date': 'Tue, 05 Apr 2011 17:21:50 GMT', 'Content-Length': '594', 'Authorization': 'AWS O54XVCC9MQ9Q72TWP5Y1:Id4gY388lvMtvsNt1qINFVirl+Q=', 'User-Agent': 'Boto/2.0b4 (linux2)'} boto: DEBUG: Host: localhost:7280 --------------------- >> end captured logging << --------------------- ---------------------------------------------------------------------- Ran 1 test in 2.387s FAILED (failures=1)
Actions