volcengine-rust-sdk-auth 0.1.1

Authentication and credential providers for the Volcengine Rust SDK
Documentation

Volcengine Rust SDK Auth

Official authentication and credential provider crate for the Volcengine Rust SDK.

The crate reads profiles created by ve configure, ve sso login, and ve login. The CLI cache is treated as read-only; refreshed credentials are kept only in memory.

Installation

[dependencies]
volcengine-rust-sdk-auth = "0.1"

Usage

use volcengine_rust_sdk_auth::CliCredentials;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credentials = CliCredentials::from_cli().get()?;
    println!("Credentials: {credentials:?}");
    Ok(())
}

CredentialValue redacts the access key, secret key, and session token from its Debug output. Do not log the individual credential fields.

Credential Modes

The provider supports the following Volcengine CLI profile modes:

Mode Source
ak Static access key credentials
sso Volcengine SSO credentials
console-login Volcengine console login credentials
iamrole STS AssumeRole credentials
oidc OIDC workload identity credentials
ecsrole ECS instance IAM role credentials

The legacy mode name ramrolearn is accepted as an alias for iamrole. Mode names are case-insensitive.

License

Licensed under the Apache License, Version 2.0. See LICENSE.