The Simplest Way to Make Gerrit and JetBrains Space Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use gerrit and jetbrains space together to review code and run builds. Gerrit manages patch sets and approvals while Space handles team chat and pipelines. This setup lets developers keep strict code rules while using Space for daily work. How gerrit and jetbrains space share data and roles Linking these two tools starts with how they talk to each other. Gerrit acts as the main source of truth for your Git repos. JetBrains Space reads from Gerrit or mirrors the branches to run automated

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.

Teams use gerrit and jetbrains space together to review code and run builds. Gerrit manages patch sets and approvals while Space handles team chat and pipelines. This setup lets developers keep strict code rules while using Space for daily work.

How gerrit and jetbrains space share data and roles

Linking these two tools starts with how they talk to each other. Gerrit acts as the main source of truth for your Git repos. JetBrains Space reads from Gerrit or mirrors the branches to run automated jobs. When a developer pushes a change to Gerrit, an event triggers a webhook. That webhook sends a message to Space to start a build or notify a channel.

Permissions must match across both systems to avoid security gaps. In Gerrit, admins set up access control lists on specific branches and projects. In Space, roles define who can view projects, run jobs, or read logs. You should link both tools to the same central identity provider. When a user logs in, both apps check the same group memberships. This keeps user roles in sync when people join or leave a team.

Data flows both ways during a normal code review cycle. First, Gerrit sends patch set details to Space. Next, a Space automation worker pulls the code using an SSH key or HTTP token. After the tests finish, the worker sends a vote back to Gerrit. That vote marks the change as verified so a human reviewer can merge it.

Common failure modes and how to scope roles

Many teams make the mistake of using one shared admin account for sync tasks. A developer might create a personal token with full rights and paste it into Space. If that token leaks, an attacker can bypass code review and change any repo. Also, when a shared account posts a comment or merges code, audit logs lose clarity. You cannot tell which job or person caused the change.

Broad network paths create another big risk for your source code. Often, Gerrit sits on a private network while runners execute jobs in different cloud zones. Opening all ports between your build workers and your Git server invites lateral attacks. Instead, restrict network paths so workers only reach the exact ports needed for Git traffic.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix token risks, create a dedicated bot account in Gerrit just for Space. Give this bot account read rights on the target repos and permission to vote on labels. Do not give the bot permission to submit changes or bypass branch rules. In Space, store the bot credentials in the project secret store, not in plain text files. Scope each secret to the single project that needs it.

Keeping build logs and review history clean

When build scripts run in Space, they often print environment details to the log output. If a script fails, it might dump raw data or keys into the build console. Make sure your jobs scrub secrets before writing any text to the log screen. You should also check what data gets posted back to Gerrit review comments. Keep automated messages short, with a status vote and a reference to the build job.

Review your bot accounts and active keys on a set schedule. Rotate the SSH keys and HTTP tokens used by your automation jobs every few months. If a project ends, turn off its mirror settings and delete the old bot credentials right away. Clear ownership and small permissions keep your review pipeline safe and fast.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Should Gerrit or JetBrains Space hold the primary Git repository?

Keep Gerrit as the primary Git server if you rely on its change review model. Set up Space to mirror the repo or fetch specific refs when a build starts.

How should Space workers log in to Gerrit during a build?

Use a dedicated service account in Gerrit with a scoped SSH key or HTTP token. Grant that account read access and label voting rights, but block branch push rights.

Why are Gerrit change events not triggering jobs in Space?

Check the network path between Gerrit and the Space webhook endpoint first. Then verify that the webhook secret is still valid and the bot account has read permissions.

The query runs. The emails stay hidden.