Skip to main content

Huawei Cloud OBS

Huawei Cloud Object Storage Service requests signed with the OBS signature.

OBS signature✓ header signing✓ query / presign— WASMdocs.rs/reqsign-huaweicloud-obs ↗

expires_in selects query authentication with AccessKeyId, Expires, and Signature parameters.

Get started​

cargo add reqsign --features huaweicloud
use reqsign::huaweicloud;

// Environment credentials — resolved by the default chain.
let signer = huaweicloud::default_signer("my-bucket");

let mut req = http::Request::builder()
.method(http::Method::GET)
.uri("https://my-bucket.obs.cn-north-4.myhuaweicloud.com/my-object")
.body(())?
.into_parts()
.0;

// Sign in place, then send with the HTTP client you already use.
signer.sign(&mut req, None).await?;

Credentials

Default credential chain

The default signer tries these sources in order and uses the first one that yields a credential — no configuration needed when any of them is present:

  1. Environment variables

Credential providers

Available ProvideCredential implementations. Construct any of them directly, reorder them, or compose them into your own chain — see Loading credentials: