Commit Graph
746 Commits
Author SHA1 Message Date
Travis Nielsen a96bbe74e0 Merge pull request #18004 from rook/mergify/bp/release-1.20/pr-17962
rgw: rgw account deletion should remove account from ceph (backport #17962)
2026-07-22 09:27:35 -06:00
Michael Adam 2d05950963 rgw: fix a comment typo
This fixes a comment typo caught bt the codespell CI check.

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit c90913051b)
2026-07-21 15:08:20 -06:00
parth-gr 3010491f03 rgw: rgw account deletion should remove account from ceph
currently there was a bug in the code where it didnt removed
the account from the ceph cluster during intial intialize

Signed-off-by: parth-gr <partharora1010@gmail.com>
(cherry picked from commit cca7020f0b)
2026-07-20 20:12:38 +00:00
Joshua Hoblitt ac686a02c8 docs: fix typos and grammar in code comments
Fix duplicate words, incorrect articles (a/an), it's/its, and other small
grammar mistakes in Go comments and user-facing messages across pkg/, cmd/,
and tests/.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit c0eb360041)
2026-07-01 09:23:27 -07:00
Joshua Hoblitt dcd4dfb2bd docs: fix function comments to match their declaration names
Several godoc comments led with a stale or incorrect identifier, left
over from renames, exported/unexported changes, copy-paste between
sibling declarations, or plain typos. As a result the documented name no
longer matched the function, method, type, or var it describes. Correct
each leading word to the name of the declaration it documents.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 49612461a4)
2026-06-29 19:04:45 +00:00
Joshua Hoblitt e64c06f0b4 object: generate URL-safe realm access keys
The realm system user's access and secret keys are generated by
GeneratePassword() and then wrapped in base64. GeneratePassword()
deliberately excludes '/' from the access key character set, but the
base64.StdEncoding wrap reintroduces it: its alphabet contains '/' and
'+', and the 14-character input always produces trailing '='. The
encoded string is the literal key used in S3 requests.

An access key containing '/' breaks AWS SigV4 credential scope parsing
("<access-key>/<date>/<region>/<service>/aws4_request" is split on
'/'), so "radosgw-admin realm pull" against the realm endpoint fails
permanently with "request failed: (22) Invalid argument" (HTTP 400),
and a CephObjectRealm pulling that realm can never reconcile.

This is the dominant cause of the "deploy second cluster rook"
failures in the rgw-multisite-testing canary job: every sampled failure
had a generated access key containing '/' and looped on EINVAL for the
whole 600s wait window, while runs with slash-free keys pulled the
realm successfully.

Encode both keys with base64.RawURLEncoding instead, whose alphabet
(A-Za-z0-9-_, unpadded) is safe in credential scopes, URLs, and shell
arguments. Only newly created realm secrets are affected; existing
secrets are not modified by the reconciler.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 573e2f81e7)
2026-06-16 21:16:39 +00:00
Joshua Hoblitt 1114be7d33 Merge pull request #17693 from rook/mergify/bp/release-1.20/pr-17648
object: remove dead functions and ObjectBuckets sort type (backport #17648)
2026-06-09 09:47:48 -07:00
Joshua Hoblitt ad4d9927e8 object: remove dead functions and ObjectBuckets sort type
Remove the following unreferenced symbols:
- (*S3Agent).CreateBucketNoInfoLogging
- (*S3Agent).DeleteBucket (wrapper; callers use the SDK client directly)
- GetBucketsStats
- ObjectBuckets type and its Len/Less/Swap sort.Interface methods

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit ae481f0f43)
2026-06-09 15:58:16 +00:00
Joshua Hoblitt 70614ae5ff object: remove dead EjectPrincipals methods and duplicate AllowedActions entry
Remove (*BucketPolicy).EjectPrincipals and (*PolicyStatement).EjectPrincipals,
which had no callers outside policy.go. Also drop the duplicate PutBucketVersioning
entry in AllowedActions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit df30bf66e8)
2026-06-09 15:58:03 +00:00
Artem Muterko 3ce302a218 object: clobber bucket policy on modify instead of merging
ModifyBucketPolicy merged the caller's statement into the policy fetched
from the bucket, matching by SID. Besides a missing match flag that
appended a duplicate when a SID matched, this preserved any pre-existing
statements on the bucket and reapplied them on every reconcile.

Overwrite the policy with the provided statements instead, so a managed
bucket always ends up with exactly the intended policy and cannot retain
unexpected statements.

Signed-off-by: Artem Muterko <artem@sopho.tech>
(cherry picked from commit 321911b96c)
2026-06-03 15:47:55 +00:00
Oded Viner 9f6809985d object: add logger for AWS SDK v2 debug signing output
Wire a rookLogger adapter implementing smithy's Logger
interface so that aws.LogSigning output is emitted through
rook's capnslog when debug mode is enabled.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 4b5fc9d16a)
2026-05-28 15:17:50 +00:00
Oded Viner 37e92fd749 object: remove AWS SDK v1 dependency
Remove the AWS SDK v1 (github.com/aws/aws-sdk-go)
dependency entirely. All S3 operations now use AWS SDK v2
exclusively.

- Remove the v1 Client field from S3Agent struct and
  rename ClientV2 to Client
- Remove v1 session/client initialization from NewS3Agent
- Update all call sites referencing ClientV2
- Convert integration tests to use v2 API calling
  conventions (context parameter) and smithy error handling
- Remove aws-sdk-go v1.55.8 from go.mod

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 254965fff1)

# Conflicts:
#	go.mod
#	go.sum
2026-05-27 10:38:23 -06:00
subhamkrai e10393f5a2 object: add TLS 1.3 cipher suite support for RGW beast frontend
adding new tls ssl_ciphersuites supporting tls 1.3 and the existing,
ssl_cipher supports tls 1.2 and below. Adding, the docs and unit-test
changs as well.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit b70a0c9257)
2026-05-27 15:52:52 +00:00
Joshua Hoblitt bba4beeae7 core: reference all containers in a spec by name instead of index
This changeset excludes converting _test.go code as there may be a
legitimate reasons (E.g. convenience) for unit test to be sensitive to
ordering.

Related to:
- https://github.com/rook/rook/issues/15291
- https://github.com/rook/rook/pull/16969

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit d059c351fc)
2026-05-26 19:10:47 +00:00
Travis Nielsen 8abf77d763 Merge pull request #17566 from rook/mergify/bp/release-1.20/pr-17527
object: migrate sns topic provisioner to aws sdk v2 (backport #17527)
2026-05-20 10:36:35 -06:00
Joshua Hoblitt 1efea0123c core: rm unused consts
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 9eec9c730e)
2026-05-20 15:03:03 +00:00
Oded Viner 9d91a725a0 object: migrate sns topic provisioner to aws sdk v2
migrate the sns-based topic provisioner from aws-sdk-go (v1)
to aws-sdk-go-v2. replace v1 session, credentials, and
request handlers with v2 aws.Config, static credentials
provider, and endpoint resolver. convert the custom ceph rgw
v2 signer hack from a v1 handler swap to a smithy finalize
middleware. update sns api calls to use context-first
signatures, map[string]string attributes, and typed
snstypes.NotFoundException error handling via errors.As.
update unit tests accordingly.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 81a2cd8833)
2026-05-20 13:55:22 +00:00
Sunnatillo a9c1805ae3 build: fix gosec and go vet lint errors for Go 1.26
Signed-off-by: Sunnatillo <sunnat.samadov@est.tech>
(cherry picked from commit 0bd299aa60)
2026-05-15 19:26:04 +00:00
Oded Viner 09812ac966 object: migrate notification package to aws sdk v2
migrate the notification provisioner and s3ext packages from
aws sdk v1 to v2. the custom DeleteBucketNotification call is
rewritten to manually build and sign the HTTP request using the
v2 v4 signer, since this ceph-specific API has no sdk equivalent.

also fix t.Skipped() -> t.Skip() in notification integration test.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit f5df592106)
2026-05-13 17:37:22 +00:00
subhamkrai 3445e2be3a rgw: add option for tls and cipher in objectstore
this commit add option in the ceph objecstore CR
to configure TLS profile and TLS ciphersuite for
rgw beast.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 01ef98c1e3)
2026-05-06 17:13:59 +00:00
Oded Viner d11ef74a9b object: migrate bucket provisioner to aws sdk v2
migrate bucket provisioner from aws sdk v1 to v2.

replace awserr.Error type assertions with smithy.APIError
using errors.As for v2-style error handling.

switch setBucketPolicy and setBucketLifecycle to use
the v2 s3 client (ClientV2) directly with context.

replace v1 s3 types (BucketLifecycleConfiguration,
GetBucketLifecycleConfigurationOutput) with v2 equivalents
from s3types and s3v2 packages.

add cmpopts.IgnoreUnexported to cmp.Diff calls to handle
unexported noSmithyDocumentSerde fields in v2 sdk types.

add nil guard on lifecycle output before accessing rules
to prevent nil dereference when get returns an error.

depends on #17414

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 5ba3e1a2c0)
2026-04-29 16:24:17 +00:00
Oded Viner fe9d515ced object: migrate bucket policy methods to aws sdk v2
migrate PutBucketPolicy and GetBucketPolicy to use aws sdk v2
client.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 88e0047d9b)
2026-04-28 11:45:57 +00:00
Oded Viner 9341b3dcfa object: migrate s3agent object methods to aws sdk v2
migrate PutObjectInBucket, GetObjectInBucket, and
DeleteObjectInBucket to use aws sdk v2 client.
replace v1 awserr error handling in DeleteObjectInBucket
with v2 typed errors (errors.As).
remove unused v1 awserr import.

Signed-off-by: Oded Viner <oviner@redhat.com>
(cherry picked from commit 2cb714dabd)
2026-04-27 15:48:57 +00:00
Blaine Gardner bf3adcb464 Merge pull request #17319 from OdedViner/aws_v2_upgrade_delete_bucket
object: add support for aws sdk v2 in s3agent DeleteBucket
2026-04-07 11:52:32 -06:00
Oded Viner f5b73f12c6 object: add support for aws sdk v2 in s3agent DeleteBucket
update createbucket to use sdk v2 while keeping
all other methods on sdk v1.

Signed-off-by: Oded Viner <oviner@redhat.com>
2026-04-07 18:35:41 +03:00
Santosh c6836c474a rgw: support SSE-S3 with vault agent
Support using SSE-S3 encryption with RGW using vault Agent auth.
RGW sends requests to the agent instead of directly to Vault, and the agent transparently injects the authentication token. This eliminates using and managing a static token

Signed-off-by: Santosh <sapillai@redhat.com>
2026-04-07 12:18:29 +05:30
Travis Nielsen cc626020ba Merge pull request #17250 from sp98/implement-cosuser-accounts
rgw: add accountRef to CephObjectStoreUser CR
2026-04-02 15:56:30 -06:00
Joshua Hoblitt 0139637e34 test: add integration tests for CephObjectStoreUser capabilities
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-04-02 09:44:28 -07:00
Travis Nielsen e4b68e0a19 Merge pull request #17149 from hjk068/user-caps
object: call generateUserCaps after AdminOpsClient calls
2026-04-02 09:14:34 -06:00
hjk068 b113e37dae object: call generateUserCaps after AdminOpsClient calls
This prevents overwriting the user-specified capabilities
and correctly copies the Capabilities into UserCapabilities
after the AdminOpsClient calls.

Signed-off-by: hjk068 <hello.hyunjin@gmail.com>
2026-04-01 19:54:39 -04:00
Blaine Gardner 9a89a96cea Merge pull request #16875 from OdedViner/aws_v2_upgrade
object: add support for aws sdk v2 in s3agent createbucket
2026-04-01 11:42:50 -06:00
Tarun Gupta Akirala 9803964d03 cosi: update default sidecar image version
Encountered this bug in current image kubernetes-sigs/container-object-storage-interface#173
which is fixed in recent release via kubernetes-sigs/container-object-storage-interface#197

Signed-off-by: Tarun Gupta Akirala <tarun.akirala@nutanix.com>
2026-03-31 14:23:20 -07:00
Oded Viner 86c920fa79 object: add support for aws sdk v2 in s3agent createbucket
initialize both aws sdk v1 and v2 clients in s3agent.
update createbucket to use sdk v2 while keeping all
other methods on sdk v1.

Signed-off-by: Oded Viner <oviner@redhat.com>
2026-03-31 17:41:51 +03:00
Santosh 3798b00b39 rgw: add accountRef to CephObjectStoreUser CR
Adds AccountRef to the CephObjectStoreUser CR. This helps associate the
user with a RGW account

Signed-off-by: Santosh <sapillai@redhat.com>
2026-03-31 12:47:51 +05:30
majiayu000 ac6ec79865 object: add labels field to CephObjectStore RGW service spec
Allow users to configure custom labels on CephObjectStore RGW services
by adding a Labels field to the RGWServiceSpec, following the existing
pattern used for Annotations. This enables use cases such as service
mesh integration and monitoring discovery that require specific labels
on Kubernetes services.

Fixes: #17235
Signed-off-by: majiayu000 <1835304752@qq.com>
2026-03-28 17:46:28 +08:00
Santosh Pillai 8e1e6e5510 Merge pull request #17188 from sp98/rgw-account-root-user
rgw: create account root user
2026-03-20 21:04:53 +05:30
Santosh fad2f6d793 rgw: create account root user
This PR creates the account root user by default when
CephObjectStoreAccount CR is created  and skips it if
`spec.rootuser.skipCreate` is true.

Signed-off-by: Santosh <sapillai@redhat.com>
2026-03-20 10:45:28 +05:30
Oded Viner b88648d10f pool: clean up erasure code profile on pool deletion
deleting an erasure coded CephBlockPool left the ec profile
orphaned. recreating with different settings failed because
the old profile could not be overridden.
- delete ec profile during CephBlockPool deletion
- disable --format json on ec profile set command
- fix ec profile name mismatch in CephObjectStore deletion

Signed-off-by: Oded Viner <oviner@redhat.com>
2026-03-18 23:53:57 +02:00
Santosh Pillai 7a0afce65f Merge pull request #17041 from sp98/rgw-account-controller
rgw: controller for account management
2026-03-13 21:37:02 +05:30
Santosh c4ec7faee5 rgw: controller for account management
PR only focuses on account creation, deletion and update.

Signed-off-by: Santosh <sapillai@redhat.com>
2026-03-13 11:21:46 +05:30
Artem Torubarov 845293c3cd rgw: not update shared pools if prev pool is not empty
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2026-03-04 14:36:38 +01:00
Artem Torubarov a134643352 rgw: support new RGW pools in shared pools zone json config
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2026-03-04 14:36:38 +01:00
Artem Torubarov a7f176b366 rgw: skip non-raw commands on object deletion path when pools not exists
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2026-02-26 09:48:15 +01:00
Artem Torubarov b47d2c2f79 rgw: force objectStore controller to wait until zone and sharedPools are ready
Fixes race condition for rgw multisite deployments caused by ObjectStore
and Zone controllers calling period commit concurrently. See: https://github.com/rook/rook/issues/17013

Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2026-02-24 11:43:57 +01:00
Blaine Gardner da1e109f63 Merge pull request #17050 from sp98/disable-rgw-http
rgw: fix status info when http is disabled
2026-02-12 08:47:53 -07:00
Santosh 6b9b0231b7 rgw: fix status info when http is disabled
When http is disabled, the spec.status.info.insecure will keep on
showing the insecure endpoint. This PR makes sure that the
spec.status.info.insecure is empty when http is disabled

Signed-off-by: Santosh <sapillai@redhat.com>
2026-02-12 09:41:22 +05:30
Joshua Hoblitt 3ef0c90ef8 object: add ObjectStoreUserSpec.OpMask field
Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2026-02-10 15:10:28 -07:00
subhamkrai 08344f39f6 build: update deprecated api GetEventRecorderFor
with controller runtime latest version vO.23.0, golangci lint
is complaining about deprecated api deprecated.
This commit updates the api and adds the requried rbacs

Signed-off-by: subhamkrai <srai@redhat.com>
2026-02-09 21:48:02 +05:30
Blaine Gardner 5e3f7f8bc0 rgw: update ca bundle mount perms to read-all
Update the CA bundle volume mount permissions to read-all (o444). RGW
runs as 'ceph', but the volume mount defaults to 'root'. o444 ensures
the RGW can read the bundle.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2026-01-26 09:23:15 -07:00
Sunnatillo a97233102d object: use ceph version aware CA bundle handling for RGW
Add ceph version check to determine CA bundle configuration method.
Ceph Tentacle+ supports CURL_CA_BUNDLE environment variable, while older
versions require system CA trust update via init container.

Signed-off-by: Sunnatillo <sunnat.samadov@est.tech>
2026-01-15 22:20:05 +02:00