Add Database data stores

Adding data stores

  1. Navigate to your Access Gateway Instance.
  2. Select the Settings tab.
  3. Select the Data Stores pane.
  4. Select (+)> Sql Database or (+) > LDAP Database.


Configuring an SQL Database data store

After you select SQL Database, the Create New DataStore wizardstarts. It's initialized for SQL database creation.

  1. Enter the following details:
    FieldDescriptionExample
    NameName used to identify the data store.My SQL Datastore
    Driver

    Driver for datastore. Select any one of:

    • MySQL/MariaDB
    • PostgreSQL
    • MSSQL Server
    • OracleDB
    MySQL/MariaDB
    HostName:PortEnter the FQDN and port for the database instance.mysqlserver.example.com:3306
    DatabaseName of the database (schema) within the database.userDatabase

    Username

    Username to access the database.

    dbuser

    Password

    Password associated with Username.

    password*

    Advanced Query Mode

    Disabled: Specify the table name.

    people

  2. Click the Not Validated ()button when complete. Okta Access Gateway validates the connection.
    If the validation is successful, the button changes to Valid ().
  3. In the Clause Conditions section, add a Where clause. The Where clause defines the join between the your Okta tenant and the database.
    1. Click (+) .
    2. In the new clause content dialog box, enter:
      FieldValue

      example

      FieldThe database field to join with

      email

      ValueThe IDP field to join against

      ${email@idp}


      The result should resemble:
      Info

      Note

      The Value field can contain a fixed value or a reference to a field within a data store. Most common use is ${fieldInIdP@idp} where fieldInIdP represents the field used to join against the table and is from the fields available in the idP profile.

    3. Click Save ()when complete.
      Repeat as required.
    4. Click Okay to save the data store definition.
    Caution

    Caution

    Fields used in the Where clause must be defined as attributes for the application. If the field is not listed as an application attribute, it results in an error.

  4. Activate the data store.
    When data stores are created, they are set to inactive by default. Activate the data store by changing the Active toggle from inactive to active.

Test

To test a database data store:

  1. In the row associated with the database data store, click Simulate.
  2. For each where clause field, enter a value that matches the associated entry in the IDP.
  3. Click Test to run the sum the simulation.
    Click Close to end.
  4. Examine the result which should return data from the data store for the provided key.