LAB17: Minio Setup and Access

LAB 400: Minio Setup and Access policy

  1. Create Directory

mkdir minio-docker && cd minio-docker

  1. Create docker-compose.yaml

Create the file:

version: '3.8'

services:
  minio:
    image: quay.io/minio/minio:latest
    container_name: minio
    ports:
      - "9000:9000"     # S3 endpoint
      - "9090:9090"     # MinIO console
    volumes:
      - ./data:/data
    environment:
      MINIO_ROOT_USER: "admin"
      MINIO_ROOT_PASSWORD: "admin12345"
    command: server /data --console-address ":9090"
    restart: always

  1. Start MinIO

Check logs:


  1. Access MinIO

Login with:


Installing client tool and RBAC Example

  1. Install MinIO Client (mc)

Configure connection:


Creating object storage (bucket) for Globomantics-hotel deployment

STEP 1 — Login as Admin (Root User)

set an alias (local):

STEP 2 — Create a New IAM User

Verify:


STEP 3 — Create an S3-Compatible Service Account (Access Key)

Output example:

Save these — they are your S3 keys.


STEP 4 — Create a Bucket


STEP 5 — Create Policy Files

5.1 Full-access policy

Create:

Create policy:

Attach to user:

STEP 7 — Use the Newly Created Access Keys

Set alias using the SERVICE ACCOUNT Keys:

Test:

STEP 8 — Upload & Download Files

Upload:

Download:

List:

:::spoiler Excercise

MINIO IAM & POLICY ADMINISTRATION — FULL LAB GUIDE


SECTION 1 — Create Users + Attach Policies

  1. Create a new user

Verify:


SECTION 2 — Create Bucket & Policies

Create bucket:


2.1 FULL ACCESS POLICY (mybucket-full)

Create file: mybucket-full.json

Create policy:

Attach to user:


2.2 READ-ONLY POLICY (mybucket-readonly)

Create file: mybucket-readonly.json

Create policy:

Attach:


2.3 READ-WRITE POLICY (mybucket-readwrite)

Create file: mybucket-readwrite.json

Create:

Attach:


SECTION 3 — Generate S3-Compatible Access Keys

MinIO does NOT give access keys directly to users → You MUST create service accounts.


3.1 Create Service Account Keys

For devuser:

Example output:

For readonly:

For write user:


3.2 Save alias for each user

Dev user:

Readonly:

Writer:


SECTION 4 — File Upload & Download (MC)

Dev user (full access):

Upload file:

Download:

List:


SECTION 5 — File Operations Using AWS CLI

Configure AWS CLI:

Enter:

  • Access key

  • Secret key

  • Region: us-east-1

  • Output: json

Upload:

Download:

List:


SECTION 6 — RBAC LAB EXAMPLES

Try these real RBAC scenarios in your lab.


6.1 User can access only a folder inside bucket

Create folder-level policy:

Apply:


6.2 Prevent Delete Operations


6.3 Bucket Listing Denied


6.4 Multiple Buckets With Different Access

Dev:

  • Full on devbucket

  • Read on shared

Writer:

  • Write only on uploads

You create 3 policies + attach accordingly. :::

Last updated