error 400 Bad Request, Authorization header malformed, unexpected scope #858

Closed
opened 2024-08-20 20:13:56 +00:00 by slaecker · 1 comment

I installed garage 1.0.0 using the amd64 binary from https://garagehq.deuxfleurs.fr/download/.

garage --version
garage v1.0.0 [features: k2v, lmdb, sqlite, consul-discovery, kubernetes-discovery, metrics, telemetry-otlp, bundled-libs]

/etc/garage.toml:

metadata_dir = "/var/lib/garage/metadata"
data_dir = "/var/lib/garage/data"
db_engine = "sqlite"

replication_factor = 1

rpc_bind_addr = "[::]:3901"
rpc_public_addr = "192.168.111.40:3901"
rpc_secret = "xxxxxxxxxxxxxxxxxxxxxxxxx"

[s3_api]
s3_region = "garage"
api_bind_addr = "[::]:3900"
root_domain = ".garage-s3.nas"

[s3_web]
bind_addr = "[::]:3902"
root_domain = ".garage-web.nas"
index = "index.html"

[k2v_api]
api_bind_addr = "[::]:3904"

[admin]
api_bind_addr = "[::]:3903"
admin_token = "xxxxxxxxxxxxxxxxxxxxxxxxx"
metrics_token = "xxxxxxxxxxxxxxxxxxxxxxxxx"

When trying to access it using any client like rclone, s3cmd or minio-client I see the following errors in the log:

s3cmd -c $HOME/.s3cfg ls s3://test-001:

INFO garage_api::generic_server: Response: error 400 Bad Request, Authorization header malformed, unexpected scope: 20240820//s3/aws4_request

mcli ls garage_nas/test-001:

INFO garage_api::generic_server: Response: error 400 Bad Request, Authorization header malformed, unexpected scope: 20240820/us-east-1/s3/aws4_request

rclone lsd garage_nas:/test-001:

INFO garage_api::generic_server: Response: error 400 Bad Request, Authorization header malformed, unexpected scope: 20240820/home/s3/aws4_request

minio-client and s3cmd are able to list buckets and contents and upload files but rclone just returns:

2024/08/20 21:48:28 ERROR : : error listing: AuthorizationHeaderMalformed: Authorization header malformed, unexpected scope: 20240820/home/s3/aws4_request
        status code: 400, request id: , host id: 
2024/08/20 21:48:28 Failed to lsd with 2 errors: last error was: AuthorizationHeaderMalformed: Authorization header malformed, unexpected scope: 20240820/home/s3/aws4_request
        status code: 400, request id: , host id:

rclone config:

[garage_nas]
type = s3
provider = Other
env_auth = false
access_key_id = GK76a006c9e529f967dfa8e3a7
secret_access_key = a38478c55cfc336b029741cca76fcfd94c4bea5ca14684f5706401206eebaa23
region = home
endpoint = http://192.168.111.40:3900
force_path_style = true
acl = private
bucket_acl = private

I'm wondering what I might be missing that causes the Authorization header malformed error on every request.

I installed garage 1.0.0 using the amd64 binary from https://garagehq.deuxfleurs.fr/download/. ``` garage --version garage v1.0.0 [features: k2v, lmdb, sqlite, consul-discovery, kubernetes-discovery, metrics, telemetry-otlp, bundled-libs] ``` `/etc/garage.toml`: ``` metadata_dir = "/var/lib/garage/metadata" data_dir = "/var/lib/garage/data" db_engine = "sqlite" replication_factor = 1 rpc_bind_addr = "[::]:3901" rpc_public_addr = "192.168.111.40:3901" rpc_secret = "xxxxxxxxxxxxxxxxxxxxxxxxx" [s3_api] s3_region = "garage" api_bind_addr = "[::]:3900" root_domain = ".garage-s3.nas" [s3_web] bind_addr = "[::]:3902" root_domain = ".garage-web.nas" index = "index.html" [k2v_api] api_bind_addr = "[::]:3904" [admin] api_bind_addr = "[::]:3903" admin_token = "xxxxxxxxxxxxxxxxxxxxxxxxx" metrics_token = "xxxxxxxxxxxxxxxxxxxxxxxxx" ``` When trying to access it using any client like `rclone`, `s3cmd` or `minio-client` I see the following errors in the log: `s3cmd -c $HOME/.s3cfg ls s3://test-001`: ``` INFO garage_api::generic_server: Response: error 400 Bad Request, Authorization header malformed, unexpected scope: 20240820//s3/aws4_request ``` `mcli ls garage_nas/test-001`: ``` INFO garage_api::generic_server: Response: error 400 Bad Request, Authorization header malformed, unexpected scope: 20240820/us-east-1/s3/aws4_request ``` `rclone lsd garage_nas:/test-001`: ``` INFO garage_api::generic_server: Response: error 400 Bad Request, Authorization header malformed, unexpected scope: 20240820/home/s3/aws4_request ``` `minio-client` and `s3cmd` are able to list buckets and contents and upload files but `rclone` just returns: ``` 2024/08/20 21:48:28 ERROR : : error listing: AuthorizationHeaderMalformed: Authorization header malformed, unexpected scope: 20240820/home/s3/aws4_request status code: 400, request id: , host id: 2024/08/20 21:48:28 Failed to lsd with 2 errors: last error was: AuthorizationHeaderMalformed: Authorization header malformed, unexpected scope: 20240820/home/s3/aws4_request status code: 400, request id: , host id: ``` `rclone` config: ``` [garage_nas] type = s3 provider = Other env_auth = false access_key_id = GK76a006c9e529f967dfa8e3a7 secret_access_key = a38478c55cfc336b029741cca76fcfd94c4bea5ca14684f5706401206eebaa23 region = home endpoint = http://192.168.111.40:3900 force_path_style = true acl = private bucket_acl = private ``` I'm wondering what I might be missing that causes the `Authorization header malformed` error on every request.
Owner

See #308, #700. Your region parameter needs to be set to garage in all you client configs

See #308, #700. Your `region` parameter needs to be set to `garage` in all you client configs
lx closed this issue 2024-08-21 12:34:15 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#858
No description provided.