s3tools / s3cmd

Official s3cmd repo -- Command line tool for managing S3 compatible storage services (including Amazon S3 and CloudFront).
https://s3tools.org/s3cmd
GNU General Public License v2.0
4.56k stars 905 forks source link

Does not work with empty secret_key command line parameter #1385

Open StefanBrand opened 3 months ago

StefanBrand commented 3 months ago

We use radosgw with LDAP: https://docs.ceph.com/en/octopus/radosgw/ldap-auth/

A secret_key is not required and can be left empty. However, s3cmd does not support that. --secret_key must be set to an arbitrary non-empty string.

Note that I don't want to use a config file for easier portability of the command.

Not working

s3cmd ls --access_key=<base64-encoded token> --host=s3.example.com
s3cmd ls --access_key=<base64-encoded token> --secret_key= --host=s3.example.com
s3cmd ls --access_key=<base64-encoded token> --secret_key="" --host=s3.example.com
ERROR: /home/brands/.s3cfg: None
ERROR: Configuration file not available.
ERROR: Consider using --configure parameter to create one.

Working

s3cmd ls --access_key=<base64-encoded token> --secret_key=. --host=s3.example.com
s3cmd ls --access_key=<base64-encoded token> --secret_key=f --host=s3.example.com
s3cmd ls --access_key=<base64-encoded token> --secret_key=foobar --host=s3.example.com
2024-06-17 09:17  s3://stefans-bucket