Managing expired persistent grants in PingDS
When storing OAuth persistent grants on a PingDS server, you can configure time-to-live (TTL) settings in PingDS to remove expired data from your directory server.
You must configure PingFederate to use org.sourceid.oauth20.token.AccessGrantManagerLDAPPingDSV2Impl for access grant storage. Learn more in Configuring directories for grant storage.
|
About this task
In PingDS, you can use backend indexes to enable TTL for generalized time indexes. Learn more in Backend Index in the PingDS documentation.
Steps
-
Disable the PingFederate cleanup task.
For a clustered PingFederate environment, make these change on the console node. No changes are required on any of the engine nodes.
-
Open the
<pf_install>/pingfederate/server/default/data/config-store/timer-intervals.xmlfile in a text editor. -
Update the
AccessGrantCleanerIntervalvalue to0. -
Save your changes.
-
Restart PingFederate.
-
-
Connect to the PingDS server.
-
Update the index using the PingDS
dsconfigutility.The
dsconfigutility is interactive. You can also provide inputs as command arguments. -
To remove expired OAuth persistent grants, update the
accessGrantExpiresTimeindex.$ dsconfig set-backend-index-prop \ --hostname localhost \ --port 4444 \ --bindDN uid=admin \ --bindPassword password \ --backend-name dsEvaluation \ --index-name accessGrantExpiresTime \ --set ttl-enabled:true \ --set ttl-age:0\ s \ --usePkcs12TrustStore /path/to/opendj/config/keystore \ --trustStorePassword:file /path/to/opendj/config/keystore.pin \ --no-prompt