Skip to content

SignatureDoesNotMactch error while uploading a file to Ceph storage #1237

@Wasif-Jamal

Description

@Wasif-Jamal

Describe the bug

Ceph storage is compatible with S3. I am able to upload to a S3 bucket but when I try to do any operation (or upload) to Ceph storage it throws a SignatureDoesNotMatch error. I am providing the IP Address in the endpoint_url(). If I provide a domain name then it works.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

File should be uploaded to Ceph storage

Current Behavior

Throws SignatureDoesNotMatch

Reproduction Steps

#[::tokio::main]
async fn main() -> Result<(), aws_sdk_s3::Error> {
    let config = aws_config::defaults(aws_config::BehaviorVersion::latest())
    .region("custom")
    .endpoint_url("Ceph endpoint")
    .load()
    .await;

    let client = aws_sdk_s3::Client::new(&config);

    let body = aws_sdk_s3::primitives::ByteStream::from_path("filepath").await.unwrap();
    let _resp = client
        .put_object()
        .bucket("bucket name")
        .key("key for file identification")
        .body(body)
        .send()
        .await?;

    Ok(())
}

Possible Solution

No response

Additional Information/Context

virtual-hosted style addressing is not working because of the IP Address

https://mybucket.192.168.1.100/

Instead, the SDK falls back to path-style addressing, where the bucket name is part of the URL path:

http://192.168.1.100/mybucket

However, even this is not working.

Version

aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
aws-sdk-s3 = "1.68.0"
tokio = { version = "1", features = ["full"] }

Environment details (OS name and version, etc.)

Ubuntu 22.04

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.p3This is a minor priority issueresponse-requestedWaiting on additional info and feedback. Will move to 'closing-soon' in 7 days.third-partyThis issue is related to third-party libraries or applications.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions