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

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair gitlab ci and minio to store build caches and job outputs on local servers. The runner sends files to object storage over the S3 web interface during each job. This setup keeps large files off the main Git server and speeds up daily builds. Your runners fetch cached folders at the start of a job and upload new ones when done. How gitlab ci and minio share keys and files A build runner needs valid keys to read and write objects inside a storage bucket. You can pass static keys thro

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 pair gitlab ci and minio to store build caches and job outputs on local servers. The runner sends files to object storage over the S3 web interface during each job.

This setup keeps large files off the main Git server and speeds up daily builds. Your runners fetch cached folders at the start of a job and upload new ones when done.

How gitlab ci and minio share keys and files

A build runner needs valid keys to read and write objects inside a storage bucket. You can pass static keys through project variables, or you can use dynamic identity tokens.

With identity tokens, the runner presents a signed token from the pipeline to the storage server. The storage server checks the token signature and grants a short role for that single job.

Once logged in, the runner pulls cached folders before the main build script starts. After the build finishes, the runner packs the output files and sends them back to the bucket.

Data flows straight between the runner host and the storage server over your local network. The main source code server only tracks job state and does not hold the heavy files.

Common failure modes and how to scope bucket rules

Many teams use one shared service account across every runner and every code project. This mistake lets any test branch overwrite release files or read private data from other teams.

Long-lived keys stored in group settings also create a high risk if a build log leaks them. If an attacker reads those keys, they can pull every file from the storage server.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged bucket calls make it hard to see which job changed or deleted a critical file. You should turn on audit logs on the storage server to track every read and write call.

To fix broad permissions, scope each bucket policy to match a single project path and branch. Give test branches permission to read shared caches, but block them from writing to release folders.

Keeping build runners and storage networks fast and safe

Large build caches can slow down your pipeline if runners cross slow network links. Place your build runners in the same local network zone as your object storage cluster.

Use private network routes so build traffic never crosses the public web during file transfers. Require encrypted web connections on the storage server so keys and files stay safe on the wire.

Set up lifecycle rules on your buckets to clear out old job outputs after a few weeks. This simple rule keeps disk usage low and stops old test files from piling up.

Check your bucket policies every month to remove old project paths and unused service roles. When a team retires an app, delete its storage role right away to keep your setup clean.

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

How does a build runner log in to the storage server without static keys?

The pipeline creates a signed identity token for the job. The runner trades this token with the storage server for temporary session keys.

Why do build cache uploads fail on large projects?

Uploads often fail when a reverse server on the network blocks large file bodies. Check your network path and raise the size limit on the load balancer in front of storage.

How can we stop feature branches from poisoning the main build cache?

Assign separate bucket prefixes for protected branches and open feature branches. Give feature branches read-only permissions on the main cache prefix and write permissions on their own path.

The query runs. The emails stay hidden.