OpenID Connect (OIDC) is a protocol for identity authentication and authorization. It is commonly used to implement single sign-on (SSO). This topic describes how to configure OIDC-based SSO by using an ingress gateway.

Prerequisites

Procedure

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.
  2. On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose ASM Gateways > Ingress Gateway.
  3. On the Ingress Gateway page, click the ingress gateway that you want to use.
  4. In the left-side navigation pane, choose Gateway Security > OIDC Single Sign-On.
  5. In the OIDC Config step of the configuration wizard, turn on Enable gateway OIDC Single Sign-On, configure the parameters, and then click Next.
    ParameterDescription
    Redirect addressIn this example, this parameter is set to Use ingressgateway IP address.
    Callback AddressThe URL to which users are redirected after they pass authentication.
    IssuerThe URL of the issuer.
    ClientIDThe client ID provided by the issuer.
    Client SecretThe client key provided by the issuer.
    Cookie SecretThe seed string for the security cookies, which can be encoded in Base64.
    Cookie ExpireThe expiration time of the cookie. The cookie is refreshed after the specified time. If you set this parameter to 0, the cookie is not refreshed.
    Cookie refresh intervalThe interval at which the cookie is refreshed. If you set this parameter to 0, the cookie is not refreshed.
    ScopesThe types of user information that can be obtained. The specified scopes must be supported by the issuer.
  6. In the Matching Rule step of the configuration wizard, configure the parameters and click Submit.
    ParameterDescription
    Match ModeIn this example, Auth If Matched is selected. Valid values:
    • Auth If Matched: Users must log on to access resources in the specified path.
    • Bypass Auth If Matched: Users do not need to log on to access resources in the specified path.
    Add Match RuleTurn on the Path switch and set this parameter to /productpage. This configuration indicates that requests to access resources in the /productpage path require OIDC authentication.
    Then, a message that indicates OIDC-based SSO is successfully configured appears, and native Istio security resources are displayed. You can click YAML to view the resource configurations.
  7. Use a browser to access http://${IP address of the ingress gateway}/productpage to check whether the OIDC-based SSO configuration takes effect.

    If the following page appears, it indicates that the access is successful and the OIDC-based SSO configuration takes effect.

    Expected result