95 releases (50 stable)

new 1.51.0 Dec 4, 2024
1.50.0 Nov 6, 2024
1.49.0 Oct 31, 2024
1.37.0 Jul 22, 2024
0.0.0 May 7, 2021

#1154 in Network programming

Download history 269663/week @ 2024-08-14 261796/week @ 2024-08-21 248634/week @ 2024-08-28 282859/week @ 2024-09-04 254074/week @ 2024-09-11 254270/week @ 2024-09-18 276518/week @ 2024-09-25 278594/week @ 2024-10-02 270536/week @ 2024-10-09 290049/week @ 2024-10-16 267137/week @ 2024-10-23 260500/week @ 2024-10-30 269536/week @ 2024-11-06 274780/week @ 2024-11-13 275097/week @ 2024-11-20 188583/week @ 2024-11-27

1,061,525 downloads per month
Used in 19 crates (6 directly)

Apache-2.0

700KB
10K SLoC

aws-sdk-ssooidc

IAM Identity Center OpenID Connect (OIDC) is a web service that enables a client (such as CLI or a native application) to register with IAM Identity Center. The service also enables the client to fetch the user’s access token upon successful authentication and authorization with IAM Identity Center.

Considerations for Using This Guide

Before you begin using this guide, we recommend that you first review the following important information about how the IAM Identity Center OIDC service works.

  • The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device Authorization Grant standard (https://tools.ietf.org/html/rfc8628) that are necessary to enable single sign-on authentication with the CLI.
  • With older versions of the CLI, the service only emits OIDC access tokens, so to obtain a new token, users must explicitly re-authenticate. To access the OIDC flow that supports token refresh and doesn’t require re-authentication, update to the latest CLI version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with support for OIDC token refresh and configurable IAM Identity Center session durations. For more information, see Configure Amazon Web Services access portal session duration.
  • The access tokens provided by this service grant access to all Amazon Web Services account entitlements assigned to an IAM Identity Center user, not just a particular application.
  • The documentation in this guide does not describe the mechanism to convert the access token into Amazon Web Services Auth (“sigv4”) credentials for use with IAM-protected Amazon Web Services service endpoints. For more information, see GetRoleCredentials in the IAM Identity Center Portal API Reference Guide.

For general information about IAM Identity Center, see What is IAM Identity Center? in the IAM Identity Center User Guide.

Getting Started

Examples are available for many services and operations, check out the examples folder in GitHub.

The SDK provides one crate per AWS service. You must add Tokio as a dependency within your Rust project to execute asynchronous code. To add aws-sdk-ssooidc to your project, add the following to your Cargo.toml file:

[dependencies]
aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
aws-sdk-ssooidc = "1.51.0"
tokio = { version = "1", features = ["full"] }

Then in code, a client can be created with the following:

use aws_sdk_ssooidc as ssooidc;

#[::tokio::main]
async fn main() -> Result<(), ssooidc::Error> {
    let config = aws_config::load_from_env().await;
    let client = aws_sdk_ssooidc::Client::new(&config);

    // ... make some calls with the client

    Ok(())
}

See the client documentation for information on what calls can be made, and the inputs and outputs for each of those calls.

Using the SDK

Until the SDK is released, we will be adding information about using the SDK to the Developer Guide. Feel free to suggest additional sections for the guide by opening an issue and describing what you are trying to do.

Getting Help

License

This project is licensed under the Apache-2.0 License.

Dependencies

~8–20MB
~286K SLoC