Scope a Vultr IAM policy to specific resource UUIDs instead of the * wildcard to limit access to chosen resources.
Resource scoping is the ability to restrict a permission policy to specific resources rather than applying it broadly across an entire service. Without resource scoping, a policy that grants access to a service applies to all resources of that type in your organization. With resource scoping, the same policy can be restricted to only specific resources, giving you precise control over exactly which resources a user, group, or role can interact with.
Every permission policy in Vultr IAM has a Resource field in its policy document that determines the scope of the policy. This field accepts either:
*) — the policy applies to all resources of the targeted service and action.type:id entries — the policy applies only to the specific resources identified, restricting access to exactly those resources and nothing else. Use the resource type followed by the resource ID, for example instance:<id>. Resource types include instance, database, vpc, loadbalancer, kubernetes, and baremetal.For example, a policy that allows compute.instance.* actions with the resource set to instance:<id> will allow the user to perform those actions on that instance only. All other instances in the organization remain inaccessible to that user unless another policy explicitly grants access to them.
A permission policy in Vultr IAM operates across three layers simultaneously:
compute)service.resource.Action format (for example compute.instance.Create or compute.instance.*)*) or specific resources using the type:id formatWhen you create a permission policy through the Vultr API or Terraform, you define the Resource field in the policy document. Set it to * to apply the policy broadly, or list type:id entries to scope it to specific resources.
0 Comments
Be the first to comment and share your perspective with the community.