hello!

I've tried with wip-6078 and git dumpling builds and got the same error
during OPTIONS request.

curl -v -X OPTIONS -H 'Access-Control-Request-Method: PUT' -H "Origin:
http://XXXXX.pl"; http://static3.XXXXX.pl/

> OPTIONS / HTTP/1.1
> User-Agent: curl/7.31.0
> Host: static3.XXXXX.pl
> Accept: */*
> Access-Control-Request-Method: PUT
> Origin: http://XXXXX.pl
>
< HTTP/1.1 403 Forbidden
< Date: Tue, 03 Sep 2013 09:34:39 GMT
* Server Apache/2.2.22 (Ubuntu) is not blacklisted
< Server: Apache/2.2.22 (Ubuntu)
< Accept-Ranges: bytes
< Content-Length: 78
< Content-Type: application/xml
<
<?xml version="1.0"
encoding="UTF-8"?><Error><Code>AccessDenied</Code></Error>

Of course CORS was set, but RGW can't find it, dump from log:

2013-09-03 11:34:39.876809 7f7c6dff3700  2 req 129:0.000385:s3:OPTIONS
/:options_cors:verifying op mask
2013-09-03 11:34:39.876813 7f7c6dff3700 20 required_mask= 1 user.op_mask=7
2013-09-03 11:34:39.876815 7f7c6dff3700  2 req 129:0.000392:s3:OPTIONS
/:options_cors:verifying op permissions
2013-09-03 11:34:39.876818 7f7c6dff3700  2 req 129:0.000395:s3:OPTIONS
/:options_cors:verifying op params
2013-09-03 11:34:39.876821 7f7c6dff3700  2 req 129:0.000397:s3:OPTIONS
/:options_cors:executing
2013-09-03 11:34:39.876824 7f7c6dff3700  2 No CORS configuration set yet
for this bucket
2013-09-03 11:34:39.876907 7f7c6dff3700  2 req 129:0.000483:s3:OPTIONS
/:options_cors:http status=403
2013-09-03 11:34:39.877551 7f7c6dff3700  1 ====== req done req=0x128e0e0
http_status=403 ======

Setting CORSfor static3 bucket:

CORSConfiguration<CORSConfiguration><CORSRule><AllowedMethod>GET</AllowedMethod><AllowedMethod>PUT</AllowedMethod><AllowedMetho
d>DELETE</AllowedMethod><AllowedMethod>POST</AllowedMethod><AllowedOrigin>
http://static3.XXXXX.pl
</AllowedOrigin><AllowedHeader>*</AllowedHeader><MaxAgeSeconds>3000</
MaxAgeSeconds></CORSRule><CORSRule><AllowedMethod>GET</AllowedMethod><AllowedMethod>PUT</AllowedMethod><AllowedMethod>DELETE</AllowedMethod><AllowedMethod>POST</AllowedMe
thod><AllowedOrigin>http://static3.XXXXX.pl/
</AllowedOrigin><AllowedHeader>*</AllowedHeader><MaxAgeSeconds>3000</MaxAgeSeconds></CORSRule><CORSRule><AllowedMethod>GET
</AllowedMethod><AllowedMethod>PUT</AllowedMethod><AllowedMethod>DELETE</AllowedMethod><AllowedMethod>POST</AllowedMethod><AllowedOrigin>
http://XXXXX.pl/</AllowedOri
gin><AllowedHeader>*</AllowedHeader><MaxAgeSeconds>3000</MaxAgeSeconds></CORSRule></CORSConfiguration>
2013-09-03 12:34:02.973999 7f7c44fa1700 20 get_obj_state:
rctx=0x7f7c38009330 obj=.rgw:static3 state=0x7f7c38008768 s->prefetch_data=0
2013-09-03 12:34:02.974004 7f7c44fa1700 20 state->obj_tag is empty, not
appending atomic test
2013-09-03 12:34:02.983719 7f7c44fa1700 10 cache put: name=.rgw+static3
2013-09-03 12:34:02.983750 7f7c44fa1700 10 moving .rgw+static3 to cache LRU
end
2013-09-03 12:34:02.983756 7f7c44fa1700 10 appending xattr:
name=user.rgw.cors bl.length()=194
2013-09-03 12:34:02.983801 7f7c44fa1700 10 distributing notification
oid=notify.2 bl.length()=389
2013-09-03 12:34:02.986649 7f7c9bfff700 10 RGWWatcher::notify() opcode=1
ver=1 bl.length()=389
2013-09-03 12:34:02.986696 7f7c9bfff700 10 cache put: name=.rgw+static3
2013-09-03 12:34:02.986699 7f7c9bfff700 10 moving .rgw+static3 to cache LRU
end
2013-09-03 12:34:02.986703 7f7c9bfff700 10 appending xattr:
name=user.rgw.cors bl.length()=194
2013-09-03 12:34:02.987861 7f7c44fa1700 10 cache put: name=.rgw+static3
2013-09-03 12:34:02.987872 7f7c44fa1700 10 moving .rgw+static3 to cache LRU
end
2013-09-03 12:34:02.987876 7f7c44fa1700 10 appending xattr:
name=user.rgw.cors bl.length()=194
2013-09-03 12:34:02.987901 7f7c44fa1700 10 distributing notification
oid=notify.2 bl.length()=389
2013-09-03 12:34:02.988593 7f7c9bfff700 10 RGWWatcher::notify() opcode=1
ver=1 bl.length()=389
2013-09-03 12:34:02.988624 7f7c9bfff700 10 cache put: name=.rgw+static3
2013-09-03 12:34:02.988627 7f7c9bfff700 10 moving .rgw+static3 to cache LRU
end
2013-09-03 12:34:02.988635 7f7c9bfff700 10 appending xattr:
name=user.rgw.cors bl.length()=194
2013-09-03 12:34:02.989550 7f7c44fa1700  2 req 133:0.016683:s3:PUT
/:put_cors:http status=200

Checked with:
0.67.1-8-gaeb4141 (aeb414135326805324d619b507274b1d0cef7067)
0.67.2-22-ga708c8a (a708c8ab52e5b1476405a1f817c23b8845fbaab3)

best regards!
-- 
pawel


On Wed, Aug 21, 2013 at 11:25 PM, Jeppesen, Nelson <
nelson.jeppe...@disney.com> wrote:

> Fantastic! Thank you for the quick response. I'm available if you  need
> any testing.
>
> Nelson Jeppesen
>    Disney Technology Solutions and Services
>    Phone 206-588-5001
>
> -----Original Message-----
> From: Yehuda Sadeh [mailto:yeh...@inktank.com]
> Sent: Wednesday, August 21, 2013 2:22 PM
> To: Jeppesen, Nelson
> Cc: ceph-users@lists.ceph.com
> Subject: Re: [ceph-users] CORS not working
>
> On Wed, Aug 21, 2013 at 1:19 PM, Jeppesen, Nelson <
> nelson.jeppe...@disney.com> wrote:
> > Hello,
> >
> > I'm having issues with setting cors on dumpling. I seems like it's not
> doing anything.
> >
> > I have the following CORS rule on test1 bucket:
> >
> >         <CORSConfiguration>
> >         <CORSRule>
> >
> <AllowedMethod>GET</AllowedMethod><AllowedMethod>POST</AllowedMethod>
> >                 <AllowedOrigin>http://a.a.a</AllowedOrigin>
> >                 <AllowedHeader>*</AllowedHeader>
> >         </CORSRule>
> >         </CORSConfiguration>
> >
> >
> > When test with the following I'm missing the Access-Control-Allow-Origin
> on the response:
> >        Curl  -H "Origin: http://a.a.a"; https://s3/test1 -vv
> >
> >        < HTTP/1.1 200 OK
> >        < Date: Wed, 21 Aug 2013 20:13:31 GMT
> >        < Server: Apache/2.2.22 (Ubuntu)
> >        < Transfer-Encoding: chunked
> >        < Content-Type: application/xml
> >
> >
> >
> > When I try a pre-flight check I get a 403.
> >
> > curl -vv -X OPTIONS -H 'Access-Control-Request-Method: GET' -H
> > "Origin: http://a.a.a"; https://s3/test1/a
> >
> > < HTTP/1.1 403 Forbidden
> > < Date: Wed, 21 Aug 2013 20:16:12 GMT
> > < Server: Apache/2.2.22 (Ubuntu)
> > < Accept-Ranges: bytes
> > < Content-Length: 78
> > < Content-Type: application/xml
> >
> >
>
> Ok, just verified the bug. Opened issue #6078.
>
> Thanks,
> Yehuda
> _______________________________________________
> ceph-users mailing list
> ceph-users@lists.ceph.com
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to