The Simplest Way to Make Drone and Google Workspace Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Drone and Google Workspace work together to let your team log in and run code builds. Your identity provider checks each user before they start a build or read a log. This setup links your single sign-on accounts to your build server. Engineers do not need to manage extra passwords for build tools. When a person leaves the company, you turn off one account and block all build runs. How drone and google workspace share login data Google Workspace holds your team list, user groups, and login r

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Drone and Google Workspace work together to let your team log in and run code builds. Your identity provider checks each user before they start a build or read a log.

This setup links your single sign-on accounts to your build server. Engineers do not need to manage extra passwords for build tools. When a person leaves the company, you turn off one account and block all build runs.

How drone and google workspace share login data

Google Workspace holds your team list, user groups, and login rules. Drone runs your code tests and builds inside isolated containers. To link them, you set up an OAuth app in your cloud console.

First, an admin creates client credentials in the Google admin area. Those credentials give the build server a client ID and a secret key. Next, the admin adds those keys to the build server start settings.

When a developer opens the build dashboard, the server sends them to Google. The user logs in with their work email and passes a two-step check. Google then sends a signed token back to the build server.

The build server reads the email and domain from that token. You can set a rule that only lets in users from your company domain. Once the check passes, the server creates a user session and syncs repo access.

Common failure modes and how to scope roles

Many teams make mistakes when they first link these two tools. A common error is leaving the allowed domain list blank on the build server. If you do that, anyone with a personal Gmail account might log into your server.

Another bad habit is using one shared service account for all build pipelines. Shared accounts hide who ran a job or changed a build secret. If an attacker steals that shared key, they can read all your code and secrets.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Broad tokens also create high risk during automated steps. Some teams give build runners full admin tokens to send chat alerts or read drive files. A compromised build script can use that broad token to read private company files.

Unlogged database queries and hidden shell runs inside build steps cause blind spots too. If a build runner connects to a database, you need to know which user triggered it. Standard container logs often miss the actual database commands or show raw sensitive data.

To fix this, map each build action to a real human user. Limit the login domain so only active staff accounts can enter the build UI. Use narrow service roles that can only reach the exact folders or chat rooms they need.

Network paths and secret rules for build runners

Good login rules are only half of the security picture. You also need to control where your build runners can send network traffic. Runners should sit in a private network subnet with strict outbound rules.

Only allow the main build server to talk to the Google login endpoints. Individual build containers do not need open access to the public web. Give each project its own secret store path so teams cannot read each other's keys.

Rotate your OAuth client secrets on a regular schedule. Check your workspace login audit logs every week for strange login spikes. If a build runner touches live data, mask fields like emails, phone numbers, and card numbers.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Can I restrict Drone logins to a single Google Workspace group?

Standard OAuth login checks the email domain rather than specific user groups. To filter by group, check group data during login or sync repo teams in your code host.

What happens to running builds when I suspend a Google user?

A build that is already running will finish its current steps. Still, the suspended user cannot log back in, view build logs, or start any new jobs.

How do I stop build scripts from leaking Google API keys?

Never put keys directly inside your code repo or plain text build files. Store them in an encrypted secret store and grant each build step only the minimum role needed.

The query runs. The emails stay hidden.