Skip to main content
  • Latest version: v1.3.0
  • Compatible with Fusion version: 5.9.4 and later
Connector flow The AEM V2 connector supports the following:
  • Full crawling and recrawling of pages and assets in Adobe Experience Manager
  • Basic authentication
    In Fusion 5, the username and password fields have moved under Authentication Settings > Login Settings.
  • OAuth authentication
  • Security trimming to filter results based on user permissions
    • Filter document crawling by including and excluding paths and configuring content properties when setting up the connector.
  • Specific wait time between fetch requests to throttle crawls, if necessary
  • Optional crawling of child paths
This document explains how to configure an AEM V2 connector to crawl data in Adobe Experience Manager. This connector is compatible with Fusion 5.5.1 and later.

Configure AEM Datasource

  1. In Fusion, under Indexing > Datasources, click Add, then select AEM
  2. Enter a Configuration ID
  3. Enter the AEM URL (the URL used to access the AEM Admin UI) as well as the AEM username and password used to authenticate access to the QueryBuilder JSON Servlet.
AEM authentication
  1. Go to AEM to log in and access CRXDE Lite. In the CRXDE Lite UI, select a path to crawl. Enter this path into Fusion. Click Add to crawl multiple paths.
CRXDE pathAEM paths to crawl
  1. Optional: To exclude paths from the crawl, in Fusion, enter a Java Regular Expression (regex) that represents paths to exclude in the indexed content.
paths to exclude
  1. In Fusion, enter the AEM type to crawl. In the CRXDE Lite UI, this is the jcr:primaryType. In this example, the AEM connector is configured to crawl the AEM Type cq:Page, which represents web content pages.
CRXDE typeAEM type
  1. To index assets with a particular file extension, locate a file type in CRXDE Lite and enter the value of the jcr:primaryType into Fusion. In this example, the value of NY_FairHealth.pdf is dam:Asset.
AEM attachments
  1. You can choose which content properties to include and exclude from the index. These parameter values are represented by Java regex. For example, to only include properties that start with “jcr” enter jcr:(.*).
  2. In Fusion, click Save when you’re done configuring the AEM datasource.

Configuration settings

Field data population

There are multiple sources where AEM data is indexed. The /bin/querybuilder.json endpoint data is mandatory and must exist in order for a document to be indexed.Note the list of fields that can appear in an indexed document:
Check for duplicate data when crawling child paths. For example, if the connector indexes both cq:Page and cq:PageContent then the results could include duplicated data.
The v1.3.0 version of this connector is only compatible with Fusion 5.9.4 and later when using security trimming. The v1.3.0 connector version uses Graph Security Trimming and not regular security trimming. It is imperative to treat this as a new connector, as configurations do not transfer over due to disparities between newer versions and previous ones. A full crawl is mandatory.

Prerequisites

Perform these prerequisites to ensure the connector can reliably access, crawl, and index your data. Proper setup helps avoid configuration or permission errors, so use the following guidelines to keep your content available for discovery and search in Fusion.

AEM instance

  • AEM Author instance must be reachable over HTTP/HTTPS.
  • The QueryBuilder JSON API must be enabled. It’s typically located at /bin/querybuilder.json.
  • The JCR Download endpoints must be accessible, such as /crx/de/download.jsp or direct node paths.

Configure an AEM service account

Create a service account with the following:
  • Read access to content paths being crawled
  • Access to user and group APIs if using security trimming
  • Permissions to access the following:
    • Page metadata, such as cq:Page or jcr:content
    • Binary attachments such as PDFs and DOCX files
    • JCR nodes and properties
    • If using group mapping, access to /libs/cq/security/userinfo.json or equivalent endpoints

Content Paths

  • You must define one or more JCR root paths to crawl, such as /content/SITE_NAME/en.
  • Optionally provide:
    • Exclude path regexes to filter out subtrees
    • Attachment extension types
    • JCR property include/exclude filters

Authentication

Setting up the correct authentication according to your organization’s data governance policies helps keep sensitive data secure while allowing authorized indexing. The AEM V2 connector supports two modes of authenticating to your AEM instance: basic HTTP and OAuth. Fusion handles session management as needed, including cookie handling and token renewal. Basic HTTP authentication:
  • Provide a standard AEM username and password with read access to JCR paths.
  • If using security trimming, the AEM account also requires read access to the user and groups APIs.
OAuth 2.0 authentication:
  • Paste in an Access Token and optional Refresh Token.
  • If you do not have a pre-obtained token, the connector can fetch a token using JWT authentication.
The AEM V2 Connector supports OAuth 2.0 authorization with JWT token.

Supported authorization options

Requests are authorized by including an Access Token in the Authorization header.Example:
There are three ways the connector can get Access Token:
  • From the datasource configuration
  • From AEM server using Refresh Token
  • From AEM server using JWT token
Request Access Token, Refresh Token, and JWT token manually and set them in the datasource configuration:AEM token requestOther settings: Client Id, Client Secret, and Redirect Uri can be found in the AEM admin page under Security > Oauth Clients:AEM client settings

Getting Access Token

  1. Open this URL in a browser:
  2. You are redirected to login page (if you are not logged in): AEM login screen
  3. Logging in redirects you to confirm the authorization. Click Yes, I authorize this request. AME login confirmation
  4. You are redirected to the URL provided in redirect_uri with parameter code: REDIRECT_URI?code=AUTHORIZATION_CODE.
  5. Copy the value of the code parameter. This is your Authorization Code.
  6. Execute the request to get Access Token:
    Example:
    Response:

Getting Refresh Token

To get Refresh Token, follow the same proccess for Access Token, but:
  1. You must include offline_access in the scope list.
  2. You must revoke all the previously obtained token. It can be done by clicking Revoke All Tokens.

Getting JWT Bearer Token

  1. Download Private Key from the AEM Oauth client section. You should have downloaded file store.p12.
  2. Run:
    When asked about password type notasecret. You should have generated file named store.crt.pem.
  3. Run:
    You should have generated file named store.private.key.txt.
  4. Create JWT token with the below payload and encrypt it with the private key using RS256:
    For example, install pyjwt with pip install pyjwt to encrypt with this python script:

Security trimming

The AEM V2 connector supports graph security trimming. If you are using Fusion 5.18.0 or later, you can use separate collections to store your content and your ACLs. Use a separate sidecar collection if you need to manage ACL data independently of the rest of your content. To use a sidecar collection for your ACLs, you must create the ACL collection before configuring your datasource to read from this collection. To enable graph security trimming for your datasource:
  1. Navigate to Indexing > Datasources.
  2. Open your datasource.
  3. Under Graph Security Filtering Configuration, select Enable security trimming.
  4. If you are using a sidecar collection in Fusion 5.18.0 or later, set ACL Collection ID to your ACL collection name (for example, acl_collection).
  5. Save your changes.
After configuring your datasource, you must reference the ACL collection in the Graph Security Trimming stage.
If you are transitioning from using the same collection to creating a sidecar collection for ACLs, you must run a full recrawl of your datasource so the ACLs route to the sidecar collection. ACL documents stored in the content collection from before the migration remain in the content collection unless the collection is reindexed or manually cleaned.

Remote connectors

V2 connectors support running remotely in Fusion versions 5.7.1 and later. Refer to Configure Remote V2 Connectors.
If you need to index data from behind a firewall, you can configure a V2 connector to run remotely on-premises using TLS-enabled gRPC.

Prerequisites

Before you can set up an on-prem V2 connector, you must configure the egress from your network to allow HTTP/2 communication into the Fusion cloud. You can use a forward proxy server to act as an intermediary between the connector and Fusion.The following is required to run V2 connectors remotely:
  • The plugin zip file and the connector-plugin-standalone JAR.
  • A configured connector backend gRPC endpoint.
  • Username and password of a user with a remote-connectors or admin role.
  • If the host where the remote connector is running is not configured to trust the server’s TLS certificate, you must configure the file path of the trust certificate collection.
If your version of Fusion doesn’t have the remote-connectors role by default, you can create one. No API or UI permissions are required for the role.

Connector compatibility

Only V2 connectors are able to run remotely on-premises. You also need the remote connector client JAR file that matches your Fusion version. You can download the latest files at V2 Connectors Downloads.
Whenever you upgrade Fusion, you must also update your remote connectors to match the new version of Fusion.
The gRPC connector backend is not supported in Fusion environments deployed on AWS.

System requirements

The following is required for the on-prem host of the remote connector:
  • (Fusion 5.9.0-5.9.10) JVM version 11
  • (Fusion 5.9.11) JVM version 17
  • Minimum of 2 CPUs
  • 4GB Memory
Note that memory requirements depend on the number and size of ingested documents.

Enable backend ingress

In your values.yaml file, configure this section as needed:
  • Set enabled to true to enable the backend ingress.
  • Set pathtype to Prefix or Exact.
  • Set path to the path where the backend will be available.
  • Set host to the host where the backend will be available.
  • In Fusion 5.9.6 only, you can set ingressClassName to one of the following:
    • nginx for Nginx Ingress Controller
    • alb for AWS Application Load Balancer (ALB)
  • Configure TLS and certificates according to your CA’s procedures and policies.
    TLS must be enabled in order to use AWS ALB for ingress.

Connector configuration example

Minimal example

Logback XML configuration file example

Run the remote connector

The logging.config property is optional. If not set, logging messages are sent to the console.

Test communication

You can run the connector in communication testing mode. This mode tests the communication with the backend without running the plugin, reports the result, and exits.

Encryption

In a deployment, communication to the connector’s backend server is encrypted using TLS. You should only run this configuration without TLS in a testing scenario. To disable TLS, set plain-text to true.

Egress and proxy server configuration

One of the methods you can use to allow outbound communication from behind a firewall is a proxy server. You can configure a proxy server to allow certain communication traffic while blocking unauthorized communication. If you use a proxy server at the site where the connector is running, you must configure the following properties:
  • Host. The hosts where the proxy server is running.
  • Port. The port the proxy server is listening to for communication requests.
  • Credentials. Optional proxy server user and password.
When you configure egress, it is important to disable any connection or activity timeouts because the connector uses long running gRPC calls.

Password encryption

If you use a login name and password in your configuration, run the following utility to encrypt the password:
  1. Enter a user name and password in the connector configuration YAML.
  2. Run the standalone JAR with this property:
  3. Retrieve the encrypted passwords from the log that is created.
  4. Replace the clear password in the configuration YAML with the encrypted password.

Connector restart (5.7 and earlier)

The connector will shut down automatically whenever the connection to the server is disrupted, to prevent it from getting into a bad state. Communication disruption can happen, for example, when the server running in the connectors-backend pod shuts down and is replaced by a new pod. Once the connector shuts down, connector configuration and job execution are disabled. To prevent that from happening, you should restart the connector as soon as possible.You can use Linux scripts and utilities to restart the connector automatically, such as Monit.

Recoverable bridge (5.8 and later)

If communication to the remote connector is disrupted, the connector will try to recover communication and gRPC calls. By default, six attempts will be made to recover each gRPC call. The number of attempts can be configured with the max-grpc-retries bridge parameters.

Job expiration duration (5.9.5 only)

The timeout value for irresponsive backend jobs can be configured with the job-expiration-duration-seconds parameter. The default value is 120 seconds.

Use the remote connector

Once the connector is running, it is available in the Datasources dropdown. If the standalone connector terminates, it disappears from the list of available connectors. Once it is re-run, it is available again and configured connector instances will not get lost.

Enable asynchronous parsing (5.9 and later)

To separate document crawling from document parsing, enable Tika Asynchronous Parsing on remote V2 connectors.
Below is an example configuration showing how to specify the file system to index under the connector-plugins entry in your values.yaml file:
You may also need to specify the user that is authorized to access the file system, as in this example:

Learn more

The AEM V2 Connector supports OAuth 2.0 authorization with JWT token.

Supported authorization options

Requests are authorized by including an Access Token in the Authorization header.Example:
There are three ways the connector can get Access Token:
  • From the datasource configuration
  • From AEM server using Refresh Token
  • From AEM server using JWT token
Request Access Token, Refresh Token, and JWT token manually and set them in the datasource configuration:AEM token requestOther settings: Client Id, Client Secret, and Redirect Uri can be found in the AEM admin page under Security->Oauth Clients:AEM client settings

Getting Access Token

  1. Open this URL in a browser:
  2. You are redirected to login page (if you are not logged in): AEM login screen
  3. Logging in redirects you to confirm the authorization. Click Yes, I authorize this request. AME login confirmation
  4. You are redirected to the URL provided in redirect_uri with parameter code: <REDIRECT_URI>?code=<AUTHORIZATION_CODE>.
  5. Copy the value of the code parameter. This is your Authorization Code.
  6. Execute the request to get Access Token:
    Example:

Getting Refresh Token

To get Refresh Token, follow the same process for Access Token, but:
  1. You must include offline_access in the scope list.
  2. You must revoke all the previously obtained token. It can be done by clicking Revoke All Tokens.

Getting JWT Bearer Token

  1. Download Private Key from the AEM Oauth client section. You should have downloaded file store.p12.
  2. Run:
    When asked about password type notasecret. You should have generated file named store.crt.pem.
  3. Run
    You should have generated file named store.private.key.txt.
  4. Create JWT token with the below payload and encrypt it with the private key using RS256:
    For example, install pyjwt to use this python script:

Configuration