Add Database DataStores

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 selecting SQL Database the Create New DataStore wizard will start, initialized for SQL database creation.

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

    Driver for datastore. Choose one of:

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


    Username to access the database.



    Password associated with Username.


    Advanced Query Mode

    Disabled: Specify the table name.


  2. Click the Not Validated ()button when complete.
    Okta Access Gateway will validate the connection to the database.
    On success the button will turn green () and show that the connection is valid.
  3. Add Where Clause:
    The where clause defines the join between the your Okta tenant and the database.
    1. Click the (+)
    2. In the new clause content dialog enter:


      FieldThe database field to join with


      ValueThe idP field to join against


      The result should resemble:


      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.


    Fields used in where clause MUST be defined as attributes for the application. If the field it not listed as an application attribute an error will result.

  4. Activate the datastore.
    Data stores are created disabled by default. Activate the datastore by changing the Active toggle from inactive to active.


To test a database data store:

  1. In the row associated with database the data store click the simulate button.
  2. For each where clause field enter a value which should match 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.