Use a WHERE
clause on the Database Filter
window to set up a database search filter in PingFederate.
On the Database Filter window, enter a WHERE
clause for PingFederate to query the database table you selected to
retrieve a record associated with particular values. The clause is in the form:
[WHERE] column1=value1
The left side (column1) is a column from the database table that you selected on the Database Table and Columns window.
To get a list of columns, click the View List of Columns from ... link.
The right side (value1) is the match-against value, generally a variable passed in from either an authentication source for an identity provider (IdP) or an assertion for a service provider (SP). The variables are shown underneath the Where text field. If you are retrieving attributes from multiple data stores using one mapping, attributes available from other sources, if previously configured, are listed near the bottom of the window.
You can also apply additional search criteria by using other columns from the targeted table.
Example
Suppose you have selected a data table named ACCESSTABLE on the
Database Table and Columns window. You, the IdP, want to
locate user records by matching userid column against the username
from an HTML Form Adapter. As a passed-in variable from the HTML Form Adapter,
${username}
is shown underneath the Where
text field.
On the Database Filter window, enter the following filter in the Where text field:
userid='${username}'
-
userid
- The column in the table containing the username information in this example.
-
'${username}'
- The value of the username variable (username) from an HTML Form Adapter
You must use the ${}
syntax to retrieve the value of the enclosed
variable and insert single quotation marks around the ${}
characters.