Permalink
Switch branches/tags
Nothing to show
Find file Copy path
a036123 Sep 6, 2018
1 contributor

Users who have contributed to this file

132 lines (83 sloc) 6.55 KB

Setting up AEM Events with Adobe I/O Events

These instructions describe how to set up AEM 6.4 for Adobe I/O Events for our AdaptTo 2018 lab.

Pre-requisite and pre-defined Authorizations

To complete this lab, you will need authorization to use the following products/services:

  • An AEM instance, 6.4.x, with administrative permissions.
  • we assume this will be a no-brainer, you must be all familiar with AEM at this conference, right ?
  • Adobe I/O Console access, with administrative permissions for your enterprise/lab organization
  • we prepared a set of accounts for you to use in this lab. Note that if you are trying this at home, and if you have an AEM license, you should be able to use your own customer/organization account against Adobe I/O Console
  • For this lab, we will all be using a test Organization, id-ed: 2A74564158A4D56F0A495C55@AdobeOrg

In order to speed things up as we only have 30 minutes

  • we pre-baked a certificate and an its associated keystore. It will be used to secure the communication between your AEM instance and adobe.io - exchanging a JWT token to fetch an oAuth access token)

    • browse the certs folder. In there you'll find
      • the public certificate expected by adobe.io certificate_pub.crt
      • the associated private key and signed certificate stuffed into a PKCS#12 keystore.p12 that you'll use when configuring your AEM instance
  • an integration is also pre-defined on adobe.io console at https://console.adobe.io/integrations/43611/47460/overview

If you are trying this at home, if you have an AEM license, you should be able

  • to use your own customer/organization account against Adobe I/O Console
  • define there your own AEM Adobe I/O integration

Install the AEM Adobe I/O Events(aem-event-proxy) package

To install the AEM event proxy package:

  1. Download the latest version of the package: version 6.4.255

  2. Open AEM Package Manager by selecting the Tools icon and then selecting Deployment and Packages.

  3. In Package Manager, select Upload Package. Select Browse and navigate to the package zip file. Select OK.

  4. Select Install.

  5. Watch the Activity Log. If installed, the log reports that the package is imported.

For more information on installing packages in AEM, see How to Work with Packages.

Add the certificate into the AEM eventproxy-service keystore

  1. In AEM, open the User Management group by selecting the Tools icon and then selecting Security and Users. Or just browse to http://localhost:4502/libs/granite/security/content/useradmin.html

  2. Scroll down and Select eventproxy-service to open it.

  3. Select KeyStore>Create KeyStore

  4. Create the password (let's all use admin again to keep things simple)

  5. Select Add Private Key from Key Store file.

  6. Click on Select KeyStore File : upload the keystore.p12

    • enter eventproxy as the new Alias
    • enter admin as the KeyStore File Password
    • enter eventproxy as the Private Key Alias
    • enter admin as the Private Key Password
    • Click Submit
  7. Click on Save and Close

Configure the AEM Link Externalizer

Next is for you to specify the base url of your AEM instance.

This base URL will appear on the Adobe I/O Console and will be use to compute some of the url in the event payload...

Do not use only the word “localhost” as the default name because others may use it. This will then cause confusion and make it difficult to determine which instance is yours.

Configure is as something unique-to-you like yourfistname.yourlastname.com

For that you will configure Day CQ Link Externalizer:

  1. Open the Web Console, or select the Tools icon, then select Operations and Web Console. or just go to http://localhost:4502/system/console/configMgr
  2. Scroll down the list to find Day CQ Link Externalizer,
  • edit the second author line with something like author http://yourfirstname.yourlastname.com:4502
  • select Save when done.

Note that the default AEM Link Externalizer name in Adobe I/O Events' Configuration is author But this can be changed

Configure Adobe I/O Events as a cloud service in AEM

  1. Open the Cloud Services console, or select the Security icon, and then select Adobe IMS Configurations. or just browse to http://localhost:4502/libs/cq/adobeims-configuration/content/configurations.html

  2. Click Create; Select AdobeIOEvents in the Cloud Solution drop down; once selected, you should see the certificate you just added to the AEM eventproxy-service user's keystore; Click Next

  3. Fill in the various entries expected to configure the IMS account associated with the integration we have created for you in the Adobe I/O Console (cf. https://console.adobe.io/integrations/43611/47460/overview) If you can't access the console please refer to this file

    • For Title: specify Adobe IO Events (or any other title that makes sense to you).
    • For Authorization Server: https://ims-na1.adobelogin.com (unless the URL shown in the JWT tab of your integration page in the Adobe I/O Console is different),
    • For API key: Provide the API key shown in the Overview tab of your integration page in the Adobe I/O Console.
    • For Client Secret: Provide the Client Secret shown in the Overview tab of your integration page in the Adobe I/O Console.
    • For Payload: Provide the JWT payload shown in the JWT tab of your integration page in the Adobe I/O Console.
  4. Click Create

  5. Now you should see this new Adobe IO Events IMS Configuration, and you can select it to check its health.

Done ?

The AEM set up is done, AEM is now already emitting events to adobe.io But only a pre-defined sets of events and these events are going nowhere beyond.

So, next let's create a receiving end to these events