The Simplest Way to Make Ceph and GitLab CI Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

You pair ceph and gitlab ci to store build artifacts and cache data on your own storage cluster. GitLab runners read and write files to Ceph object buckets or block pools during each job run. This setup keeps large files off your runner disks. It also speeds up builds across many machines at once. Teams use this flow to share test outputs, container layers, and release bundles. How ceph and gitlab ci share keys and data GitLab runners need a way to talk to your Ceph storage cluster. Most tea

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.

You pair ceph and gitlab ci to store build artifacts and cache data on your own storage cluster. GitLab runners read and write files to Ceph object buckets or block pools during each job run.

This setup keeps large files off your runner disks. It also speeds up builds across many machines at once. Teams use this flow to share test outputs, container layers, and release bundles.

How ceph and gitlab ci share keys and data

GitLab runners need a way to talk to your Ceph storage cluster. Most teams use the Ceph audit storage, which speaks the standard S3 API. The runner sends web requests to Ceph to upload or download build caches.

To log in, the runner uses an access key and a secret key. You create a user inside Ceph and tie those keys to one bucket. Then you put those keys into the runner settings or project variables.

Some teams mount Ceph block volumes or file systems right onto the runner host. In this setup, the host machine holds a Ceph keyring file on its disk. The runner reads that key file to mount a shared folder for the job.

Data flows straight from the runner to the Ceph storage nodes over your network. When a job starts, the runner pulls the cache zip file from the bucket. When the job ends, the runner pushes new artifacts back to that same bucket.

Common risks with shared keys and broad access

A big problem starts when teams share one Ceph key across all runners. If any pipeline job leaks that key, an attacker can read every build file. Static keys sitting in project settings also rarely get rotated on time.

Broad bucket rules cause trouble too. If a runner can write to every bucket, a bad script can overwrite release files. A test job might delete cached files that other teams need for their builds.

GitLab CI Security + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Another gap is weak logging inside the pipeline. When ten runners use the same Ceph user, the storage logs show one name. You cannot tell which GitLab user or pipeline job changed a file.

To fix this, give each runner group its own Ceph user and bucket. Set strict read and write rules so test jobs cannot touch release buckets. Keep runner nodes on a private network lane that only reaches the storage port.

How to scope storage roles for pipeline jobs

Start by splitting your storage into separate buckets for cache, test artifacts, and releases. Give your general build runners write access only to the cache and test buckets. Only your protected release runners should hold keys for the release bucket.

Check your Ceph user rules every month to remove old keys. Turn on bucket logging so you have a record of every file read and write. When storage includes test databases with user emails or phone numbers, masking rewrites matched fields in results.

You should also limit how long artifacts stay in the cluster. Set a bucket rule in Ceph to delete old cache files after seven days. This keeps your disks clean and lowers the risk of old data leaks.

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 I use Ceph object storage or file storage for GitLab runners?

Use Ceph object storage for most pipeline caches and build artifacts. It works over standard web requests and does not need host mounts. Use the Ceph file system only when jobs must share a live local folder.

How do I stop one project from reading another project cache?

Create a separate Ceph bucket and user key for each project group. Tie each dedicated runner to its own bucket so projects stay isolated. Never share a single master storage key across different teams.

Why do my GitLab jobs fail when uploading large artifacts to Ceph?

Large uploads often fail when the Ceph web frontend has a small size limit. Check the max body size and timeout rules on your Ceph object nodes. Also make sure the network path between the runner and storage has enough speed.

The query runs. The emails stay hidden.