Gemini CLI SSO and access control: sign-in methods admins can enforce

Gemini CLI supports Google account, Workspace and Vertex AI sign-in, and admins can enforce one method, but domain restriction depends on a corporate proxy and IAM depends on Google Cloud configuration.

On this page

Does Gemini CLI support SSO and sign-in enforcement for Workspace accounts?

Gemini CLI does not ship a built-in SAML or OIDC connector, so single sign-on is not configured inside the CLI itself. Users sign in with a Google account, a company, school or Google Workspace account, or a Vertex AI setup that uses Application Default Credentials or a service account JSON key. Admins can force one of these methods on every install with security.auth.enforcedType in the enterprise configuration. The same page says that in non-interactive mode the CLI exits with an error when the configured method does not match, which matters for CI/CD jobs that a developer might otherwise run with a personal key.

Domain restriction is handled differently. Google Workspace admins can limit logins to approved domains by setting the X-GoogApps-Allowed-Domains header on a corporate proxy, so the control sits in network infrastructure you operate, not in the CLI. Confirm with your Google Workspace administrator which domains are allowed and whether your proxy can set that header on every session. The Gemini CLI enterprise configuration page also warns that these admin patterns are not a foolproof boundary, because a user with local privileges may still get around them, so pair them with managed endpoints that restrict who can change the settings.

Access ultimately depends on Google Cloud. Organization users must set a project through GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID, and Vertex AI sign-in also needs GOOGLE_CLOUD_LOCATION. Grant the Google Cloud IAM roles to groups instead of individual users, as Google recommends, and confirm which Gemini Code Assist edition covers your staff, since the paid Standard and Enterprise licenses are the path the product is designed for. Ask Google to confirm licensing and the audit logging of administrative and access activity for your tenant before approval.

Sign-in and access capabilities: built in, outside component or not supported

This table compares each sign-in and access control for Gemini CLI against three possible sources: built into the CLI, configured in a Google Cloud or Workspace setting, or dependent on an outside component such as a corporate proxy. Read each row against the edition your organization licenses, since the supplied facts do not confirm which controls apply to Gemini Code Assist Standard and Enterprise. The main takeaway is that the CLI-level enforcement is not a security boundary on its own, so identity and project controls must back it up.

CapabilityBuilt into the CLINeeds a Google Cloud or Workspace settingNeeds an outside component (proxy)Not available or not confirmed
Sign in with Google for company, school or Workspace accountsYesGoogle Cloud project set through GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_IDNoConfirm the Code Assist edition covered by the sign-in
Gemini API key sign-inYesNoNoConfirm whether API key use is permitted under your edition and policy
Vertex AI with Application Default CredentialsYesGoogle Cloud project and GOOGLE_CLOUD_LOCATION setNoConfirm IAM roles needed for the Vertex AI endpoint
Vertex AI with service account JSON key (non-interactive and CI/CD)YesService account with a key file and GOOGLE_CLOUD_LOCATION setNoConfirm key management and rotation practice with Google Cloud
Enforce one authentication method with security.auth.enforcedTypeYesNoNoNot a security boundary; a user with local privileges may still circumvent it
Non-interactive mode exits with an error when the configured method does not matchYesNoNoNot applicable
Restrict logins to company domains with X-GoogApps-Allowed-DomainsNoGoogle Workspace admin configurationCorporate proxy must set the headerConfirm the header works with your proxy and sign-in flow
IAM roles assigned to groups rather than individual usersNoGoogle Cloud IAM groups and role bindingsNoConfirm group sync with your identity provider
Audit logging of administrative and access activityNoGoogle Cloud audit logging configurationNoConfirm log coverage for CLI sessions with Google

How the sign-in path is chosen and enforced on each install

Gemini CLI offers three ways to authenticate, and each needs different inputs. Sign in with Google is the interactive route for organization users with a company, school or Google Workspace account, and it needs a Google Cloud project identified through GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID. A Gemini API key is the second option. The third, Vertex AI, uses Application Default Credentials for interactive use or a service account JSON key for non-interactive environments and CI/CD pipelines, and it requires GOOGLE_CLOUD_LOCATION to be set. The repository marks Vertex AI for enterprise teams and production workloads. Before approving a method, confirm which project and location each team will use, and who owns the service account keys that a pipeline depends on.

Enforcement happens on each client, not in a central identity service. Admins can fix one method with the security.auth.enforcedType key in the enterprise configuration, so users cannot switch to another sign-in path from the interactive prompt. That key lives in a local settings file, and the enterprise configuration page states that these admin patterns are not a foolproof security boundary because a user with local privileges may still circumvent them. For a control that must hold, treat the setting as a guardrail for managed workstations and pair it with restricted local administrator rights and with the identity and project controls described below. Ask the vendor or your Google account team to confirm how the setting is distributed and whether it can be locked against local edits in your environment.

Non-interactive runs behave differently. When the CLI runs without a prompt, a configured method that does not match the enforced method makes the CLI exit with an error rather than fall back to another method. This is useful in CI/CD, where a silent fallback could send work through an unapproved credential. Test the pipeline with the enforced setting before rollout, and confirm that every service account and key used by automation is the one your security team has approved for that method and project.

Decisions to make on identity, method and project before rollout

Six decisions shape how Gemini CLI signs staff in and what each user can reach. Most of them are settled before the first install, because the sign-in method, the Google Cloud project and the IAM model decide who can use the tool and what those users are billed and logged against.

One sign-in method per population

Choose one allowed method for interactive staff, another for CI/CD service accounts and a third for Vertex AI production workloads, then enforce it with security.auth.enforcedType in the system settings. Interactive staff typically use Sign in with Google, pipelines use a service account, and production uses Vertex AI. Enforcing a single method keeps a developer from quietly switching to a personal API key, and in non-interactive mode a mismatch makes the CLI exit with an error, which a pipeline owner should test before relying on it.

Enterprise configuration

Workspace domain restriction and proxy ownership

Decide whether logins must be limited to company domains. Google Workspace admins can do this with the X-GoogApps-Allowed-Domains header set on a corporate proxy, so someone must own that proxy, its change process and its logs. Confirm who operates it, whether it covers every network path staff use, and how it is tested. The enterprise configuration page notes that these admin patterns are not a foolproof boundary, so the proxy is a control to verify, not a guarantee.

Google Cloud projects by team and environment

Gemini CLI reads the project from GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID, so project boundaries determine which resources, billing lines and audit records belong to which team. Splitting projects by team or by environment (for example, development separate from production) makes access reviews and cost reporting clearer. Confirm with your Google Cloud administrators how projects are created, who may change the project variable on a workstation, and whether that variable is set by policy or left to each user.

IAM roles assigned to groups

Google's security guidance for Gemini Code Assist recommends assigning IAM roles to groups rather than individual users. Group-based grants let identity administrators add or remove a developer in one place, and access reviews then show who holds each role. Map each Gemini role to a directory group, confirm that no individual user holds a role directly, and record which group owners approve membership changes.

Security and compliance guidance

Audit log retention

Google's guidance recommends audit logging of administrative and access activity for Gemini Code Assist. Decide where those logs are sent, who can read them, and how long they are kept under your own retention policy, because the period is set by your organization rather than by the CLI. Confirm with Google Cloud which log types are enabled for your projects and whether they reach your security information system, since a log that no one reviews does not support an incident investigation.

Service account key issuance and rotation

Vertex AI sign-in with a service account JSON key suits non-interactive environments and CI/CD, but a long-lived key is a standing credential. Define who issues keys, where they are stored (a secrets manager, not a repository), how often they rotate, and how a leaked key is revoked. Where possible, prefer Application Default Credentials or workload identity from the pipeline platform so no static key sits on a runner. Confirm these steps with your identity and platform teams before the pipeline goes live.

Authentication docs

How sign-in differs for Workspace, CI/CD and regulated teams

Staff with a company, school or Google Workspace account normally choose Sign in with Google when they start the CLI. The account must be tied to a Google Cloud project, which the user sets through GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID, so the project choice is part of the access decision. Admins can enforce one method with security.auth.enforcedType in the system settings file, and Workspace admins can limit logins to approved domains by setting the X-GoogApps-Allowed-Domains header on a corporate proxy.

  • Method: Sign in with Google, tied to a Workspace identity and a Google Cloud project.
  • Admin lever: security.auth.enforcedType to block other methods, and the allowed-domains header on the corporate proxy.
  • Project control: Confirm which projects a user can set, since the project variable decides what the account can reach.
  • Gap to confirm: The enterprise page says these patterns are not a foolproof boundary, because a user with local privileges may still get around them. Confirm whether managed endpoints prevent users from editing the settings file or changing environment variables.
  • Gap to confirm: Confirm that the proxy enforces the domain header for every route the CLI uses on your network.

Before approval, test a personal account on a managed device to confirm the enforced method and domain rule block it.

Order of work to put sign-in controls into production

This sequence moves Gemini CLI sign-in from a pilot to a controlled rollout, with each step confirming one decision so that the enforced method, the permitted domains and the Google Cloud access path are known before staff depend on them. Each step ends with a check you can record for your approval file.

  1. Confirm the licensed edition and the Antigravity change

    The security or procurement lead confirms with Google which Gemini Code Assist edition covers Gemini CLI for your staff, and gets written confirmation of how the June 18, 2026 move of free individual access and Google AI Pro and Ultra to Antigravity CLI affects your population. Ask whether Gemini CLI is still offered to new Code Assist subscribers and which models it supports, since the Code Assist overview says Gemini CLI is not optimized for the latest models. Done means you hold a dated written answer naming the edition, the quota and the tool that replaces Gemini CLI for each group of users.

  2. Create Google Cloud projects and group IAM bindings

    The cloud administrator creates the Google Cloud project that users will set through GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID, and assigns IAM roles to Google groups instead of individual accounts, as the Code Assist security documentation recommends. Keep developers, CI service accounts and administrators in separate groups so that each one carries only the roles it needs. Done means an access review can list every group bound to the project and the role each one holds.

  3. Choose one enforced method for each population

    The identity lead decides which sign-in method each group uses: Sign in with Google for interactive staff, and Vertex AI with Application Default Credentials or a service account JSON key for non-interactive work such as CI/CD. Write the choice into the system settings with security.auth.enforcedType so that users cannot switch to another method on their own. Note that the JSON key path needs GOOGLE_CLOUD_LOCATION set. Done means each population has one documented method and a settings file that enforces it.

  4. Set the corporate proxy header for domain restriction

    The Google Workspace administrator, working with the network team, configures the corporate proxy to set the X-GoogApps-Allowed-Domains header so that sign-ins are limited to your company domains. Test with an account from an outside domain and with a company account, and record both results. Because the enterprise configuration page warns that admin patterns are not a foolproof boundary when a user has local privileges, state in the approval record that the proxy restricts sign-in but does not stop a user who controls the device. Done means both test results are recorded and the proxy change is under change control.

  5. Test non-interactive mismatch behavior in CI

    The platform engineer runs a CI job configured with the enforced method and a second job configured with a different method. The enterprise configuration page says the CLI exits with an error in non-interactive mode when the configured method does not match, so confirm that the mismatched job fails and the matched job completes. Keep the pipeline logs as evidence. Done means both jobs behaved as expected and the failure output is stored with the rollout record.

  6. Enable audit logging and confirm who can read it

    The cloud administrator turns on audit logging for administrative and access activity, as the Code Assist security documentation recommends, and confirms which Google Cloud roles can read those logs. Limit log reading to the security team and keep it separate from the people whose access is being logged. Run one sign-in and one IAM change and confirm both appear in the log. Done means the log entries are visible to the named reviewers and the reviewer list is recorded.

What audit logging covers and what it does not show

The Gemini Code Assist security, privacy and compliance documentation recommends audit logging of administrative and access activity. For a Gemini CLI rollout, that is the record a reviewer will ask for first, but it answers a narrower question than many teams expect. Before approving sign-in methods, confirm with your Google Cloud administrators which CLI events actually reach those logs. Access and administrative records from the Google Cloud side are different from a per-prompt record of what a developer typed or what the agent ran in a shell, so do not assume one stands in for the other.

Ask three specific questions and get written answers. First, which event types are captured for each sign-in path: Sign in with Google, a Vertex AI service account, and Application Default Credentials. Second, what retention period applies in your own Google Cloud configuration, since this page does not state one and retention can be set by your organization. Third, who can read these logs, including which IAM roles grant read access to audit data and whether security staff, auditors or project owners hold that access. Restrict log reading to a defined group so the audit trail is not editable or readable by the same people whose activity it records.

Keep prompt content and access records separate in your evaluation. Access logs show who authenticated, through which project and under which role. They do not, on their own, establish what a session asked for or what code was produced. If a reviewer needs prompt-level evidence, confirm with Google whether that content is recorded at all and where, which is a question for the data handling terms rather than the audit log. Document the gap in your control narrative so an assessor does not discover it during testing.

Evidence a security reviewer asks for on sign-in and access

This table lists the sign-in and access evidence a reviewer should request before approving Gemini CLI, and where each item comes from in the tool or in Google Cloud. Read each row as a request: the artifact named in the first column is what you ask the rollout owner to produce, and the right-hand column tells you where to look for it. Gaps in any row usually mean the control exists only as a convention rather than as something an admin can enforce and show.

ControlWhat to requestWhere it comes from
Enforced auth type in the managed configurationThe managed settings file showing security.auth.enforcedType set to one sign-in method, plus a sample from a non-interactive run that exits on a mismatchGemini CLI enterprise configuration, applied on each workstation or CI runner
Workspace domain restriction proxy configurationThe corporate proxy rule that sets the X-GoogApps-Allowed-Domains header, with the list of permitted domains and the owner of the proxyCorporate proxy in front of Google sign-in, configured by Google Workspace admins
IAM bindings to groupsExport of IAM role bindings on each in-scope project, showing groups rather than individual user principalsGoogle Cloud IAM for the projects set in GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID
Service account inventory and key handlingList of service accounts used for Vertex AI sign-in, with owner, purpose, key age, and where JSON keys are stored or whether Application Default Credentials are usedGoogle Cloud IAM service accounts and key management, plus CI/CD secret stores
Audit log exportSample export of administrative and access activity for the in-scope projects, with retention period and the destination the security team reads fromGoogle Cloud audit logging, as recommended in the Gemini Code Assist security, privacy and compliance documentation
List of Google Cloud projects in scopeNamed projects, the environment each serves, and the location setting (GOOGLE_CLOUD_LOCATION) used for Vertex AI sign-inProject inventory from the cloud owner, checked against environment variables in developer and CI configurations

Questions buyers ask before approving Gemini CLI sign-in

Does Gemini CLI have built-in SSO with Okta or Entra ID?

No built-in connector for Okta or Microsoft Entra ID is documented in the sources we reviewed. Sign-in runs through Google accounts: staff with a company, school or Google Workspace account sign in with Google, and the CLI needs a Google Cloud project set through GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID. If your identity provider is Okta or Entra ID, confirm with Google whether your Workspace or Cloud identity setup can federate it for these logins, and document how that federation is governed. Vertex AI sign-in uses Application Default Credentials or a service account JSON key, which are managed through Google Cloud rather than your IdP. Review the Gemini CLI authentication page before deciding which method each group may use.

What does Gemini CLI cost, and who pays for it?

Gemini CLI is open-source under the Apache License 2.0, so the client itself has no license fee. The cost sits in Google access. The Gemini CLI repository says it is designed for Gemini Code Assist Standard and Enterprise licenses, and that free individual access and Google AI Pro and Ultra moved to Antigravity CLI on June 18, 2026. Your organization pays Google for Code Assist seats, and the Code Assist overview lists a quota for Gemini CLI in both editions. Model usage through Vertex AI is billed by Google Cloud. Ask Google for the current per-user price, the quota figures for your edition, and whether the June 2026 change affects your order. Recurring costs are the seats and any usage above quota.

How long does a Gemini CLI sign-in rollout take?

No duration is supplied for this rollout, and the sources we reviewed do not give one. The time depends mainly on how many Google Cloud projects you need, how many CI jobs use service account keys, and whether your corporate proxy is ready to set the X-GoogApps-Allowed-Domains header that restricts logins to allowed domains. Organizations with one project and a single sign-in method move quickly. Those with several projects, separate CI pipelines and proxy changes need more coordination with Google Cloud and network teams. Ask Google and your own platform team for a timeline based on your project inventory, then confirm each dependency in a pilot group before wider rollout.

Can staff configure Gemini CLI sign-in themselves?

Staff can set basic options themselves, such as choosing sign-in with Google and setting their project variables, following the authentication guide. Enforcement is a different matter. Admins can require one method with security.auth.enforcedType, and in non-interactive mode the CLI exits with an error when the configured method does not match. However, the enterprise configuration page states that these admin patterns should not be treated as a foolproof security boundary, because a user with local privileges may still get around them. To make a restriction hold, pair it with device controls that stop local admin rights from changing the settings, and verify that those controls work on each platform your staff use.

What makes a Gemini CLI sign-in rollout harder to scope?

Effort rises with the number of places where credentials and settings live. The main drivers are:

  • The number of Google Cloud projects that staff and pipelines must reach, since each needs a project variable and IAM access
  • The number of CI jobs using service account JSON keys, which need key handling and rotation planning
  • Proxy complexity, including whether every egress path can set the allowed-domains header
  • Mixed sign-in methods across teams, which multiply the settings to test
  • How IAM is organized: the Code Assist security guidance recommends assigning roles to groups rather than individual users, and building that group model takes planning before rollout

Reducing any of these before work starts usually shortens the engagement.

Which Google Cloud access controls should we review first?

Start with IAM. The Code Assist security, privacy and compliance page recommends granting roles to groups rather than individual users, so access follows team membership and can be removed in one place. Next, confirm which projects each group can use, and enable the audit logging of administrative and access activity that the same page describes. Then decide which sign-in method each group may use, and whether service account keys are permitted at all for CI/CD. Write these decisions down so an auditor or reviewer can trace who was allowed to do what and when.

Can DeployOpen help scope and test Gemini CLI sign-in controls?

DeployOpen plans, implements, hardens and documents self-hosted open-source platforms inside a client's own infrastructure, and runs security testing that includes AI systems and agents. For Gemini CLI sign-in, that can mean scoping the project and group model, drafting the enforcement and proxy plan, and testing whether a restriction holds on a representative staff device and CI job. DeployOpen does not run Google's services, and it does not issue audit reports or certifications. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and a quote follows from that written scope.

How DeployOpen works on this

DeployOpen plans, builds and documents the sign-in and access controls around Gemini CLI inside your own Google Cloud and identity environment. We test each control the way an admin would enforce it and hand over a written record your security and compliance reviewers can check.

How we scope

  • Engagements are fixed-scope, with the sign-in methods, projects and user groups agreed in writing before work starts.
  • We confirm which sign-in path each user group uses: Google account, Workspace account or Vertex AI service account.
  • Scope names the identity provider, Google Cloud projects and IAM groups that will govern Gemini CLI access.

How we build

  • We configure the enforced authentication method and check how non-interactive and CI/CD runs behave when the method does not match.
  • We set up domain restriction through a corporate proxy, using the Workspace allowed-domains header where your environment supports it.
  • We assign IAM roles to groups rather than individual users and test that a user outside the group is refused access.

How we hand over

  • You receive a written record of each sign-in method, enforced setting, project binding and group-to-role mapping.
  • The record notes the limit that admin patterns are not a foolproof boundary, because a user with local privileges may still circumvent them.
  • We document the audit logging you should review for administrative and access activity, and who on your team owns that review.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Retesting covers changes to Gemini CLI releases, which ship weekly on Tuesdays, and to your identity or project configuration.
  • Before you request a quote, confirm the Gemini CLI plan and quota that apply to your users, since DeployOpen does not validate licensing.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.