Configuring external databases for scope storage
Specific tables are required in order for PingFederate to store scopes, the associated attributes, and their values (if any), on your database server. Table-setup scripts are provided for supported database servers.
Configuring an AWS DynamoDB for OAuth scope storage
You can configure PingFederate to manage OAuth scopes externally using an Amazon Web Services (AWS) DynamoDB. You can learn more about setting up your AWS DynamoDB in Configuring an AWS DynamoDB datastore.
Steps
-
To create a table in DynamoDB to contain scopes, run the commands in the
<pf_install>/pingfederate/server/default/conf/oauth-scope-management/nosql-scripts/oauth-scope-management-dynamodb.txtfile.This file contains basic commands to create the table, with sample values for read and write throughout, as well as the command to add the default scope to the table.
You must add the default scope. If you don’t add a default scope, PingFederate will stop working. -
(Optional) To rename the table and index names, edit the
table-nameand\"IndexName\"values in the table script in theoauth-scope-management-dynamodb.txtfile before running the script.
-
-
Edit the
<pf_install>/pingfederate/server/default/conf/service-points.conffile.-
In the
ScopeManagerservice point, set thescope.managervalue toorg.sourceid.oauth20.domain.ScopeManagerDynamoDBImpl. -
Save and close the file.
-
In a clustered PingFederate environment, repeat these steps for each node in the cluster.
-
-
(Optional) If you modified the default table and index names in the
oauth-scope-management-dynamodb.txtfile in the first step, edit the<pf_install>/pingfederate/server/default/data/config-store/org.sourceid.oauth20.domain.ScopeManagerDynamoDBImpl.xmlfile to match your customized configuration.If you ran the script commands from the oauth-scope-management-dynamodb.txtand didn’t change the default names in the commands, you don’t need to edit theorg.sourceid.oauth20.domain.ScopeManagerDynamoDBImpl.xmlfile.-
Replace the
<c:item name="ScopesTableName">PingFederateOAuthScopes</c:item>and<c:item name="TypeIndex">PingFederateOAuthScopesType-index</c:item>element values with the customized names created during your initial DynamoDB setup. -
Save and close the file.
The following table describes the default PingFederate variables in the
<pf_install>/pingfederate/server/default/data/config-store/org.sourceid.oauth20.domain.ScopeManagerDynamoDBImpl.xmlfile.
DynamoDB Scope Manager Variables Variable Description PingFederateOAuthScopesThe name of the scope table.
This is the default value.
PingFederateOAuthScopesType-indexThe name of the scope/scope group type index.
This is the default value.
EndpointOverrideAn optional endpoint URL which should not be used in production but allows for testing with a local development DynamoDB instance.
By default, this value is empty. To test DynamoDB running locally, specify
EndpointOverrideto point to a local endpoint. For example,<c:item name="EndpointOverride">http://localhost:8000</c:item>;. Learn more in DynamoDB local usage notes in the DynamoDB documentation.ApiCallTimeoutThe amount of time in milliseconds to allow the client to complete the execution of the API call. The default value is 10,000.
ApiCallAttemptTimeoutThe amount of time in milliseconds to wait for the HTTP request to complete before giving up and timing out. The default value is 1000.
cacheExpirySecsCache expiration (in seconds) for OAuth scopes and scope groups retrieved from DynamoDB. After this period, the cached entry is invalidated and refetched. The default value is 60.
-
-
Start or restart PingFederate.
-
For a clustered PingFederate environment, replicate this new configuration to other engine nodes in System > Server > Cluster Management.
You can optionally add the <c::item name="cacheExpirySecs"></c::item> parameter to the org.sourceid.oauth20.domain.ScopeManagerDynamoDBImpl.xml file that sets how long, in seconds, values fetched from DynamoDB are retained in the cache.
|