Skip to main content

Volcengine TOS

Volcengine Torch Object Storage requests signed with the TOS signature.

TOS signature✓ header signing✓ query / presign— WASMdocs.rs/reqsign-volcengine-tos ↗

expires_in selects query-string authentication for presigned TOS URLs.

Get started​

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

// Environment variables — resolved by the default chain.
let signer = volcengine::default_signer("cn-beijing");

let mut req = http::Request::builder()
.method(http::Method::GET)
.uri("https://my-bucket.tos-cn-beijing.volces.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: