Expand description
Unified cloud credential abstraction and HTTP client for AWS, Azure, GCP, and Databricks.
This crate provides a single authenticated HTTP client, CloudClient, that
signs outgoing requests for any supported cloud provider. Rather than pulling
in a separate vendor SDK for each cloud, a service constructs one
CloudClient per provider and issues requests through a familiar,
reqwest-style builder (CloudRequestBuilder). Every provider is reached
through the same RequestSigner trait, so credential resolution, token
refresh, and request signing are uniform across clouds. The credential
machinery is extracted from the
object_store crate’s internal client.
§Providers
Each provider has a builder under its own module and a matching
CloudClient constructor:
- AWS (
aws) — SigV4 signing with static keys, IMDS, ECS/EKS task roles, web identity, and STSAssumeRole. SeeCloudClient::new_aws. - Azure (
azure) — Azure AD bearer tokens via client secret, managed identity, workload identity, or the Azure CLI. SeeCloudClient::new_azure. - Google Cloud (
gcp) — OAuth 2.0 bearer tokens via service-account JWTs, the GCE metadata server, or workload identity federation. SeeCloudClient::new_google. - Databricks (
databricks) — OAuth M2M and OIDC token exchange. SeeCloudClient::new_databricks.
For a static token or no authentication at all, use
CloudClient::new_with_token or CloudClient::new_unauthenticated.
§Examples
use olai_http::CloudClient;
let client = CloudClient::new_with_token("my-token");
let resp = client
.get("https://api.example.com/data")
.send()
.await?;
println!("status: {}", resp.status());Enable the recording feature to capture HTTP interactions to JSON (with
sensitive headers redacted) for test replay.
Re-exports§
pub use service::ReqwestService;pub use service::SpawnService;
Modules§
- aws
- azure
- databricks
- Databricks Unified Auth implementation.
- gcp
- service
Structs§
- Certificate
- Represents a CA certificate provided by the user.
- Client
Options - HTTP client configuration for remote object stores
- Cloud
Client - An authenticated HTTP client for cloud provider APIs.
- Cloud
Request Builder - A builder for a single request issued through a
CloudClient. - Retry
Config - The configuration for how to respond to request errors.
- Signer
Chain - Tries signers in order; uses the first that succeeds without error.
- Static
Credential Provider - A static set of credentials
- Temporary
Token - A temporary authentication token with an associated expiry
- Token
Cache - Thread-safe cache for a
TemporaryTokenthat proactively refreshes before the token expires.
Enums§
- Client
Config Key - Configuration keys for
ClientOptions - Error
Traits§
- Credential
Provider - Provides credentials for use when signing requests.
- Request
Signer - Applies authentication to a built reqwest request.