Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def setup_agent_identity(client: Any, project: str, display_name: str) -> Any:
)

roles = [
"roles/aiplatform.expressUser",
"roles/aiplatform.user",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The change from roles/aiplatform.expressUser to roles/aiplatform.user significantly broadens the permissions granted to the agent identity. The roles/aiplatform.user role is quite powerful, granting permissions to create, delete, and manage various Vertex AI resources. This goes against the principle of least privilege. For better security, consider creating a custom IAM role that includes only the specific additional permissions required for the agent's complex workflows, rather than using the broad aiplatform.user predefined role. This would limit the potential attack surface if the agent's identity were compromised.

"roles/serviceusage.serviceUsageConsumer",
"roles/browser",
"roles/cloudapiregistry.viewer",
Expand Down