Sets the single sign-on (SSO) properties for an IDaaS application.
Operation description
In IDaaS, the Application Management feature lets you add applications that use various single sign-on (SSO) protocols, such as SAML 2.0 and OpenID Connect (OIDC). However, each application can support only one SSO protocol. The protocol is specified during application creation and cannot be changed afterward. You must configure the SSO parameters according to the protocol that your application uses.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eiam:SetApplicationSsoConfig |
create |
*Application
|
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 properties for an application that uses the SAML protocol. |
|
| SpSsoAcsUrl |
string |
No |
The SAML assertion consumer service (ACS) URL of the application (service provider). |
https://signin.aliyun.com/saml-role/sso |
| SpEntityId |
string |
No |
The entity ID of the application (service provider) that uses SAML. |
https://ram.aliyun.com/saml/role/sso |
| NameIdFormat |
string |
No |
The format of the NameID in the SAML protocol. Valid values:
|
urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified |
| NameIdValueExpression |
string |
No |
The expression used to generate the value of the NameID in the SAML protocol. |
user.email |
| DefaultRelayState |
string |
No |
The default value of RelayState. When an SSO request is initiated by IDaaS, the SAML response provided by IDaaS contains this value for RelayState. |
https://home.console.aliyun.com |
| SignatureAlgorithm |
string |
No |
The signature algorithm for the SAML assertion. |
RSA-SHA256 |
| ResponseSigned |
boolean |
No |
Specifies whether the response must be signed. ResponseSigned and AssertionSigned cannot both be false.
|
true |
| AssertionSigned |
boolean |
No |
Specifies whether the assertion must be signed. ResponseSigned and AssertionSigned cannot both be false.
|
true |
| AttributeStatements |
array |
No |
The configurations of additional user attributes 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 expression used to generate the value of the attribute in the SAML assertion. |
user.username |
| IdPEntityId |
string |
No |
The entity ID of the identity provider (IdP) in the SAML protocol. The value can be in a URL or URN format. |
https://example.com/ |
| OptionalRelayStates |
array |
No |
The optional RelayState configurations. |
|
|
object |
No |
The optional RelayState configuration. |
||
| RelayState |
string |
No |
The value of RelayState. |
https://ram.console.aliyun.com/ |
| DisplayName |
string |
No |
The display name of the RelayState. |
Ram |
| OidcSsoConfig |
object |
No |
The SSO properties for an application that uses the OIDC protocol. |
|
| RedirectUris |
array |
No |
The list of redirect URIs that the application supports. |
|
|
string |
No |
The redirect URI that the application supports. |
https://example.com/oidc/login/callback |
|
| PostLogoutRedirectUris |
array |
No |
The list of post-logout redirect URIs that the application supports. |
|
|
string |
No |
The whitelisted post-logout redirect URI of the application. When the application initiates a logout request, you can specify the post_logout_redirect_uri parameter. |
https://example.com/oidc/logout/callback |
|
| GrantTypes |
array |
No |
The list of OIDC grant types that are supported. |
authorization_code |
|
string |
No |
The OIDC grant type. Valid values:
|
authorization_code |
|
| ResponseTypes |
array |
No |
The response type supported by the application when OidcSsoConfig.GrantTypes is set to implicit. |
token id_token |
|
string |
No |
The ResponseType parameter in the OIDC protocol. This parameter is valid only when GrantTypes is set to implicit. Valid values:
|
token id_token |
|
| GrantScopes |
array |
No |
The scope parameter in the OIDC protocol. This parameter specifies the scope of user information that can be returned by the userinfo endpoint or included in the ID token. |
profile,email |
|
string |
No |
The scope parameter in the OIDC protocol. This parameter specifies the scope of user information that can be returned by the userinfo endpoint or included in the ID token. Valid values:
|
openid |
|
| PasswordTotpMfaRequired |
boolean |
No |
Specifies whether Time-based One-time Password (TOTP) multi-factor authentication (MFA) is required for the resource owner password credentials grant type. This parameter is valid only when the GrantTypes for the OIDC application is set to password. |
true |
| PasswordAuthenticationSourceId |
string |
No |
The ID of the identity source for the resource owner password credentials grant type. This parameter is valid only when the GrantTypes for the OIDC application is set to password. |
ia_password |
| PkceRequired |
boolean |
No |
Specifies whether Proof Key for Code Exchange (PKCE) (RFC 7636) is required for application SSO. |
true |
| PkceChallengeMethods |
array |
No |
The algorithm used to compute the code challenge in PKCE. |
S256 |
|
string |
No |
The algorithm used to compute the code challenge in PKCE. Valid values:
|
S256 |
|
| AccessTokenEffectiveTime |
integer |
No |
The validity period of the access token. Unit: seconds. Default value: 1200 (20 minutes). |
1200 |
| CodeEffectiveTime |
integer |
No |
The validity period of the authorization code. Unit: seconds. Default value: 60 (1 minute). |
300 |
| IdTokenEffectiveTime |
integer |
No |
The validity period of the ID token. Unit: seconds. Default value: 300 (5 minutes). |
1200 |
| RefreshTokenEffective |
integer |
No |
The validity period of the refresh token. Unit: seconds. Default value: 86400 (1 day). |
1200 |
| CustomClaims |
array |
No |
The custom claims that are returned in the ID token. |
|
|
object |
No |
|||
| ClaimName |
string |
No |
The name of the claim. |
"Role" |
| ClaimValueExpression |
string |
No |
The expression used to generate the value of the claim. |
user.dict.applicationRole |
| SubjectIdExpression |
string |
No |
The expression used to generate the value of the sub claim in the ID token. |
user.userid |
| AllowedPublicClient |
boolean |
No |
Specifies whether the application is allowed to act as a public client to request the IDaaS authorization server. This parameter can be enabled only for the authorization code grant type and the device authorization grant type. Default value: false. |
true |
| InitLoginType |
string |
No |
The SSO initiation method. Valid values:
|
only_app_init_sso |
| InitLoginUrl |
string |
No |
The URL that is used to initiate SSO. You must specify this parameter if you set InitLoginType to idaas_or_app_init_sso for an OIDC application. You must specify this parameter if you set InitLoginType to only_app_init_sso for a SAML application. |
http://127.0.0.1:8000/start_login?enterprise_code=ABCDEF |
| ClientToken |
string |
No |
A client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. |
client-examplexxx |
Response parameters
|
Parameter |
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.