Identity provider management for federated authentication using SAML 2.0 and OpenID Connect (OIDC) protocols, enabling single sign-on (SSO) integration with external identity systems.
SAML 2.0-based federation allows users to sign in to AWS using their corporate credentials without creating separate IAM users.
Creates a SAML identity provider resource for federated authentication.
/**
* Creates a SAML identity provider resource
* @param Name - The name of the provider to create
* @param SAMLMetadataDocument - XML document generated by the identity provider
* @param Tags - List of tags to attach to the provider
*/
interface CreateSAMLProviderCommandInput {
Name: string;
SAMLMetadataDocument: string;
Tags?: Tag[];
}
interface CreateSAMLProviderCommandOutput {
SAMLProviderArn?: string;
Tags?: Tag[];
}Usage Example:
import { IAMClient, CreateSAMLProviderCommand } from "@aws-sdk/client-iam";
const client = new IAMClient({ region: "us-east-1" });
const metadataXml = `<?xml version="1.0"?>
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
entityID="https://example.com">
<!-- SAML metadata content -->
</md:EntityDescriptor>`;
const command = new CreateSAMLProviderCommand({
Name: "ExampleSAMLProvider",
SAMLMetadataDocument: metadataXml,
Tags: [{ Key: "Environment", Value: "Production" }]
});
const result = await client.send(command);
console.log("SAML Provider ARN:", result.SAMLProviderArn);Updates the metadata document for an existing SAML identity provider resource.
/**
* Updates the metadata document for an existing SAML identity provider
* @param SAMLMetadataDocument - New XML metadata document
* @param SAMLProviderArn - ARN of the SAML provider to update
*/
interface UpdateSAMLProviderCommandInput {
SAMLMetadataDocument: string;
SAMLProviderArn: string;
}
interface UpdateSAMLProviderCommandOutput {
SAMLProviderArn?: string;
}Retrieves information about the specified SAML provider resource.
/**
* Returns information about the specified SAML provider resource
* @param SAMLProviderArn - ARN of the SAML provider resource
*/
interface GetSAMLProviderCommandInput {
SAMLProviderArn: string;
}
interface GetSAMLProviderCommandOutput {
SAMLMetadataDocument?: string;
CreateDate?: Date;
ValidUntil?: Date;
Tags?: Tag[];
}Lists the SAML identity providers defined in the AWS account.
/**
* Lists the SAML identity providers defined in the AWS account
*/
interface ListSAMLProvidersCommandInput {}
interface ListSAMLProvidersCommandOutput {
SAMLProviderList?: SAMLProviderListEntry[];
}Deletes a SAML identity provider resource.
/**
* Deletes a SAML identity provider resource
* @param SAMLProviderArn - ARN of the SAML provider to delete
*/
interface DeleteSAMLProviderCommandInput {
SAMLProviderArn: string;
}/**
* Adds one or more tags to a SAML identity provider
* @param SAMLProviderArn - ARN of the SAML provider
* @param Tags - List of tags to attach
*/
interface TagSAMLProviderCommandInput {
SAMLProviderArn: string;
Tags: Tag[];
}
/**
* Removes the specified tags from the SAML identity provider
* @param SAMLProviderArn - ARN of the SAML provider
* @param TagKeys - List of tag keys to remove
*/
interface UntagSAMLProviderCommandInput {
SAMLProviderArn: string;
TagKeys: string[];
}
/**
* Lists the tags attached to the specified SAML identity provider
* @param SAMLProviderArn - ARN of the SAML provider
* @param Marker - Use this parameter only when paginating results
* @param MaxItems - Maximum number of items to return
*/
interface ListSAMLProviderTagsCommandInput {
SAMLProviderArn: string;
Marker?: string;
MaxItems?: number;
}OpenID Connect (OIDC) providers enable federated authentication using web identity federation for applications running outside of AWS.
Creates an OpenID Connect identity provider resource.
/**
* Creates an OpenID Connect identity provider resource
* @param Url - URL of the identity provider (must begin with https://)
* @param ClientIDList - List of client IDs (audiences) for which the provider is valid
* @param ThumbprintList - List of server certificate thumbprints
* @param Tags - List of tags to attach to the provider
*/
interface CreateOpenIDConnectProviderCommandInput {
Url: string;
ClientIDList?: string[];
ThumbprintList?: string[];
Tags?: Tag[];
}
interface CreateOpenIDConnectProviderCommandOutput {
OpenIDConnectProviderArn?: string;
Tags?: Tag[];
}Usage Example:
import { IAMClient, CreateOpenIDConnectProviderCommand } from "@aws-sdk/client-iam";
const command = new CreateOpenIDConnectProviderCommand({
Url: "https://oidc.example.com",
ClientIDList: ["my-app-client-id", "another-client-id"],
ThumbprintList: ["1234567890abcdef1234567890abcdef12345678"],
Tags: [{ Key: "Application", Value: "WebApp" }]
});
const result = await client.send(command);
console.log("OIDC Provider ARN:", result.OpenIDConnectProviderArn);Retrieves information about the specified OpenID Connect provider.
/**
* Returns information about the specified OpenID Connect provider
* @param OpenIDConnectProviderArn - ARN of the OpenID Connect provider
*/
interface GetOpenIDConnectProviderCommandInput {
OpenIDConnectProviderArn: string;
}
interface GetOpenIDConnectProviderCommandOutput {
Url?: string;
ClientIDList?: string[];
ThumbprintList?: string[];
CreateDate?: Date;
Tags?: Tag[];
}Lists information about the OpenID Connect providers defined in the AWS account.
/**
* Lists information about the OpenID Connect providers defined in the AWS account
*/
interface ListOpenIDConnectProvidersCommandInput {}
interface ListOpenIDConnectProvidersCommandOutput {
OpenIDConnectProviderList?: OpenIDConnectProviderListEntry[];
}Replaces the existing list of server certificate thumbprints for an OpenID Connect provider.
/**
* Replaces the existing list of server certificate thumbprints for an OpenID Connect provider
* @param OpenIDConnectProviderArn - ARN of the OpenID Connect provider
* @param ThumbprintList - List of certificate thumbprints for the provider's server certificates
*/
interface UpdateOpenIDConnectProviderThumbprintCommandInput {
OpenIDConnectProviderArn: string;
ThumbprintList: string[];
}Manage client IDs (audiences) for OpenID Connect providers.
/**
* Adds a new client ID to the list of client IDs associated with the OpenID Connect provider
* @param OpenIDConnectProviderArn - ARN of the OpenID Connect provider
* @param ClientID - The client ID (audience) to add
*/
interface AddClientIDToOpenIDConnectProviderCommandInput {
OpenIDConnectProviderArn: string;
ClientID: string;
}
/**
* Removes the specified client ID from the list of client IDs associated with the OpenID Connect provider
* @param OpenIDConnectProviderArn - ARN of the OpenID Connect provider
* @param ClientID - The client ID (audience) to remove
*/
interface RemoveClientIDFromOpenIDConnectProviderCommandInput {
OpenIDConnectProviderArn: string;
ClientID: string;
}Deletes an OpenID Connect identity provider resource.
/**
* Deletes an OpenID Connect identity provider resource
* @param OpenIDConnectProviderArn - ARN of the OpenID Connect provider to delete
*/
interface DeleteOpenIDConnectProviderCommandInput {
OpenIDConnectProviderArn: string;
}/**
* Adds one or more tags to an OpenID Connect identity provider
* @param OpenIDConnectProviderArn - ARN of the OpenID Connect provider
* @param Tags - List of tags to attach
*/
interface TagOpenIDConnectProviderCommandInput {
OpenIDConnectProviderArn: string;
Tags: Tag[];
}
/**
* Removes the specified tags from the OpenID Connect identity provider
* @param OpenIDConnectProviderArn - ARN of the OpenID Connect provider
* @param TagKeys - List of tag keys to remove
*/
interface UntagOpenIDConnectProviderCommandInput {
OpenIDConnectProviderArn: string;
TagKeys: string[];
}
/**
* Lists the tags attached to the specified OpenID Connect identity provider
* @param OpenIDConnectProviderArn - ARN of the OpenID Connect provider
* @param Marker - Use this parameter only when paginating results
* @param MaxItems - Maximum number of items to return
*/
interface ListOpenIDConnectProviderTagsCommandInput {
OpenIDConnectProviderArn: string;
Marker?: string;
MaxItems?: number;
}interface SAMLProviderListEntry {
Arn?: string;
ValidUntil?: Date;
CreateDate?: Date;
}
interface OpenIDConnectProviderListEntry {
Arn?: string;
}Corporate SSO Integration:
Identity Provider Setup:
Web Identity Federation:
Application Integration: