A self-hosted MinIO cluster is usually protected by one root key pair set in an environment file, plus a growing pile of access keys that never expire, and whoever holds either can read, overwrite or delete every object in it. MinIO speaks the Amazon S3 API, so the same tools, SDKs and attack techniques that work against S3 work against it, but the controls you get for free in a hyperscaler (organisation policies, CloudTrail, managed key rotation) are things you have to configure yourself. This guide explains how identity and access work in MinIO, which policies and credentials matter, how to log and detect misuse, and a hardening baseline for production. It is for platform, storage and identity teams running MinIO or a similar S3 compatible store on premises or in Kubernetes. Behaviour is taken from the MinIO documentation repository; check your release before changing settings.
This is an independent guide from NHI Mgmt Group, based on MinIO's public documentation as of November 2026. It is not sponsored or reviewed by MinIO. Product features change, so confirm settings against MinIO's current documentation.
Key takeaways
- The root user bypasses everything.
MINIO_ROOT_USERandMINIO_ROOT_PASSWORDgrant access to all actions regardless of identity provider, and if they are unset MinIO falls back tominioadmin/minioadmin. Treat the root pair as a break glass secret, never as an application credential. - Access keys do not expire. MinIO access keys (formerly service accounts) live until you remove them or their parent user, and inherit the parent's permissions unless you attach an inline policy. Inventory them and give each an owner.
- Prefer STS for workloads. AssumeRoleWithWebIdentity, AssumeRoleWithLDAPIdentity and AssumeRole issue temporary credentials that default to one hour and can last up to seven days, which removes stored keys from most pipelines.
- Audit logging is off until you turn it on. MinIO publishes audit logs only to webhook or Kafka targets you configure, so a default deployment keeps no per request record outside the console output.
- Check your support position. The community
minio/miniorepository now states it is no longer maintained and is distributed as source only, which changes how you get security fixes. Decide between building from source, a commercial edition or another S3 compatible store before the next advisory lands.
How identity and access work in MinIO
Every request to the S3 API (default port 9000) or the embedded Console (recommended port 9090) is signed with an access key and secret key using AWS Signature Version 4. MinIO resolves the access key to an identity, collects the policies attached to that identity and its groups, and evaluates them with IAM style rules: everything is denied unless explicitly allowed, and an explicit Deny overrides any Allow. Policies are JSON documents using S3 actions (s3:GetObject, s3:PutObject), MinIO admin actions (admin:*) and condition keys, including object tag based conditions for selected actions.
Identity sources
| Identity source | What it creates | Lifetime | Security notes |
|---|---|---|---|
| Root user | Superuser from MINIO_ROOT_USER / MINIO_ROOT_PASSWORD | Until the variables are changed on every node | Ignores the configured identity manager. Defaults to minioadmin if unset. Legacy MINIO_ACCESS_KEY / MINIO_SECRET_KEY are deprecated. |
| Internal IDP users | Long-lived access key and secret key pairs (mc admin user add) | Permanent | Secret key cannot be retrieved after creation. Disabled when AD/LDAP is enabled. |
| Access keys | Child credentials of any user, internal or external (mc admin user svcacct add) | Permanent until removed, or the parent is removed | Inherit parent permissions; an optional inline policy can only narrow them. Cannot log in to the Console. Any user can create them for themselves. |
| OIDC | Temporary credentials via AssumeRoleWithWebIdentity, policy taken from a JWT claim (MINIO_IDENTITY_OPENID_CLAIM_NAME) or role policy | Default 1 hour, maximum 7 days | Multiple OIDC providers can coexist with internal users. |
| AD/LDAP | Temporary credentials via AssumeRoleWithLDAPIdentity, policies mapped to LDAP users and groups | Default 1 hour, maximum 7 days | Mutually exclusive with OIDC; disables internal users except access keys. |
| Custom identity plugin | AssumeRoleWithCustomToken backed by your own authentication service | Set by the plugin response | The plugin endpoint becomes part of your trust boundary. |
MinIO also supports pluggable authorisation, where an external policy engine such as Open Policy Agent answers each access decision instead of MinIO's built-in policies. That moves the authorisation logic, and the audit trail for policy changes, into the external system.
Other S3 compatible stores (Ceph Object Gateway, Garage, SeaweedFS and appliance products) use the same access key and secret key model with their own policy engines. The principles in this guide carry over, but setting names, defaults and logging differ, so check each product's documentation.
Admin roles and privileged access
MinIO ships five built-in policies. Two of them are effectively administrator roles, and one sounds safer than it is.
| Built-in policy | Grants | Risk view |
|---|---|---|
consoleAdmin | s3:* and admin:* on all resources | Full control: users, policies, configuration, KMS settings, every object. Equivalent to root for daily purposes. |
readwrite | s3:* on all buckets | Can delete buckets, change bucket policies, set anonymous access and remove versions. Not an application policy. |
readonly | s3:GetBucketLocation, s3:GetObject | Reads any object by path but cannot list; still exposes every object whose name is known or guessable. |
writeonly | s3:PutObject | Can overwrite any object path on the deployment, which is enough to tamper with data or plant files. |
diagnostics | ServerTrace, Profiling, ConsoleLog, ServerInfo, TopLocksInfo, OBDInfo, BandwidthMonitor, Prometheus | Server trace output shows request details; grant only to operators, time bound. |
- Write bucket scoped policies: none of the built-in policies is limited to a bucket. For applications, create custom policies naming
arn:aws:s3:::bucketandarn:aws:s3:::bucket/prefix/*with only the actions the workload uses. - Separate administrators: give humans named accounts through OIDC or LDAP groups mapped to
consoleAdminor a narrower admin policy, so every admin action is attributable. Keep the root pair sealed in a vault, used only for recovery, and rotate it after use by updating the variables on all nodes. - Deny the dangerous admin actions by default: a narrower operator policy can allow monitoring and healing but explicitly deny
admin:CreateUser,admin:CreatePolicy,admin:AttachUserOrGroupPolicyand KMS administration, so a stolen operator credential cannot mint new identities. - Protect the retention bypass:
s3:BypassGovernanceRetentionlets a user remove GOVERNANCE mode locks. Grant it to nobody in daily use. - Kubernetes: with the MinIO Operator, root credentials sit in a tenant Kubernetes Secret, so anyone who can read Secrets in that namespace holds root. See the Kubernetes Secrets Security Guide.
Integrations, API tokens and service accounts
Most MinIO credentials belong to machines: backup software, data pipelines, analytics engines, log shippers, replication targets and CI jobs. They are non-human identities and need the same lifecycle as any other. See the Service Account Security Guide.
| Credential | Where it usually lives | Better pattern |
|---|---|---|
| Root pair | /etc/default/minio, systemd environment, Kubernetes Secret, Compose files | Vault or secrets manager, file permissions 0600, never in images or Git |
| Application access keys | Application config, CI variables, Spark or Trino catalogue files | STS with OIDC (workload identity tokens from Kubernetes or CI) or an access key with an inline bucket scoped policy and an owner tag in your inventory |
| Replication credentials | Remote target definitions on the source cluster | Dedicated user on the target with only replication actions on the target bucket |
| KES client certificates | MinIO node, KES configuration | Short-lived certificates, KES identity policy limited to the keys MinIO needs |
| Prometheus bearer token | Prometheus scrape configuration | Keep MINIO_PROMETHEUS_AUTH_TYPE=jwt (the default); never set it to public on a reachable endpoint |
| Webhook auth tokens | MINIO_AUDIT_WEBHOOK_AUTH_TOKEN, MINIO_LOGGER_WEBHOOK_AUTH_TOKEN | Treat as secrets; a leaked token lets someone inject or read log traffic at the receiver |
- Environment variables are not a vault: anything in the environment can be exposed by a software bug, so apply MinIO's security updates promptly and, if you ran a cluster exposed to untrusted networks, rotate root and every key that sat in the environment.
- Stolen keys, legitimate features: a valid long-term key with write access can use SSE-C to re-encrypt objects with a key the attacker holds, and MinIO supports SSE-C. Where you do not use SSE-C, deny
s3:PutObjectwhen thex-amz-server-side-encryption-customer-algorithmcondition key is present, and keep versioning plus object locking on recovery buckets. - Access key sprawl: because any user can create access keys for themselves, keys proliferate silently. Run
mc admin user svcacct listfor each user on a schedule and reconcile against your inventory. See the API Key Management Guide.
Logging and detection
MinIO writes server operations to the console (read through journalctl under systemd) and publishes two kinds of log to external targets only when configured: server logs (MINIO_LOGGER_WEBHOOK_*) and audit logs (MINIO_AUDIT_WEBHOOK_*, or a Kafka target). Audit logs are JSON documents sent as HTTP PUT requests, one per API call, including the API name, bucket, object, remote host, user agent, access key and response status. Send them to your SIEM and alert on the patterns below.
| Signal | What to look for | Why it matters (ATT&CK) |
|---|---|---|
| Root key in use | Any audit entry where the access key equals the root user outside a change window | Valid Accounts, T1078 |
| Identity changes | AddUser, SetPolicy, AttachPolicy, AddServiceAccount, UpdateServiceAccount | Persistence through new keys or broader policies |
| Bulk reads | GetObject or ListObjects volume per access key far above baseline, new source IP | Data from Cloud Storage, T1530 |
| Bulk overwrite or delete | Spikes in PutObject, DeleteObject, DeleteObjects or lifecycle changes, SSE-C headers on writes | Data Encrypted for Impact, T1486 |
| Exposure changes | PutBucketPolicy that adds an anonymous principal, mc anonymous set operations, encryption or versioning suspended | Turns private data public or removes recovery |
| Unusual admin calls | ServerTrace, config get or set, KMS key operations by non-operator identities | Reconnaissance and credential discovery |
| Exploit traffic | Unauthenticated or malformed requests from the internet against the S3 port, POST policy uploads from unexpected sources, WAF hits | Exploit Public-Facing Application, T1190 |
Pair audit logs with MinIO's Prometheus metrics for capacity and error rates, and with your secret scanner for MinIO key formats in code and images. See the Detection Engineering for Non-Human Identities Guide.
Metrics that show the controls work
- Root key usage: root authenticated requests per month outside approved break glass events (target zero).
- Static key share: percentage of workload requests made with STS credentials rather than permanent access keys.
- Key ownership: percentage of access keys with a recorded owner, purpose and review date (target 100%).
- Key age: number of access keys older than your rotation period, for example 90 days.
- Audit coverage: percentage of clusters forwarding audit logs, with alerts tested in the last quarter.
- Anonymous buckets: count of buckets with anonymous policies, each with an approved exception.
Hardening baseline
- Fix the root pair first: confirm
MINIO_ROOT_USERandMINIO_ROOT_PASSWORDare set to long random values on every node, not the defaults, and stored in a secrets manager. Search config management, Compose files and Helm values forminioadmin. - Turn on TLS: place
private.keyandpublic.crtin${HOME}/.minio/certsor a directory passed with--certs-dir, using TLS 1.2 or 1.3, with separate certificates for internal and external names and a configured trusted CA store for node to node traffic and identity providers. - Restrict the network: expose port 9000 only to clients that need it; keep the Console port on an admin network or disable the embedded Console with
MINIO_BROWSER=offwhere you administer throughmc. Never expose node to node traffic to the internet. - Connect an identity provider: configure OIDC or AD/LDAP, map groups to policies, and move humans off internal users. Test in a staging tenant, because enabling LDAP disables internal users apart from access keys.
- Replace built-in policies for applications: write bucket and prefix scoped policies, attach them to groups, and add explicit denies for policy and user administration.
- Enable audit logging: configure an audit webhook or Kafka target with TLS and an auth token, and confirm entries arrive before go-live.
- Encrypt at rest with external keys: deploy KES with Vault, AWS KMS, Google Cloud Secret Manager or Azure Key Vault and set bucket default encryption with
mc encrypt set sse-kms. Keep KES key policy narrow. - Protect recovery data: enable versioning and create recovery buckets with
mc mb --with-lock(object locking can only be enabled at creation), using COMPLIANCE mode where nobody, including administrators, should shorten retention. See the Backup Security and Immutable Backup Guide. - Patch on a schedule: track MinIO's security advisories, apply security updates promptly, and decide now how you will receive fixes; confirm the current support route with MinIO.
- Roll back safely: change policies by creating a new version and reattaching, keep the previous JSON in version control, and test identity provider changes with a second admin session open so a mistake does not lock you out.
Small and large deployments
A single node lab or small team store can rely on internal users, a few bucket scoped access keys with inline policies and a quarterly key review, provided root is sealed and audit logs go somewhere. A multi-tenant or regulated deployment should use OIDC or LDAP with group mapping, STS for every workload that can obtain an identity token, KES with an external KMS, object locking for anything that must survive ransomware, and either a commercial support contract or a documented process for building patched releases from source.
Common misconfigurations
- Default credentials in production: containers started without root variables run as
minioadmin/minioadmin, which internet scanners try routinely. - Applications on root or readwrite: a single leaked key then exposes, and can destroy, every bucket. This is the most common finding in MinIO reviews.
- Secrets in environment files shipped widely: root and keys copied into Compose files, Helm values and CI logs, then exposed through a software bug or a repository leak. See the Secrets Management Guide.
- Anonymous policies left from testing:
mc anonymous set publicgrants unauthenticated read and write;downloadstill publishes every object. - Prometheus metrics set to public: exposes cluster topology and usage to anyone who can reach the endpoint.
- No audit target and no versioning: after an incident there is no record of which key did what and nothing to restore.
- Orphaned access keys: keys created by a departed engineer keep working until the parent account is removed, and removing the parent breaks the pipelines that depend on them. Reassign before deprovisioning. See the NHI Offboarding and Decommissioning Guide.
Framework mapping
| Control area | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | CIS Controls v8.1 |
|---|---|---|---|
| Least privilege policies and admin separation | AC-6 | PR.AA-05 | 3.3, 5.4 |
| Root and access key management | IA-5 | PR.AA-05 | 5.2 |
| TLS and encryption at rest | SC-8, SC-28 | PR.DS-01 | 3.10, 3.11 |
| Audit logging | AU-2, AU-12 | PR.PS-04 | 8.2 |
| Disable unused features (Console, public metrics) | CM-6, CM-7 | PR.PS-01 | 4.8 |
| Patching and supported software | SI-2 | PR.PS-02 | 7.4, 2.2 |
Practitioner checklist
- Root pair is random, stored in a vault, not the default, and its use raises an alert.
- No application uses root,
consoleAdminorreadwrite; every workload has a bucket scoped policy. - Humans authenticate through OIDC or LDAP groups, not shared internal users.
- Workloads that can present an identity token use STS credentials with the shortest practical duration.
- Every access key has an owner, purpose and review date; keys are reconciled at least quarterly.
- TLS is on for clients, nodes, KES and identity providers; the Console is restricted or disabled.
- Audit logs flow to the SIEM with alerts for identity changes, bulk deletes and anonymous policies.
- Recovery buckets use versioning and object locking in COMPLIANCE mode; nobody holds
s3:BypassGovernanceRetentionday to day. - A documented route exists for receiving security fixes, and MinIO's latest security updates are applied.
Standards and references
- MinIO: Documentation source repository (identity, policy, logging, encryption)
- MinIO: minio/minio repository and maintenance notice
- NIST: SP 800-53 Rev. 5
- NIST: Cybersecurity Framework 2.0
- MITRE ATT&CK: Data from Cloud Storage
- MITRE ATT&CK: Data Encrypted for Impact
Related NHI Mgmt Group resources: Data Lake Security Guide · Amazon S3 Security Guide · Secrets Management Guide · Non-Human Identity (NHI) Guide