The Simplest Way to Make Kong and Minio Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Pairing kong and minio lets your team route web requests straight to object storage. Kong checks incoming traffic rules, while MinIO stores and serves the raw files. Many backend teams run these two tools side by side in production. Web apps need a fast way to fetch images, logs, and user uploads. Putting your API router in front of object buckets keeps traffic neat and orderly. You get one clean entry point for all your web apps and storage buckets. How requests and permissions flow between

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.

Pairing kong and minio lets your team route web requests straight to object storage. Kong checks incoming traffic rules, while MinIO stores and serves the raw files.

Many backend teams run these two tools side by side in production. Web apps need a fast way to fetch images, logs, and user uploads. Putting your API router in front of object buckets keeps traffic neat and orderly. You get one clean entry point for all your web apps and storage buckets.

How requests and permissions flow between kong and minio

A user app sends a file request to a public Kong route first. Kong checks the caller identity and applies rate limits at the edge. If the check passes, Kong forwards the request to the backend MinIO server.

MinIO expects standard object storage signatures on every single read or write call. It checks its own internal policy rules before it serves any bucket data. If a bucket is public, Kong can forward the web traffic without extra signing.

Private buckets require much tighter controls between the two systems. The request must carry a valid signature or a signed URL from your app. MinIO verifies that signature against the user key and role policy on record. Once verified, MinIO streams the file back through Kong to the waiting client.

Common failure modes with shared keys and broad roles

The biggest mistake teams make is hardcoding one root MinIO key inside Kong. When every route uses one shared key, you lose track of who did what. Audit logs in MinIO will show every single read coming from that one account.

Broad bucket permissions create another major risk for your storage servers. Teams often grant full read and write roles just to make file uploads work. If a public Kong route gets misconfigured, outsiders might read or delete private buckets.

End-to-End Encryption + Kong Security Plugins: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Large file transfers can also clog up your API nodes during peak hours. Routing multi-gigabyte video uploads through standard API workers eats up memory and CPU fast. Timeouts happen when the router waits too long for a slow storage write.

Scoping network paths and storage policies

Start by keeping your MinIO nodes on a private internal network segment. Only your Kong nodes and approved backend apps should reach the storage ports. Block all direct public internet traffic from hitting your MinIO cluster ports.

Next, stop using shared admin keys for traffic coming from your API routes. Create separate MinIO service accounts for each app or team that needs bucket space. Write strict bucket policies that limit each account to one specific folder path. Separate read roles from write roles so public routes can never overwrite stored files.

For huge files, let your backend app generate short-lived presigned URLs instead. The client can then upload the heavy file within a tight time window. Use Kong to guard the app endpoint that creates those signed URLs. Turn on detailed request logs in both tools so you can trace every file access.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Should I route large file uploads directly through Kong to MinIO?

Small files work fine through standard routes, but huge files can cause timeouts. For big uploads, use an app endpoint behind Kong to issue presigned MinIO URLs.

How do I stop public users from listing all files in a MinIO bucket?

Remove the bucket list permission from the MinIO policy tied to that route. Match this with strict path rules in Kong that only allow exact file names.

How can we track which user downloaded a private file from MinIO?

Pass a unique request header from Kong to your backend and log it in both tools. Avoid using a single shared storage key without logging user identity at the edge.

The query runs. The emails stay hidden.