65 releases (20 stable)

new 1.21.0 Apr 22, 2024
1.18.0 Mar 26, 2024
1.9.0 Dec 21, 2023
1.3.0 Nov 27, 2023
0.0.0 May 7, 2021

#2017 in Network programming

Download history 69614/week @ 2024-01-01 87742/week @ 2024-01-08 90599/week @ 2024-01-15 103756/week @ 2024-01-22 107861/week @ 2024-01-29 91119/week @ 2024-02-05 96252/week @ 2024-02-12 97047/week @ 2024-02-19 106177/week @ 2024-02-26 114856/week @ 2024-03-04 118822/week @ 2024-03-11 117143/week @ 2024-03-18 115359/week @ 2024-03-25 125419/week @ 2024-04-01 132286/week @ 2024-04-08 135408/week @ 2024-04-15

513,470 downloads per month
Used in 5 crates (3 directly)

Apache-2.0

660KB
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.21.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

~7–21MB
~272K SLoC