0
0
Cybersecurityknowledge~10 mins

Cloud identity and access management in Cybersecurity - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the entity that represents a user or service in cloud IAM.

Cybersecurity
entity = "[1]"
Drag options to blanks, or click blank then click option'
Apolicy
Bbucket
Cfirewall
Dprincipal
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'policy' with the entity that accesses resources.
Using 'bucket' which is a storage container, not an identity.
2fill in blank
medium

Complete the code to define a set of permissions assigned to a user in cloud IAM.

Cybersecurity
role = "[1]"
Drag options to blanks, or click blank then click option'
Afirewall
Brole
Cregion
Dnetwork
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'firewall' which controls network traffic, not permissions.
Confusing 'region' with access control.
3fill in blank
hard

Fix the error in the statement that grants permissions to a user by filling the blank.

Cybersecurity
grant_access(principal, [1])
Drag options to blanks, or click blank then click option'
Arole
Bbucket
Cfirewall
Dregion
Attempts:
3 left
💡 Hint
Common Mistakes
Passing 'bucket' which is a storage resource, not a permission set.
Using 'firewall' or 'region' which are unrelated to access permissions.
4fill in blank
hard

Fill both blanks to create a policy that assigns a role to a principal.

Cybersecurity
policy = {
  'bindings': [
    {
      'role': '[1]',
      'members': ['[2]']
    }
  ]
}
Drag options to blanks, or click blank then click option'
Aroles/viewer
Broles/editor
Cuser:alice@example.com
DserviceAccount:my-service@example.com
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up roles and members in the policy structure.
Using service account instead of a user email for this example.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that maps users to their assigned roles if the role includes 'admin'.

Cybersecurity
admin_users = { [1]: [2] for [3], [2] in user_roles.items() if 'admin' in [2] }
Drag options to blanks, or click blank then click option'
Auser
Brole
Duser_roles
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing keys and values in the dictionary comprehension.
Using the wrong variable names for iteration.