Files
minio/docs/multi-user/README.md
T
Feng Ruohang c46b16ec62 chore: cut over to pgsty/silo and main
The transitional references land in one commit, because they are only correct
together: the repository is pgsty/silo, its default branch is main, and nothing
in the tree should point a user at the old names.

Changed:

- Workflow branch filters. go.yml and vulncheck.yml gated on `branches: master`
  for both push and pull_request, so renaming the default branch would have
  taken automatic CI offline with no error and no signal - the workflows would
  simply never trigger again. They now name main.
- Release target. goreleaser's `release.github.name` becomes silo, which is
  what actually decides where a tagged build publishes. sign-release-rpms.sh's
  GH_REPO default follows.
- The OCI `image.source` label, the Helm chart `sources` entry, the security
  advisory link in the issue-template config, and the go.mod comment citing the
  LDAP TLS fix.
- 115 occurrences across README, README_ZH, SECURITY, CONTRIBUTING and 30 docs
  pages, including 72 links that also carried the master branch in their path.
  Those matter most: GitHub redirects clone, fetch, push and web URLs after a
  rename, but raw.githubusercontent.com does not, and neither follows a branch
  rename - every one of those links would 404 twice over.
- Three error strings in cmd/erasure-sets.go, cmd/storage-errors.go and
  internal/config/errors.go that print an issue URL to operators. These are Go
  string literals inside rebrand-guard's brand allowlist, so the baseline is
  regenerated. The regeneration removes exactly those three entries and adds
  none; all twelve other protected sets, including the 9014 exported symbols,
  are byte-identical.
- The transitional-naming disclaimers in README, README_ZH, SECURITY and
  CONTRIBUTING are dropped, since they no longer describe anything.

Deliberately unchanged, all three because they exist to reject or freeze the old
name rather than to point at it:

- buildscripts/minio-upgrade.sh pins pgsty/minio@sha256:b6bfe72... - the frozen
  pre-rebrand image is the control group for the MinIO-to-Silo upgrade test.
- helm-migration-guard rejects any rendered container still pulling pgsty/minio.
- verify-rebrand.sh rejects the same in the delivery surfaces.

Also unchanged: docs/config/README.md links to pgsty/mc/blob/master, and that
repository's default branch really is still master. It moves when mc does.

verify-rebrand.sh gains three assertions so this cannot silently regress: no
source reference may name pgsty/minio outside the three allowlisted guards, no
link may target pgsty/silo's master branch, and go.yml and vulncheck.yml must
filter on main. Both new rejections were negative-tested - reintroducing a
master branch filter and adding a pgsty/minio URL each fail the gate with the
specific message.

This commit assumes the rename actually happens. Until the GitHub branch and
repository renames are executed, the links it introduces do not resolve.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-06 09:28:06 +08:00

7.9 KiB

Silo Multi-user Quickstart Guide

Silo supports multiple long term users in addition to default user created during server startup. New users can be added after server starts up, and server can be configured to deny or allow access to buckets and resources to each of these users. This document explains how to add/remove users and modify their access rights.

Get started

In this document we will explain in detail on how to configure multiple users.

1. Prerequisites

2. Create a new user with canned policy

Use mc admin policy to create canned policies. Server provides a default set of canned policies namely writeonly, readonly and readwrite (these policies apply to all resources on the server). These can be overridden by custom policies using mc admin policy command.

Create new canned policy file getonly.json. This policy enables users to download all objects under my-bucketname.

cat > getonly.json << EOF
{
  "Version": "2012-10-17",
  "Statement": [
	{
	  "Action": [
		"s3:GetObject"
	  ],
	  "Effect": "Allow",
	  "Resource": [
		"arn:aws:s3:::my-bucketname/*"
	  ],
	  "Sid": ""
	}
  ]
}
EOF

Create new canned policy by name getonly using getonly.json policy file.

mc admin policy create mysilo getonly getonly.json

Create a new user newuser on Silo use mc admin user.

mc admin user add mysilo newuser newuser123

Once the user is successfully created you can now apply the getonly policy for this user.

mc admin policy attach mysilo getonly --user=newuser

3. Create a new group

mc admin group add mysilo newgroup newuser

Once the group is successfully created you can now apply the getonly policy for this group.

mc admin policy attach mysilo getonly --group=newgroup

4. Disable user

Disable user newuser.

mc admin user disable mysilo newuser

Disable group newgroup.

mc admin group disable mysilo newgroup

5. Remove user

Remove the user newuser.

mc admin user remove mysilo newuser

Remove the user newuser from a group.

mc admin group remove mysilo newgroup newuser

Remove the group newgroup.

mc admin group remove mysilo newgroup

6. Change user or group policy

Change the policy for user newuser to putonly canned policy.

mc admin policy attach mysilo putonly --user=newuser

Change the policy for group newgroup to putonly canned policy.

mc admin policy attach mysilo putonly --group=newgroup

7. List all users or groups

List all enabled and disabled users.

mc admin user list mysilo

List all enabled or disabled groups.

mc admin group list mysilo

8. Configure mc

mc alias set mysilo-newuser http://localhost:9000 newuser newuser123 --api s3v4
mc cat mysilo-newuser/my-bucketname/my-objectname

Policy Variables

You can use policy variables in the Resource element and in string comparisons in the Condition element.

You can use a policy variable in the Resource element, but only in the resource portion of the ARN. This portion of the ARN appears after the 5th colon (:). You can't use a variable to replace parts of the ARN before the 5th colon, such as the service or account. The following policy might be attached to a group. It gives each of the users in the group full programmatic access to a user-specific object (their own "home directory") in Silo.

{
  "Version": "2012-10-17",
  "Statement": [
	{
	  "Action": ["s3:ListBucket"],
	  "Effect": "Allow",
	  "Resource": ["arn:aws:s3:::mybucket"],
	  "Condition": {"StringLike": {"s3:prefix": ["${aws:username}/*"]}}
	},
	{
	  "Action": [
		"s3:GetObject",
		"s3:PutObject"
	  ],
	  "Effect": "Allow",
	  "Resource": ["arn:aws:s3:::mybucket/${aws:username}/*"]
	}
  ]
}

If the user is authenticating using an STS credential which was authorized from OpenID connect we allow all jwt:* variables specified in the JWT specification, custom jwt:* or extensions are not supported. List of policy variables for OpenID based STS.

  • jwt:sub
  • jwt:iss
  • jwt:aud
  • jwt:jti
  • jwt:upn
  • jwt:name
  • jwt:groups
  • jwt:given_name
  • jwt:family_name
  • jwt:middle_name
  • jwt:nickname
  • jwt:preferred_username
  • jwt:profile
  • jwt:picture
  • jwt:website
  • jwt:email
  • jwt:gender
  • jwt:birthdate
  • jwt:phone_number
  • jwt:address
  • jwt:scope
  • jwt:client_id

Following example shows OpenID users with full programmatic access to a OpenID user-specific directory (their own "home directory") in Silo.

{
  "Version": "2012-10-17",
  "Statement": [
	{
	  "Action": ["s3:ListBucket"],
	  "Effect": "Allow",
	  "Resource": ["arn:aws:s3:::mybucket"],
	  "Condition": {"StringLike": {"s3:prefix": ["${jwt:preferred_username}/*"]}}
	},
	{
	  "Action": [
		"s3:GetObject",
		"s3:PutObject"
	  ],
	  "Effect": "Allow",
	  "Resource": ["arn:aws:s3:::mybucket/${jwt:preferred_username}/*"]
	}
  ]
}

If the user is authenticating using an STS credential which was authorized from AD/LDAP we allow ldap:* variables.

Currently supports

  • ldap:username
  • ldap:user
  • ldap:groups

Following example shows LDAP users full programmatic access to a LDAP user-specific directory (their own "home directory") in Silo.

{
  "Version": "2012-10-17",
  "Statement": [
	{
	  "Action": ["s3:ListBucket"],
	  "Effect": "Allow",
	  "Resource": ["arn:aws:s3:::mybucket"],
	  "Condition": {"StringLike": {"s3:prefix": ["${ldap:username}/*"]}}
	},
	{
	  "Action": [
		"s3:GetObject",
		"s3:PutObject"
	  ],
	  "Effect": "Allow",
	  "Resource": ["arn:aws:s3:::mybucket/${ldap:username}/*"]
	}
  ]
}

Common information available in all requests

  • aws:CurrentTime - This can be used for conditions that check the date and time.
  • aws:EpochTime - This is the date in epoch or Unix time, for use with date/time conditions.
  • aws:PrincipalType - This value indicates whether the principal is an account (Root credential), user (Silo user), or assumed role (STS)
  • aws:SecureTransport - This is a Boolean value that represents whether the request was sent over TLS.
  • aws:SourceIp - This is the requester's IP address, for use with IP address conditions. If running behind Nginx like proxies, Silo preserve's the source IP.
{
  "Version": "2012-10-17",
  "Statement": {
	"Effect": "Allow",
	"Action": "s3:ListBucket*",
	"Resource": "arn:aws:s3:::mybucket",
	"Condition": {"IpAddress": {"aws:SourceIp": "203.0.113.0/24"}}
  }
}
  • aws:UserAgent - This value is a string that contains information about the requester's client application. This string is generated by the client and can be unreliable. You can only use this context key from mc or other compatible SDKs which standardize the User-Agent string.
  • aws:username - This is a string containing the friendly name of the current user, this value would point to STS temporary credential in AssumeRoleed requests, use jwt:preferred_username in case of OpenID connect and ldap:username in case of AD/LDAP. aws:userid is an alias to aws:username in Silo.
  • aws:groups - This is an array containing the group names, this value would point to group mappings for the user, use jwt:groups in case of OpenID connect and ldap:groups in case of AD/LDAP.

Explore Further