Configuring Trust Framework attribute caching for development
While building and testing policies in a development environment, you can define an external attribute cache for the Trust Framework.
About this task
When you set the Policy Decision Service to external policy decision point (PDP) mode, the Policy Editor is configured by default to cache attribute values in memory on the PingAuthorize Server (for any attributes with a defined caching strategy). Alternatively, you can define an external attribute cache using Redis by configuring the options.yml
file. The available Redis modes include:
-
Single Redis instance
-
Single Redis instance using TLS
-
Replicated Redis
-
Redis Sentinel
-
Amazon Web Services (AWS) ElastiCache Redis
Steps
-
Make a copy of the default options file:
Example:
$ cp config/options.yml my-options.yml
-
In the
cache
section of the new options file, uncomment the lineprovider: redis
to enable the Redis caching options. -
Uncomment the desired Redis
cacheConfig
block and modify it to reflect your Redis instance settings.Example:
cache: provider:redis cacheConfig: mode: single_instance nodeAddresses: redis://localhost:6379 # username: <optional> # password: <optional>
-
Optional: Uncomment
username
andpassword
and add the appropriate values.
-
-
Stop the Policy Editor:
Example:
$ bin/stop-server
-
Run
setup
using the--optionsFile
argument and customize all other options as appropriate for your needs:Example:
$ bin/setup demo \ --adminUsername admin \ --generateSelfSignedCertificate \ --decisionPointSharedSecret pingauthorize \ --hostname <pap-hostname> \ --port <pap-port> \ --adminPort <admin-port> \ --licenseKeyFile <path-to-license> \ --optionsFile my-options.yml
-
Start the Policy Editor:
Example:
$ bin/start-server