# RustFS s3-tests configuration
# Based on: https://github.com/ceph/s3-tests/blob/master/s3tests.conf.SAMPLE
#
# Usage:
#   Single-node: S3_HOST=rustfs-single envsubst < s3tests.conf > /tmp/s3tests.conf
#   Multi-node:  S3_HOST=lb envsubst < s3tests.conf > /tmp/s3tests.conf

[DEFAULT]
## this section is just used for host, port and bucket_prefix

# host set for RustFS - will be substituted via envsubst
host = ${S3_HOST}

# port for RustFS
port = 9000

## say "False" to disable TLS
is_secure = False

## say "False" to disable SSL Verify
ssl_verify = False

[fixtures]
## all the buckets created will start with this prefix;
## {random} will be filled with random characters to pad
## the prefix to 30 characters long, and avoid collisions
bucket prefix = rustfs-{random}-

# all the iam account resources (users, roles, etc) created
# will start with this name prefix
iam name prefix = s3-tests-

# all the iam account resources (users, roles, etc) created
# will start with this path prefix
iam path prefix = /s3-tests/

[s3 main]
# main display_name
display_name = RustFS Tester

# main user_id
user_id = rustfsadmin

# main email
email = tester@rustfs.local

# zonegroup api_name for bucket location
api_name = default

## main AWS access key
access_key = ${S3_ACCESS_KEY}

## main AWS secret key
secret_key = ${S3_SECRET_KEY}

## replace with key id obtained when secret is created, or delete if KMS not tested
#kms_keyid = 01234567-89ab-cdef-0123-456789abcdef

## Storage classes
#storage_classes = "LUKEWARM, FROZEN"

## Lifecycle debug interval (default: 10)
#lc_debug_interval = 20
## Restore debug interval (default: 100)
#rgw_restore_debug_interval = 60
#rgw_restore_processor_period = 60

[s3 alt]
# alt display_name
display_name = RustFS Alt Tester

## alt email
email = alt@rustfs.local

# alt user_id
user_id = rustfsalt

# alt AWS access key (must be different from s3 main for many tests)
access_key = ${S3_ALT_ACCESS_KEY}

# alt AWS secret key
secret_key = ${S3_ALT_SECRET_KEY}

#[s3 cloud]
## to run the testcases with "cloud_transition" for transition
## and "cloud_restore" for restore attribute.
## Note: the waiting time may have to tweaked depending on
## the I/O latency to the cloud endpoint.

## host set for cloud endpoint
# host = localhost

## port set for cloud endpoint
# port = 8001

## say "False" to disable TLS
# is_secure = False

## cloud endpoint credentials
# access_key = 0555b35654ad1656d804
# secret_key = h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q==

## storage class configured as cloud tier on local rgw server
# cloud_storage_class = CLOUDTIER

## Below are optional -

## Above configured cloud storage class config options
# retain_head_object = false
# allow_read_through = false    # change it to enable read_through
# read_through_restore_days = 2
# target_storage_class = Target_SC
# target_path = cloud-bucket

## another regular storage class to test multiple transition rules,
# storage_class = S1

[s3 tenant]
# tenant display_name
display_name = RustFS Tenant Tester

# tenant user_id
# Note: Using same user_id as main to avoid teardown failures.
# RustFS does not currently support multi-tenancy, so the tenant client
# effectively operates as the main user. This ensures nuke_prefixed_buckets()
# in s3-tests teardown can successfully clean up resources.
user_id = rustfsadmin

# tenant AWS access key
access_key = ${S3_ACCESS_KEY}

# tenant AWS secret key
secret_key = ${S3_SECRET_KEY}

# tenant email
email = tenant@rustfs.local

# tenant name
# Note: Empty tenant name to avoid multi-tenant path issues during teardown.
# When s3-tests calls get_tenant_client(), it uses this tenant value in requests.
# An empty value makes the tenant client behave like the main client, preventing
# "bucket not found" errors when teardown tries to clean up test buckets.
tenant =

#following section needs to be added for all sts-tests
[iam]
#used for iam operations in sts-tests
#email
email = s3@rustfs.local

#user_id
user_id = rustfsiam

#access_key
access_key = ${S3_ACCESS_KEY}

#secret_key
secret_key = ${S3_SECRET_KEY}

#display_name
display_name = RustFS IAM User

# iam account root user for iam_account tests
[iam root]
access_key = ${S3_ACCESS_KEY}
secret_key = ${S3_SECRET_KEY}
user_id = RGW11111111111111111
email = account1@rustfs.local

# iam account root user in a different account than [iam root]
[iam alt root]
access_key = ${S3_ACCESS_KEY}
secret_key = ${S3_SECRET_KEY}
user_id = RGW22222222222222222
email = account2@rustfs.local

#following section needs to be added when you want to run Assume Role With Webidentity test
[webidentity]
#used for assume role with web identity test in sts-tests
#all parameters will be obtained from ceph/qa/tasks/keycloak.py
#token=<access_token>

#aud=<obtained after introspecting token>

#sub=<obtained after introspecting token>

#azp=<obtained after introspecting token>

#user_token=<access token for a user, with attribute Department=[Engineering, Marketing>]

#thumbprint=<obtained from x509 certificate>

#KC_REALM=<name of the realm>
