Bird
0
0

You want to deny both storage.buckets.delete and storage.objects.delete permissions using a single deny policy rule, while allowing all other permissions. Which JSON snippet correctly achieves this?

hard📝 Application Q9 of 15
GCP - Cloud IAM Advanced
You want to deny both storage.buckets.delete and storage.objects.delete permissions using a single deny policy rule, while allowing all other permissions. Which JSON snippet correctly achieves this?
A{"rules": [{"deniedPermissions": ["storage.buckets.delete", "storage.objects.delete"]}]}
B{"denyRules": [{"deniedPermissions": "storage.buckets.delete,storage.objects.delete"}]}
C{"denyRules": [{"deniedPermissions": ["storage.buckets.delete"]}, {"deniedPermissions": ["storage.objects.delete"]}]}
D{"denyRules": [{"deniedPermissions": ["storage.buckets.delete", "storage.objects.delete"]}]}
Step-by-Step Solution
Solution:
  1. Step 1: Use 'denyRules' key

    The deny policy must use the 'denyRules' key to specify deny rules.
  2. Step 2: Provide deniedPermissions as an array

    Multiple permissions should be listed as an array of strings.
  3. Step 3: Combine permissions in a single rule

    Both permissions can be included in one deny rule's deniedPermissions array.
  4. Step 4: Avoid incorrect formats

    Comma-separated strings or multiple denyRules objects are incorrect here.
  5. Final Answer:

    {"denyRules": [{"deniedPermissions": ["storage.buckets.delete", "storage.objects.delete"]}]} -> Option D
  6. Quick Check:

    Single denyRules with array of permissions [OK]
Quick Trick: List multiple deniedPermissions in one array under denyRules [OK]
Common Mistakes:
  • Using a comma-separated string instead of an array
  • Splitting permissions into multiple denyRules objects unnecessarily
  • Using 'rules' instead of 'denyRules'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes