ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Casey Bodley <cbodley@redhat.com>
To: WeiGuo Ren <rwg1335252904@gmail.com>
Cc: Ceph Development <ceph-devel@vger.kernel.org>, ceph-users@ceph.com
Subject: Re: s3test: In ceph-nautilus branch , some fails_strict_rfc2616 test failed, Is this normal?
Date: Fri, 6 Aug 2021 16:52:28 -0400	[thread overview]
Message-ID: <CAF-p1-LQRr=D_Ds0_tX+WHJWxM23+pZXBBgf90GorX6b5NaZVQ@mail.gmail.com> (raw)
In-Reply-To: <CAPy+zYUwvOap_yFY93PF+xvri-f1MwDRO2bZM=yyx21yedvegg@mail.gmail.com>

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


      reply	other threads:[~2021-08-06 20:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAF-p1-LQRr=D_Ds0_tX+WHJWxM23+pZXBBgf90GorX6b5NaZVQ@mail.gmail.com' \
    --to=cbodley@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=ceph-users@ceph.com \
    --cc=rwg1335252904@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).