Ace the Google Cloud Pro Developer Test 2025 – Code Your Way to the Cloud!

Disable ads (and more) with a premium pass for a one time $4.99 payment

Question: 1 / 265

How can you ensure that users have permission to only their specific Pub/Sub topic and subscription?

Grant project-level permissions for users.

Bind user identities at the resource level with publisher and subscriber roles.

Granting user identities at the resource level with publisher and subscriber roles is the most effective way to ensure that users only have permission to access their specific Pub/Sub topic and subscription. By binding roles directly to the individual resources, you can finely control access and ensure that users can only perform actions on the topics and subscriptions that you want them to access.

This method leverages Google's Identity and Access Management (IAM) capabilities, allowing you to assign roles, such as Pub/Sub Publisher or Pub/Sub Subscriber, directly to the specific topic or subscription resource. This means that a user assigned a publisher role would only be able to publish messages to that designated topic and no others, and similarly, a user with the subscriber role would only have the ability to pull messages from their designated subscription.

By binding user identities at this granular level, you minimize the risk of unauthorized access or misuse of resources, thereby enhancing security and compliance within your cloud environment. This contrasts with broader approaches such as granting project-level permissions, which would expose users to a wider array of resources than intended, or using service accounts, which may provide too much privilege if not carefully managed. Custom roles can be beneficial, but they can also become complex and more challenging to manage if not directly tied to

Get further explanation with Examzify DeepDiveBeta

Use service accounts for all Pub/Sub activities.

Provide custom roles at the project level.

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy