Join our Newsletter — 33% off our NHI Course
Home› Guides› Gemini Enterprise Security Guide: Identity, Connectors, Agents and…
Guide AI Platforms

Gemini Enterprise Security Guide: Identity, Connectors, Agents and Logging

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 12 min read
On this page

Gemini Enterprise puts one search box and a set of agents in front of everything an organisation connects to it, so any gap in source permissions, identity mapping or agent access becomes a way to find and move data at scale. Google describes it as an intranet search, AI assistant and agentic platform with prebuilt connectors for applications such as Confluence, Jira, SharePoint and ServiceNow, an Agent Gallery and custom agents; its admin role ID, roles/discoveryengine.agentspaceAdmin, still carries the earlier Agentspace name. This guide covers the platform administered in Google Cloud (Standard, Plus, Pay-as-you-go and Frontline editions), not Gemini inside Workspace apps, which the Gemini for Google Workspace Security Guide covers. It is for Google Cloud administrators, identity teams and security engineers who own the rollout. Product details are from Google Cloud documentation checked 27 October 2026; features change often, so confirm settings against the current pages.

Key takeaways

  • Search is only as safe as the identity mapping. Permission-aware results depend on the identity provider, the google.subject mapping and group sync being right before data stores are created, and some choices cannot be changed later without recreating data stores.
  • The admin role is broad. Gemini Enterprise Admin (roles/discoveryengine.agentspaceAdmin) includes all Discovery Engine Editor permissions plus agent and engine IAM policy changes and logging permissions; treat it as privileged access.
  • Agents have their own identities. Google's agent identity gives agents SPIFFE-based principals with 24-hour, automatically renewed certificates and no exportable keys, but IAM bindings outlive deleted agents and must be removed by hand.
  • Prompt and response logging is opt-in and sensitive. Usage audit logs can record prompts and grounded responses in Cloud Logging; decide who may read them before you switch them on.
  • Put the perimeter in first. VPC Service Controls cannot be enforced on a project with existing data stores, and actions to third-party apps are blocked by default inside a perimeter until allowed by organisation policy.

How identity and access work in Gemini Enterprise

Three identity layers decide what a user sees and what an agent can do: the user's identity and groups, IAM roles on the Gemini Enterprise resources, and the source system's own access control lists.

ChoiceGoogle Identity (recommended by Google for new setups)Third-party IdP via Workforce Identity Federation
Supported sourcesAll first-party Google sources; third-party sources by federation; third-party ingestion except Microsoft 365 sourcesSetups connecting only to third-party sources; required for Microsoft 365 ingestion (with Entra ID)
IdP requirementThird-party IdP, if used for sign-in to Google, must support OIDC or SAML 2.0OIDC or SAML 2.0 IdP such as Entra ID, Okta or AD FS
Key settingsUnique user attribute, usually email; aliases for users with multiple addressesWorkforce pool at the global location; google.subject mapped to lowercase email; attribute.as_user_identifier_* for extra identifiers; SCIM for large group counts
Change costSwitching provider means deleting and recreating ingestion data stores and resets chat history; changing a user's google.subject, even letter case, creates a new user who loses history, notebooks, agents, licences and IAM roles
  • Source ACLs: for Google Workspace connectors, access follows the source ACLs and Google Group membership. For Microsoft sources ingested into Gemini Enterprise, Entra ID groups control access, which requires Workforce Identity Federation with Entra ID. Each document supports up to 3,000 readers, with each user or group counted as one.
  • Access control is fixed per data store: Google states the access control setting cannot be turned on or off for an existing data store. Decide before the first ingestion.
  • Federation versus ingestion: federated connectors, such as the Data Cloud connectors for BigQuery, Spanner, Cloud SQL and AlloyDB, query data in place; ingestion copies content into an index that must carry the source ACLs faithfully. Ingestion is where stale or flattened permissions cause oversharing. See the Permission-Aware RAG Guide.
  • Context-Aware Access: IP-based access levels can block requests Gemini Enterprise makes from Google's servers; Google's documented workaround adds the Gemini Enterprise OAuth client ID as an OR condition. Review that exception, because it widens the policy.

Admin roles and privileged access

RoleRole IDWhat it can doTreat as
Gemini Enterprise Adminroles/discoveryengine.agentspaceAdminAll Discovery Engine Editor permissions plus discoveryengine.agents.setIamPolicy, discoveryengine.engines.setIamPolicy, assistant settings, logging, monitoring and trace permissions; required to turn on usage audit logging and Model ArmorPrivileged: small named group, just-in-time where possible
Discovery Engine Editorroles/discoveryengine.editorRead and write on all Discovery Engine resources, including discoveryengine.agents.create, .update and .manage, but not agent IAM policy changesBuilder role for agent developers in non-production projects
Gemini Enterprise UserSee Google's role referenceUse of the app by licensed employeesStandard user access, assigned with the licence
Basic roles (Owner, Editor, Viewer)roles/owner, roles/editor, roles/viewerAccess across Google Cloud, not just Gemini EnterpriseDo not use for Gemini Enterprise administration
Workforce pool administratorsIAM workforce pool rolesChange how every user's identity maps; Google notes these roles carry powerful permissionsTier 0 identity administration
  • Separate build from publish: because setIamPolicy on agents sits only in the Admin role, a developer with Editor can build an agent but cannot share it. Keep it that way, and have publication reviewed.
  • Custom roles: Google supports custom roles where predefined roles do not fit. Use them for read-only reviewers who need to inspect agents and data stores without editing them.
  • Watch for role escalation: alert on any grant of the Admin role, of Owner on the hosting project, or of workforce pool administration (ATT&CK T1098.003 Additional Cloud Roles describes the attacker version). See the Google Cloud IAM and Service Accounts Guide.

Integrations, API tokens and service accounts

  • Agent identities: Google's agent identity gives each supported agent a SPIFFE ID such as spiffe://agents.global.org-ORGANIZATION_ID.system.id.goog/resources/..., used in IAM as a principal:// identifier. Gemini Enterprise is a supported service, with principals under the discoveryengine resource path. An X.509 certificate valid for 24 hours is provisioned and renewed automatically, access tokens are bound to it, and calls to Google Cloud APIs use mTLS.
  • How they differ from service accounts: Google states that agent identities are not shared across workloads by default, cannot be impersonated, and cannot have long-lived keys generated for them. This removes the service account key problem for agents that use them. See the Google Cloud Service Account Keys Security Guide.
  • Lifecycle traps: the principal is derived from the hosting resource ID, so redeploying creates a new principal that needs fresh grants, and deleting an agent leaves its IAM bindings in place (inactive) until you remove them. Add binding clean-up to decommissioning.
  • End-user credentials for actions: where agents act in third-party apps for a user, Google describes an auth manager that encrypts end-user credentials and a gateway that decrypts them, so the agent does not see the raw credential. CMEK can protect connector configurations and end-user credentials for Data Cloud connectors.
  • Service agents: cross-project Model Armor templates need the Model Armor User role granted to the app's Discovery Engine service account. Record such grants; they are easy to forget during reviews.
  • Write actions: when connector actions are enabled, agents can change data in the source system (for Data Cloud connectors, subject to the user's IAM permissions) or send email and create tickets. Treat each enabled action as a new delegated permission.

For how Google's agent identity compares with Microsoft and AWS, see Cloud Agent Identity Services Compared (Entra, AgentCore, Google).

Logging and detection

LogWhereWhat it showsNotes
Admin Activity audit logsCloud Logging, protoPayload.serviceName="discoveryengine.googleapis.com"ADMIN_WRITE methods such as DataStoreService.CreateDataStore, EngineService.UpdateEngineConfiguration changes; alert on these
Data Access audit logsSame service nameADMIN_READ (EngineService.GetEngine), DATA_READ (SearchService.Search), DATA_WRITE (AssistantService.StreamAssist)Enable deliberately; volume can be high
Usage audit logs_Default bucket, log discoveryengine.googleapis.com%2Fgemini_enterprise_user_activity and gen_ai.* logsPer-method fields for Assist, StreamAssist, Search, CreateAgent; agent_info including spiffe_id; prompts as query.text if enabledPrompt and response text is elided unless "Enable logging of prompt inputs and response outputs" is on; enabling needs the Admin role, viewing needs roles/logging.viewer
Model Armor logsData Access logs for the Model Armor APISanitizeUserPrompt and SanitizeModelResponse verdicts without contentCorrelate with usage logs to see which user hit which filter
Security Token Service logsData Access logs (Admin Read) for the STS APIFederated sign-ins and attribute mappingGoogle suggests these to verify Workforce Identity Federation
  • Protect the logs themselves: prompts and grounded responses are sensitive data. Use log views, IAM conditions or a separate bucket with sinks, and field-level access control where available, so that reading every employee's prompts is a privileged act.
  • Detections worth building: new data store or connector created outside change windows; agent IAM policy changes; one user's search volume or breadth far above baseline (ATT&CK T1213 Data from Information Repositories); repeated Model Armor blocks for one user or agent; new actions enabled on connectors that reach email or external systems (T1567 Exfiltration Over Web Service).

Metrics: percentage of data stores created with access control on; number of principals holding the Admin role; orphaned IAM bindings for deleted agents; share of agents using agent identity rather than service account keys; Model Armor block rate by template; mean time to review a newly published agent.

Hardening baseline

  1. Decide identity first: pick Google Identity or Workforce Identity Federation, fix the google.subject mapping in lowercase email, configure group claims and SCIM where groups are large. Test with pilot users whose access you know before creating production data stores.
  2. Build the perimeter before data: place the hosting project in a VPC Service Controls perimeter with discoveryengine.googleapis.com restricted, run it in dry run mode first, and add access levels because apps are publicly reachable by default. Rollback is changing the perimeter back to dry run, not removing it.
  3. Restrict connectors by organisation policy: use the "Restrict allowed data sources for data connectors" and "Restrict egress domains for data connectors" constraints so new action-capable data stores need explicit approval.
  4. Create data stores with access control on: verify a sample of documents returns only to permitted users before widening the pilot.
  5. Enable Model Armor: separate userPromptTemplate and responseTemplate, prompt injection and jailbreak detection on prompts, Sensitive Data Protection and malicious URL detection on responses, inspect-and-block enforcement and the default FAIL_CLOSED mode. Start in inspect-only to tune false positives, then block. Note that Google states Model Armor does not screen custom ADK, A2A or Dialogflow agents and blocks rather than masks sensitive data.
  6. Apply CMEK where your policy requires customer-managed keys, and confirm data residency in the us or eu multi-regions where supported.
  7. Turn on audit and usage logging with restricted viewers, and decide whether prompt text logging is lawful and necessary for your organisation before enabling it.
  8. Govern agents: developers build with Editor in a non-production project; admins publish after review; every agent has an owner; decommissioning removes IAM bindings.

Common misconfigurations

  • Oversharing inherited from the source: "anyone in the organisation with the link" files in Drive or broad SharePoint sites become discoverable by search. Gemini Enterprise honours the ACL; it does not fix it. Clean up sharing before connecting.
  • Data stores created before the identity decision: a later IdP change or a google.subject case fix forces data store rebuilds and loses user history.
  • Perimeter added after go-live: VPC Service Controls cannot be enforced on a project with existing data stores, so the perimeter is skipped or data stores are rebuilt in a hurry.
  • Admin role used for building: developers with the Admin role can both build and share agents and read logs, removing the review step.
  • Model Armor assumed to cover every agent: custom ADK and A2A agents are outside its screening, so they need their own input and output controls.
  • Prompt logs readable by anyone with Logs Viewer: turning on prompt and response logging without restricting the bucket exposes sensitive conversations. Google also advises against enabling Cloud Logging inside Model Armor templates for the same reason.
  • Write actions without confirmation: a connector that lets an agent create calendar events, send mail or file tickets can be driven by injected content. In the Gemini calendar prompt injection, an invite with hidden instructions made Gemini write private meeting summaries into a new event an attacker could read; the lesson applies to any action-capable connector.

Framework mapping

AreaNIST SP 800-53 Rev. 5NIST CSF 2.0
Identity provider, mapping and licencesIA-4 Identifier Management, AC-2 Account ManagementPR.AA-01
Admin roles and agent publicationAC-6 Least Privilege, AC-3 Access EnforcementPR.AA-05
Agent identities and credentialsIA-9 Service Identification and Authentication, IA-5 Authenticator ManagementPR.AA-01
Perimeter and connector egressSC-7 Boundary Protection, AC-4 Information Flow EnforcementPR.AA-05
CMEKSC-12 Cryptographic Key Establishment and Management-
Audit and usage loggingAU-2 Event Logging, AU-12 Audit Record Generation, SI-4 System MonitoringDE.CM-03

Practitioner checklist

  • Choose the identity provider and fix the google.subject mapping before creating any data store.
  • Clean up oversharing in connected sources before ingestion.
  • Restrict the Gemini Enterprise Admin role to a small named group and alert on new grants.
  • Separate agent building (Editor, non-production) from publishing (Admin, after review).
  • Use agent identities instead of service account keys, and remove IAM bindings when agents are deleted or redeployed.
  • Enforce VPC Service Controls and connector organisation policy constraints before go-live.
  • Enable Model Armor with separate prompt and response templates, and add controls for custom agents it does not screen.
  • Turn on audit and usage logs with restricted access to prompt and response content.
  • Require user confirmation for connector write actions to email, calendars and external systems.

Standards and references

Related NHI Mgmt Group resources: Gemini for Google Workspace Security Guide · Google Vertex AI Security Guide · VPC Service Controls Guide · Permission-Aware RAG Guide

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org