Skip to main content
LinkedIn
Copied!

Table of Contents

Creating a data page activity for a keystore

Version:

Only available versions of this content are shown in the dropdown

To configure a keystore with a data page reference, you must create the activity that loads the keystore into the data page. You can create the activity by clicking the Add icon on the data page Definition tab.

  1. On the data page Definition tab, next to the Activity name field, click the Add icon.

  2. Enter the label and identifier, accept the default for Apply to class (Data-Admin-Security-Keystore), and then click Create and open.

  3. In the Method field, enter Java.

  4. Click the Expand icon, and then enter the Java Source.

    • To load a JKS or PKCS12 type keystore into the cache, in the Method Parameters section, in the Java Source field, enter a code snippet similar to the following example:
      
                try {
                     java.io.FileInputStream file = new java.io.FileInputStream("
                               JKS_or_PKCS12_keystore_file_with_complete_path");
                     KeyStoreUtils keystoreUtils = pega.getKeyStoreUtils();
                     keystoreUtils.loadKeystore(file);
                } catch(Exception ex){
                     oLog.error("Failed to load keystore into cache "+ex);
      	  }
    • To load a JWK type keystore into the cache, in the Method Parameters section, in the Java Source field, enter a code snippet similar to the following example:
      
                try {               
                    java.net.URL url = new java.net.URL("
                         JWK_keystore_URL_location");           
                    KeyStoreUtils keystoreUtils = pega.getKeyStoreUtils();
                    keystoreUtils.loadKeystore(url.openConnection().getInputStream());
                } catch(Exception ex){
                    oLog.error("Failed to load keystore into cache "+ex);
                }
  5. Click Save.

Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us