Configure microservice-based publishing with JWT authentication
[Cloud Service]{class="badge informative"}
Microservice-based publishing in for Adobe Experience Manager Guides as a Cloud Service supports PDF (both Native and DITA-OT based), HTML5, JSON, and CUSTOM types of output presets.
As the Service Account (JWT) credentials have been deprecated, so it is recommended to use Adobe IMS OAuth-based authentication. Learn how to configure microservice-based publishing with OAuth authentication.
For the cloud publishing service secured by Adobe IMS JWT based authentication, customers should follow the below given steps to integrate their environments with Adobe’s secure token-based authentication workflows and start using the new cloud based scalable publishing solution.
Create IMS configurations in Adobe Developer Console
Role required to create the confugrations: System Administrator
Perform the following steps to create IMS configurations in Adobe Developer Console:
-
Open Developer Console:
https://developer.adobe.com/console
. -
Switch to Projects tab from top.
{width="500"}
-
To create a new empty project, select Empty project from the Create new project dropdown.
{width="500"}
-
Select API from the Add to Project dropdown to add IO Management API to your project.
{width="300"}
{width="500"}
-
Create a new private/public key pair while adding the API. This will automatically download the private key on your system.
{width="500"}
-
Save the configured API.
{width="600"}
-
Go back to Projects tab and click Project overview on the left.
{width="500"}
-
Click Download button on the top to download the service JSON.
{width="500"}
You have now configured the JWT authentication details and have also downloaded the private key and the service details JSON. Keep these two files handy as these files are required in the next section.
Add IMS configuration to the environment
Perform the following steps to add IMS configuration to the environment:
-
Open experience manager and then select your program which contains the environment you want to configure.
-
Switch to Environments tab.
-
Click on the environment name which you want to configure. This should navigate you to the Environment Information page.
-
Switch to Configuration tab.
-
Upload the private key and project JSON as shown in the screenshot below. Make sure you are using the same names and configuration as highlighted below.
{width="500"}
Once you have added the IMS configuration to the environment, perform the following steps to link these properties with Experience Manager Guides using OSGi:
-
In you cloud manager Git project code, add the below given two files (For file contents, see Appendix).
com.adobe.aem.guides.eventing.ImsConfiguratorService.cfg.json
com.adobe.fmdita.publishworkflow.PublishWorkflowConfigurationService.xml
-
Ensure that the newly added files are getting covered by your
filter.xml
. -
Commit and push your Git changes.
-
Run the pipeline to apply the changes on the environment.
Once this is done, you should be able to use the new microservice-based cloud publishing.
FAQs
- Can a single key be used on multiple cloud environments?
- Yes, you can generate one private key and use it for all environments, but you have to configure environment variables for all environments and use the same key.
- If OSGi configurations to use microservice are enabled , will the publishing process work on local AEM server with the same codebase?
- No, if the flag
dxml.use.publish.microservice
is set totrue
then it always looks for microservice configurations. Setdxml.use.publish.microservice
tofalse
for the publishing to work on your local.
- No, if the flag
- How much memory is allocated to the DITA process when using microservice-based publishing? Is this driven via DITA profile ant parameters?
- With microservice-based publishing, memory allocation is not driven through DITA profile ant parameters. The total memory available on the service container is 8 GB, out of which 6 GB is allocated to the DITA-OT process.
Appendix appendix
File:com.adobe.aem.guides.eventing.ImsConfiguratorService.cfg.json
Content:
{
"service.account.details": "$[secret:SERVICE_ACCOUNT_DETAILS]",
"private.key": "$[secret:PRIVATE_KEY]"
}
File: com.adobe.fmdita.publishworkflow.PublishWorkflowConfigurationService.xml
Content:
dxml.use.publish.microservice
: Switch to enable microservice-based publishing using DITA-OTdxml.use.publish.microservice.native.pdf
: Switch to enable microservice-based Native PDF publishing
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="sling:OsgiConfig"
dxml.publish.microservice.url="https://adobeioruntime.net/api/v1/web/543112-guidespublisher/default/publishercaller.json"
dxml.use.publish.microservice="{Boolean}true"
dxml.use.publish.microservice.native.pdf="{Boolean}true"
/>