Help Center> OneAccess> Best Practices> Application Integration> SSO Access to Applications Through SAML

SSO Access to Applications Through SAML

Introduction

Security Assertion Markup Language (SAML), developed by the Security Services Technical Committee of OASIS, is an open-source standard data format based on XML. SAML exchanges authentication and authorization data between different security domains, meeting the SSO requirements of web applications.

Learn about the following terms and authorization process related to SAML.

  • Terms
    Table 1 Terms

    Term

    Description

    IdP

    Identity provider (IdP), which collects and stores user identity information, such as usernames and passwords, and authenticates users during login.

    SP

    Service provider (SP), which establishes a trust relationship with an IdP and uses the user information provided by the IdP to provide services.

    SSO

    Single sign-on, a process in which users can access a trusted service provider (SP) through a specific redirect URL in OneAccess.

  • Authorization process
    1. A user accesses a web application using a browser.
    2. The web application generates a SAML authentication request.
    3. The web application sends the redirect URL to the user's browser. The redirect URL contains the encoded SAML authentication request, which should be submitted to the SSO service.
    4. The IdP decodes the SAML request.
    5. The IdP authenticates the user. If the authentication is successful, the IdP generates a SAML response, encodes it, and then returns it to the user's browser. The response contains the user's username.
    6. The browser forwards the SAML response to the assertion consumer service (ACS) URL of the web application.
    7. The web application uses the public key of the IdP to verify the SAML response. If the verification is successful, ACS redirects the user to the target URL.
    8. The user is redirected to the target URL and logged in to the web application.

This section describes how to integrate an application with OneAccess using the SAML protocol.

Configuration Process

Figure 1 Configuration process

Prerequisites

You have permissions to access the administrator portal.

Adding an Application

Add an application in the administrator portal, and configure the application's metadata file to establish a trust. The application serves as an SP.

  1. Log in to the administrator portal.
  2. In the top navigation pane, choose Resources > Applications.
  3. Click Add Custom Application in the Custom Applications section, set the logo and application name, and click Save.

    Figure 2 Adding a custom application

Configuring a Metadata File

Upload the metadata file of the SP or manually configure the metadata. If the metadata has changed, update it so that users can log in to the application through OneAccess.

  1. Click the application added in Adding an Application and click the application icon on the application information page.
  2. On the application details page, choose General Information > Integration, enable authentication, select SAML, and click Save.

    The protocol cannot be changed once specified.

    Figure 3 Selecting an authentication protocol

  3. Click Authentication Settings in the left pane, and upload a metadata file or manually edit the metadata.

    To avoid information leakage, do not include sensitive information in the configuration parameters.

  • Upload a metadata file
    1. On the Authentication Settings page, click Import SP Metadata.
    2. Click Select File and select the metadata file of the SP.
      Figure 4 Uploading a metadata file
    3. When the Select File button changes to √, the system has extracted the metadata. Click Save.
      • If a message indicating incorrect file type is displayed, upload the correct metadata file or edit the metadata.
      • For details about how to obtain the metadata of the application, see the application's documentation.
  • Edit metadata
    1. Click Configure Metadata.
    2. Set the required parameters according to the metadata file of the application.
      Figure 5 Configuring authentication parameters
      Table 2 Authentication parameters

      Parameter

      Mandatory

      Description

      SP Entity ID

      Yes

      Unique identifier of the SP. Enter the value of Entity ID displayed in the SP metadata file.

      ACS URL

      Yes

      SP callback URL that receives a response when OneAccess authentication is successful. Enter the value of AssertionConsumerService displayed in the SP metadata file.

      Name ID

      Yes

      Select a user attribute or account attribute. The attribute value will be used as the subject of the assertion.

      NameID Format

      Yes

      Username format supported by the SP. Enter the value of NameIDFormat displayed in the SP metadata file.

      Audience URI

      No

      Audience for which the SAML assertion is intended. By default, this field is the same as SP Entity ID.

      Single Logout URL

      No

      URL to which users will be redirected after logging out of their sessions in OneAccess.

      Default Relay State

      No

      URL to which users will be redirected after successful login.

      ForceAuth

      Yes

      Disabled by default. If this option is enabled, users will be authenticated again as required by the SP.

      Response Signature

      Yes

      Disabled by default. This option indicates whether to sign SAML responses using the IdP's certificate.

      Assertion Signature

      Yes

      Disabled by default. This option indicates whether to sign assertions using the IdP's certificate. Enter the value of WantAssertionsSigned displayed in the SP metadata file.

      Digital Signature Algorithm

      Yes

      Algorithm used to sign SAML responses or assertions. By default, RSA_SHA256 is used.

      Digital Digest Algorithm

      Yes

      Algorithm used to create digests for SAML responses or assertions. By default, SHA256 is used.

      Assertion Encryption

      Yes

      Disabled by default. This option indicates whether to encrypt assertions.

      Request Signature Validation

      Yes

      Enabled by default. This option indicates whether to sign SAML requests. Enter the value of AuthnRequestsSigned displayed in the SP metadata file.

      Signature Certificate Validation

      Yes

      SP public key certificate, which is used to verify SAML request signatures. Enter the content of use="signing" displayed in the SP metadata file.

Configuring Mappings and Authorizing Users

Configure attributes that need to be returned to the application after successful authentication.

Then authorize specific users to access the application.

  • Mapping configuration

    If you have configured the required mapping using Name ID in Configuring a Metadata File, skip this step.

    1. On the Authentication Settings page, click the Mappings tab, and click Add Mapping to add an attribute mapping.
      Figure 6 Adding a mapping
      Table 3 Mapping parameters

      Parameter

      Description

      Application Attribute

      (Required) User attribute that OneAccess will return to the application after successful authentication.

      Mapping Type

      (Required) The mapping type determines the returned attribute value.

      User Attribute

      (Required) Attribute mapped from OneAccess to the application.

      Friendly Name

      (Required) Enter the same value as the Application Attribute.

      Attr Name Format

      (Required) Format of data returned in accordance with the SAML protocol.

    2. Click Test. On the Select User page, enter a username to test the mappings.
      Figure 7 Testing mappings
  • User authorization

    In the left pane, choose Authorization > Application Accounts. Then click Add Accounts to authorize specific users to access the application. To authorize access using a policy, see the descriptions about the application account authorization policy in Modifying Application Configurations.

    For details about how to configure login, access control, and object models, see Modifying Application Configurations.

    Figure 8 Adding accounts
    Figure 9 Selecting users

Establishing a Trust Between the SP and OneAccess

Configure the metadata file of OneAccess in the SP server to establish a trust on OneAccess.

  1. Download the metadata file of OneAccess.

    1. Log in to the administrator portal.
    2. In the top navigation pane, choose Settings > Server Settings. Then click IdP.
    3. On the IdP page, click Download IdP Metadata in the upper right. The metadata file is automatically saved.

  2. Upload the metadata file to the SP server. For details, see the SP's documentation.
  3. Obtain the metadata file of the SP. For details, see the SP's documentation.

Logging In as a User

Log in to the user portal as one of the authorized users, and click the target application to check whether you can access it.