Custom Policy for OSS on Alibaba Cloud

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IvanH
    New Member
    • Nov 2017
    • 51

    Custom Policy for OSS on Alibaba Cloud

    Hi Everyone,
    I have created a root folder called A and there are two subfolders under A. The two subfolders name are Alice and Peter respectively. I attach a custom policy to the root folder with the policy below.


    {
    "Statement" : [
    {
    "Action": [
    "oss:Get*",
    "oss:List*" ,
    "oss:Put*"
    ],
    "Effect": "Allow",
    "Resource": "acs:oss:*: *:A/${username}/*"
    }
    ],
    "Version": "1"
    }

    When Alice log in to the console using her credentails and tried to upload a new file into her folder, she is unable to upload the folder.

    Does anyone know how to solve this issue or i am using the wrong policy variable?

    Thanks in advance.
  • TimoHa
    New Member
    • Nov 2017
    • 22

    #2
    As far as I know, variables like ${username} are not supported. So you need to replace that variable with fixed user name and attach different policies to different user. I know this is very inconvenient, though I don't know any other workaround.

    Comment

    Working...