outscale / cluster-api-provider-outscale

BSD 3-Clause "New" or "Revised" License
4 stars 11 forks source link

[Feature]: Document a policy example for cluster API #388

Open pierreozoux opened 1 week ago

pierreozoux commented 1 week ago

Explain problem to solve

We want to have a tight configuration of EIM policy associated to this controller.

Describe the solution you would like

We'd like a nice policy json example, like here:

Additional context

,

Environment

.
Olivier-Heintz commented 3 days ago

first proposition: autorize all api except api relative to EIM management. result will be 2 policies :

  1. autorize all api
  2. explicit deny api relative to EIM management
{
    "Statement": [
        {
            "Action": [
                "api:*"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Allow"
        }
    ]
}

and

{
    "Statement": [
        {
            "Action": [
                "api:*AccessKey*",
                "api:*Account*",
                "api:*ApiAccessRule*",
                "api:CreateCa",
                "api:DeleteCa",
                "api:UpdateCa",
                "api:*User*",
                "api:ReadAdminPassword",
                "api:*ApiAccessPolicy",
                "api:ReadEntitiesLinkedToPolicy",
                "api:*Policies",
                "api:*Policy"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Deny"
        },
        {
            "NotAction": [
                "api:CreateLoadBalancerPolicy",
                "api:DeleteLoadBalancerPolicy"
            ],
            "Resource": [
                "*"
            ],
            "Effect": "Deny"
        }
    ]
}

this configuration is not yet tested (i have a doubt about Effect value for NotAction)

outscale-hmi commented 3 days ago

Hello, We will test it on our end and keep you updated today.