Installing the Agent

NOTE
If you have previously installed the serialization hotfix for AEM 6.1, remove the agent start commands from your Java™ run line.
  1. Install the com.adobe.cq.cq-serialization-tester bundle.

  2. Go to the Bundle Web Console at https://server:port/system/console/bundles

  3. Look for the serialization bundle and start it. Doing so dynamically autoloads the NotSoSerial agent.

Installing the Agent on Application Servers

The NotSoSerial agent is not included in the standard distribution of AEM for application servers. However, you can extract it from the AEM jar distribution and use it with your application server setup:

  1. First, download the AEM quickstart file and extract it:

    java -jar aem-quickstart-6.2.0.jar -unpack
    
  2. Go to the location of the newly unzipped AEM quickstart, and copy the crx-quickstart/opt/notsoserial/ folder to the crx-quickstart folder of the AEM application server installation.

  3. Change the ownership of /opt to the user running the server:

    chown -R opt <user running the server>
    
  4. Configure and check that the agent has been properly activated as shown in the following sections of this article.

Configuring the agent

The default configuration is adequate for most installs. This configuration includes a blocklist of known remote run vulnerable classes and an allowlist of packages where deserialization of trusted data is safe.

The firewall configuration is dynamic, and can be changed at any time by:

  1. Going to the Web Console at https://server:port/system/console/configMgr

  2. Searching for and clicking Deserialization Firewall Configuration.

    NOTE
    You can also reach the configuration page directly by accessing the URL at:
    • https://server:port/system/console/configMgr/com.adobe.cq.deserfw.impl.DeserializationFirewallImpl

This configuration contains the allowlist, blocklist, and deserialization logging.

Allow Listing

In the allow listing section, these listings are classes, or package prefixes that are allowed for deserialization. If you are deserializing classes of your own, add either the classes or packages to this allowlist.

Block Listing

In the block listing section are classes that are never allowed for deserialization. The initial set of these classes is limited to classes that have been found vulnerable to remote execution attacks. The blocklist is applied before any allow listed entries.

Diagnostic Logging

In the section for diagnostic logging, you can choose several options to log when deserialization is taking place. These options are only logged on first use, and are not logged again on subsequent uses.

The default of class-name-only informs you of the classes that are being deserialized.

You can also set the full-stack option which logs a Java™ stack of the first deserialization attempt to inform you where your deserialization is taking place. This option is useful for finding and removing deserialization from your usage.

Verifying the Agent’s Activation

You can verify the deserialization agent’s configuration by browsing to the URL at:

  • https://server:port/system/console/healthcheck?tags=deserialization

After you access the URL, a list of health checks related to the agent is displayed. You can determine if the agent is properly activated by verifying that the health checks are passing. If they are failing, you must load the agent manually.

For more information on troubleshooting issues with the agent, see Handling Errors With Dynamic Agent Loading below.

NOTE
If you add org.apache.commons.collections.functors to the allowlist, the health check always fails.

Handling errors with dynamic agent loading

If errors are exposed in the log, or the verification steps detect a problem loading the agent, load the agent manually. This workflow is also recommended if you use a JRE (Java™ Runtime Environment) instead of a JDK (Java™ Development Toolkit), because the tools for dynamic loading are not available.

To load the agent manually, do the following:

  1. Edit the JVM startup parameters of the CQ jar, adding the following option:

    -javaagent:<aem-installation-folder>/crx-quickstart/opt/notsoserial/notsoserial.jar
    
    NOTE
    Requires that you use the -nofork CQ/AEM option as well, along with the appropriate JVM memory settings, as the agent is not enabled on a forked JVM.
    NOTE
    The Adobe distribution of the NotSoSerial agent jar can be found in the crx-quickstart/opt/notsoserial/ folder of your AEM installation.
  2. Stop and restart the JVM;

  3. Verify the agent’s activation again by following the steps described above in Verifying The Agent’s Activation.

Other Considerations

If you are running on an IBM® JVM, review the documentation on support for the Java™ Attach API at this location.

Announcements

Get hands-on with agentic AI.

Explore how AI agents work together through real examples and hands-on practice. Join your local User Group to design an agent workflow with your peers and leave with a practical framework you can apply to your own work.

Find an event

Ask AI

Not sure where to start?
Ask me anything about Adobe products.

Type your question or pick a suggestion below.

Use of this AI chatbot is subject to Adobe's Privacy Policy. Don't share sensitive data. AI responses are not your Content, may be inaccurate, and any offers provided are non-binding. Generative AI Terms.

Ask AI