yes, I had add the cpas to user TESTER1.

------------------------------------------------------------------
发件人:Pritha Srivastava <prsrivas@redhat.com>
发送时间:2019年12月26日(星期四) 12:26
收件人:黄明友 <hmy@v.photos>
抄 送:ceph-users@ceph.io <ceph-users@ceph.io>
主 题:Re: [ceph-users] s3curl putuserpolicy get 405

Hi,

Did you add admin caps to the user trying to attach User Policy to User1?

like
radosgw-admin caps add --uid="TESTER" --caps="user-policy=*".

TESTER is the user trying to attach user policy to TESTER1.

Thanks,
Pritha

On Wed, Dec 25, 2019 at 2:00 PM 黄明友 <hmy@v.photos> wrote:
hi,all


s3curl.pl --debug --id admin -- -s -v -X POST "http://localhost:8000/?Action=PutUserPolicy&PolicyName=Policy1&UserName=TESTER1&PolicyDocument=\{\"Version\":\"2012-10-17\",\"Statement\":\[\{\"Effect\":\"Deny\",\"Action\":\"s3:*\",\"Resource\":\[\"*\"\],\"Condition\":\{\"BoolIfExists\":\{\"sts:authentication\":\"false\"\}\}\},\{\"Effect\":\"Allow\",\"Action\":\"sts:GetSessionToken\",\"Resource\":\"*\",\"Condition\":\{\"BoolIfExists\":\{\"sts:authentication\":\"false\"\}\}\}\]\}&Version=2010-05-08"

get error like this,
<?xml version="1.0" encoding="UTF-8"?><Error><Code>MethodNotAllowed</Code><RequestId>tx000000000000000001273-005e031dca-e11e-wx6</RequestId><HostId>e11e-wx6-wx</HostId></Error>

the ceph verion is 

ceph version 14.2.5 (ad5bd132e1492173c85fda2cc863152730b16a92) nautilus (stable)



黄明友 
IT基础架构部经理
V.Photos 云摄影
移动电话:  +86 13540630430
客服电话:400 - 806 - 5775
电子邮件:  hmy@v.photos 
官方网址:  www.v.photos
上海 黄浦区中山东二路88号外滩SOHO3Q F栋 2层
北京 朝阳区光华路9号光华路SOHO二期南二门SOHO3Q 1层 
广州 天河区林和中路136号天誉花园二期3Wcoffice 天誉青创社区
深圳 南山区蛇口网谷科技大厦二期A座102网谷双创街 1层
成都 成华区建设路世贸广场 7层

 



_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-leave@ceph.io