SetApplicationSsoConfig

Updated at:

Configures the single sign-on (SSO) configuration properties for an EIAM application.

Operation description

In EIAM, application management supports adding applications with various single sign-on (SSO) logon protocols (SAML 2.0 and OIDC). However, an application can support only one SSO protocol, which cannot be changed after it is specified during creation. Specify the corresponding SSO configuration property parameters based on the SSO protocol type supported by the current application.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eiam:SetApplicationSsoConfig

create

*Application

acs:eiam:{#regionId}:{#accountId}:instance/{#InstanceId}/application/{#ApplicationId}

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

idaas_ue2jvisn35ea5lmthk267xxxxx

ApplicationId

string

Yes

The application ID.

app_mkv7rgt4d7i4u7zqtzev2mxxxx

SamlSsoConfig

object

No

The SSO attribute configuration parameters for the SAML protocol.

SpSsoAcsUrl

string

No

The SAML assertion consumer URL of the application (SP).

https://signin.aliyun.com/saml-role/sso

SpEntityId

string

No

The SAML entity ID of the application (SP).

urn:alibaba:cloudcomputing

NameIdFormat

string

No

The standard NameID format for the SAML protocol. Valid values:

  • urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified: Unspecified. The application determines how to parse the NameID.

  • urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress: Email address format.

  • urn:oasis:names:tc:SAML:2.0:nameid-format:persistent: Persistent NameID.

  • urn:oasis:names:tc:SAML:2.0:nameid-format:transient: Transient NameID.

Valid values:

  • urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified :

    Unspecified. Default value.

  • urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress :

    Email address format.

  • urn:oasis:names:tc:SAML:2.0:nameid-format:persistent :

    Persistent.

  • urn:oasis:names:tc:SAML:2.0:nameid-format:transient :

    Transient.

urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified

NameIdValueExpression

string

No

The expression used to generate the actual value of the NameID for the SAML protocol.

user.email

DefaultRelayState

string

No

The default RelayState value. When a user's single sign-on (SSO) logon request is initiated by EIAM, the SAML response provided by EIAM specifies the RelayState as this value.

https://home.console.aliyun.com

SignatureAlgorithm

string

No

The signature algorithm for the SAML assertion.

Valid values:

  • RSA-SHA256 :

    RSA-SHA256 algorithm.

RSA-SHA256

ResponseSigned

boolean

No

Specifies whether the response must be signed. ResponseSigned and AssertionSigned cannot both be set to false. Valid values:

  • true: The response must be signed.

  • false: The response does not need to be signed.

true

AssertionSigned

boolean

No

Specifies whether the assertion must be signed. ResponseSigned and AssertionSigned cannot both be set to false. Valid values:

  • true: The assertion must be signed.

  • false: The assertion does not need to be signed.

true

AttributeStatements

array<object>

No

The configuration of additional user attributes included in the SAML assertion.

object

No

AttributeName

string

No

The name of the attribute in the SAML assertion.

https://www.aliyun.com/SAML-Role/Attributes/RoleSessionName

AttributeValueExpression

string

No

The value expression of the attribute in the SAML assertion.

user.username

IdPEntityId

string

No

The entity ID that represents the identity provider (IdP) in the SAML protocol. Both URL and URN formats are supported.

https://example.com/

OptionalRelayStates

array<object>

No

The optional RelayState configurations.

object

No

The optional RelayState configurations.

RelayState

string

No

The RelayState value.

https://ram.console.aliyun.com/

DisplayName

string

No

The display name of the RelayState.

Ram

SpSigningCertificates

array

No

The array of SP signature verification certificates in PEM format. A maximum of two certificates are allowed, and they are shared by SSO and single logout (SLO). The format and validity of each certificate are verified during writing. If more than two certificates are provided, the request is rejected.

["-----BEGIN CERTIFICATE----- MIIC0jCCAbqgAwIBAgIQXXXXX -----END CERTIFICATE-----"]

string

No

The SP signature verification certificate in PEM format.

-----BEGIN CERTIFICATE----- MIIC0jCCAbqgAwIBAgIQXXXXX -----END CERTIFICATE-----

RequireAuthnRequestSigned

boolean

No

Specifies whether to enable signature verification for SSO AuthnRequest. Default value: false. If this parameter is set to true, spSigningCertificates must be configured and the array cannot be empty.

false

SpSloResponseUrl

string

No

The callback URL used by the SP to receive the LogoutResponse. This parameter is optional.

https://example.com/api/slo/response

OidcSsoConfig

object

No

The SSO attribute configuration parameters for the OIDC protocol.

RedirectUris

array

No

The list of redirect URIs supported by the application.

string

No

A redirect URI supported by the application.

https://example.com/oidc/login/callback

PostLogoutRedirectUris

array

No

The list of logout callback URLs supported by the application.

string

No

The whitelisted logout callback URL of the application. When the application initiates a logout request, the post_logout_redirect_uri parameter can be specified.

https://example.com/oidc/logout/callback

GrantTypes

array

No

The list of supported OIDC grant types.

["authorization_code"]

string

No

The supported OIDC grant type. Valid values:

  • authorization_code: Authorization code mode.

  • implicit: Implicit mode.

  • refresh_token: Refresh token mode.

  • urn:ietf:params:oauth:grant-type:device_code: Device code mode.

  • password: Password mode.

authorization_code

ResponseTypes

array

No

The response types supported by the application when OidcSsoConfig.GrantTypes includes the implicit mode.

["token id_token"]

string

No

The standard OIDC ResponseType parameter. This parameter takes effect only when GrantTypes includes the implicit mode. Valid values:

  • token: Returns only the access token.

  • id_token: Returns only the ID token.

  • token id_token: Returns both the access token and the ID token.

token id_token

GrantScopes

array

No

The standard OIDC scope parameter, which specifies the range of user attributes that can be returned by the userinfo endpoint or the ID token.

["profile","email"]

string

No

The standard OIDC scope parameter, which specifies the range of user attributes that can be returned by the userinfo endpoint or the ID token. Valid values:

  • openid: The standard OIDC parameter for the unique user ID.

  • profile: Detailed user information.

  • email: User email information.

  • phone: User phone number information.

openid

PasswordTotpMfaRequired

boolean

No

Specifies whether time-based one-time password (TOTP) multi-factor authentication (MFA) is mandatory for the password mode. This parameter takes effect only when the GrantTypes specified for the OIDC application includes the password mode.

true

PasswordAuthenticationSourceId

string

No

The ID of the authentication source used for the password mode. This parameter takes effect only when the GrantTypes specified for the OIDC application includes the password mode.

ia_password

PkceRequired

boolean

No

Specifies whether Proof Key for Code Exchange (PKCE) (RFC 7636) is mandatory for application SSO.

true

PkceChallengeMethods

array

No

The algorithm used to calculate the code challenge in PKCE.

["S256"]

string

No

The algorithm used to calculate the code challenge in PKCE. Valid values:

  • plain: Plaintext.

  • S256: SHA-256 algorithm.

S256

AccessTokenEffectiveTime

integer

No

The validity period of the issued access token, in seconds. Default value: 1200 (20 minutes).

1200

CodeEffectiveTime

integer

No

The validity period of the issued code, in seconds. Default value: 60 (1 minute).

60

IdTokenEffectiveTime

integer

No

The validity period of the issued ID token, in seconds. Default value: 300 seconds (5 minutes).

300

RefreshTokenEffective

integer

No

The validity period of the issued refresh token, in seconds. Default value: 86400 seconds (1 day).

86400

CustomClaims

array<object>

No

The custom user information included in the returned ID token.

object

No

ClaimName

string

No

The name of the returned claim.

"Role"

ClaimValueExpression

string

No

The value expression of the returned claim.

user.dict.applicationRole

SubjectIdExpression

string

No

The custom value expression for the sub claim returned in the ID token.

user.userid

AllowedPublicClient

boolean

No

Specifies whether the application is allowed to request the IDaaS EIAM authorization server as a public client. This feature can be enabled only for the authorization code mode and device mode. Default value: false.

true

InitLoginType

string

No

The initial single sign-on (SSO) method. Valid values:

  • only_app_init_sso: SSO is initiated only by the application. This is the default value for OIDC applications. If this method is specified for a SAML application, InitLoginUrl must be specified.

  • idaas_or_app_init_sso: SSO can be initiated by the IDaaS portal or the application. This is the default value for SAML applications. If this method is specified for an OIDC application, InitLoginUrl must be specified.

only_app_init_sso

InitLoginUrl

string

No

The trigger URL for the initialization of single sign-on (SSO) logon. This parameter is required when the InitLoginType Settings for an OIDC protocol (Protocol Type) application are set to idaas_or_app_init_sso. This parameter is required when the InitLoginType Settings for a SAML protocol (Protocol Type) application are set to only_app_init_sso.

http://127.0.0.1:8000/start_login?enterprise_code=ABCDEF

ClientToken

string

No

Ensures the idempotence of the request. You can generate a parameter value on your client to ensure that the parameter value is unique across different requests. The value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

client-examplexxx

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

0441BD79-92F3-53AA-8657-F8CE4A2B912A

Examples

Success response

JSON format

{
  "RequestId": "0441BD79-92F3-53AA-8657-F8CE4A2B912A"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.