AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Creates an IAM entity to describe an identity provider (IdP) that supports OpenID Connect (OIDC).
The OIDC provider that you create with this operation can be used as a principal in a role's trust policy. Such a policy establishes a trust relationship between Amazon Web Services and the OIDC provider.
If you are using an OIDC identity provider from Google, Facebook, or Amazon Cognito, you don't need to create a separate IAM identity provider. These OIDC identity providers are already built-in to Amazon Web Services and are available for your use. Instead, you can move directly to creating new roles using your identity provider. To learn more, see Creating a role for web identity or OpenID connect federation in the IAM User Guide.
When you create the IAM OIDC provider, you specify the following:
The URL of the OIDC identity provider (IdP) to trust
A list of client IDs (also known as audiences) that identify the application or applications allowed to authenticate using the OIDC provider
A list of tags that are attached to the specified IAM OIDC provider
A list of thumbprints of one or more server certificates that the IdP uses
You get all of this information from the OIDC IdP you want to use to access Amazon Web Services.
Amazon Web Services secures communication with OIDC identity providers (IdPs) using our library of trusted root certificate authorities (CAs) to verify the JSON Web Key Set (JWKS) endpoint's TLS certificate. If your OIDC IdP relies on a certificate that is not signed by one of these trusted CAs, only then we secure communication using the thumbprints set in the IdP's configuration.
The trust for the OIDC provider is derived from the IAM provider that this operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged users.
For .NET Core this operation is only available in asynchronous form. Please refer to CreateOpenIDConnectProviderAsync.
Namespace: Amazon.IdentityManagement
Assembly: AWSSDK.IdentityManagement.dll
Version: 3.x.y.z
public virtual CreateOpenIDConnectProviderResponse CreateOpenIDConnectProvider( CreateOpenIDConnectProviderRequest request )
Container for the necessary parameters to execute the CreateOpenIDConnectProvider service method.
Exception | Condition |
---|---|
ConcurrentModificationException | The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again. |
EntityAlreadyExistsException | The request was rejected because it attempted to create a resource that already exists. |
InvalidInputException | The request was rejected because an invalid or out-of-range value was supplied for an input parameter. |
LimitExceededException | The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded. |
OpenIdIdpCommunicationErrorException | The request failed because IAM cannot connect to the OpenID Connect identity provider URL. |
ServiceFailureException | The request processing has failed because of an unknown error, exception or failure. |
The following example defines a new OIDC provider in IAM with a client ID of my-application-id and pointing at the server with a URL of https://server.example.com.
var client = new AmazonIdentityManagementServiceClient(); var response = client.CreateOpenIDConnectProvider(new CreateOpenIDConnectProviderRequest { ClientIDList = new List<string> { "my-application-id" }, ThumbprintList = new List<string> { "3768084dfb3d2b68b7897bf5f565da8efEXAMPLE" }, Url = "https://server.example.com" }); string openIDConnectProviderArn = response.OpenIDConnectProviderArn;
.NET Framework:
Supported in: 4.5 and newer, 3.5