* s3test: In ceph-nautilus branch , some fails_strict_rfc2616 test failed, Is this normal?
@ 2021-08-06 10:18 WeiGuo Ren
2021-08-06 20:52 ` Casey Bodley
0 siblings, 1 reply; 2+ messages in thread
From: WeiGuo Ren @ 2021-08-06 10:18 UTC (permalink / raw)
To: Ceph Development, ceph-users
I want to test test_object_create_bad_md5_unreadable. but rgw send
400(e.status),rather than 403.I dont understand it. The code is.
@tag('auth_common')
@attr(resource='object')
@attr(method='put')
@attr(operation='create w/non-graphics in MD5')
@attr(assertion='fails 403')
@attr('fails_strict_rfc2616')
@nose.with_setup(teardown=_clear_custom_headers)
def test_object_create_bad_md5_unreadable():
key = _setup_bad_object({'Content-MD5': '\x07'})
e = assert_raises(boto.exception.S3ResponseError,
key.set_contents_from_string, 'bar')
eq(e.status, 403)
eq(e.reason, 'Forbidden')
assert e.error_code in ('AccessDenied', 'SignatureDoesNotMatch')
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: s3test: In ceph-nautilus branch , some fails_strict_rfc2616 test failed, Is this normal?
2021-08-06 10:18 s3test: In ceph-nautilus branch , some fails_strict_rfc2616 test failed, Is this normal? WeiGuo Ren
@ 2021-08-06 20:52 ` Casey Bodley
0 siblings, 0 replies; 2+ messages in thread
From: Casey Bodley @ 2021-08-06 20:52 UTC (permalink / raw)
To: WeiGuo Ren; +Cc: Ceph Development, ceph-users
On Fri, Aug 6, 2021 at 6:20 AM WeiGuo Ren <rwg1335252904@gmail.com> wrote:
>
> I want to test test_object_create_bad_md5_unreadable. but rgw send
> 400(e.status),rather than 403.I dont understand it. The code is.
> @tag('auth_common')
> @attr(resource='object')
> @attr(method='put')
> @attr(operation='create w/non-graphics in MD5')
> @attr(assertion='fails 403')
> @attr('fails_strict_rfc2616')
> @nose.with_setup(teardown=_clear_custom_headers)
> def test_object_create_bad_md5_unreadable():
> key = _setup_bad_object({'Content-MD5': '\x07'})
>
> e = assert_raises(boto.exception.S3ResponseError,
> key.set_contents_from_string, 'bar')
> eq(e.status, 403)
> eq(e.reason, 'Forbidden')
> assert e.error_code in ('AccessDenied', 'SignatureDoesNotMatch')
>
yes, that's expected. that test generates an invalid http request. as
of the nautilus release, both the civetweb and beast frontends of
radosgw reject that header during parsing, so return a 400 Bad Request
error instead of failing later in auth
that test_object_create_bad_md5_unreadable test case no longer exists
as of the ceph-octopus branch, where we switched to boto3 which
doesn't even let you send such a request. the remaining
'fails_strict_rfc2616' tests accept both 400 and 403 responses
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-06 20:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 10:18 s3test: In ceph-nautilus branch , some fails_strict_rfc2616 test failed, Is this normal? WeiGuo Ren
2021-08-06 20:52 ` Casey Bodley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).