How to sync content publish to author environment in AEM cloud | Community
Skip to main content
Level 3
April 22, 2024
Solved

How to sync content publish to author environment in AEM cloud

  • April 22, 2024
  • 2 replies
  • 2760 views

Hi All,
I created custom form which has first name, last name and company name, authored form component and published page in publish environment 

Access the publish environment on that page, When the user submits a form, data needs to be stored in the author environment.

Is Sling Content Distribution Reverse content(publish to author )will work an AEM cloud environment ?
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/release-notes/aem-cloud-changes#replication-agents

I wrote a servlet that works well in the author environment. When a user submits data to the author, it can be stored in author environment ,

When the end user(publish page) submits a form, that information must be saved in the author environment .


CC:   @arunpatidar  @estebanbustamante  @raja_reddy @kamal_kishor  @shashi_mulugu 

Best answer by aanchal-sikka

@aanchal-sikka 
I followed by below blog 
https://techrevel.blog/2023/09/06/access-restricted-resources-on-aemaacs-with-java-and-service-accounts/
When I run the command in the terminal, it shows

Could not find private key from private.key


openssl pkcs8 -topk8 -inform PEM -outform DER -in private.key -out privateKey.pem -nocrypt



@naruk89179065 

 

Please assure that you are running command in the same folder where private.key file is present. Please cross-check the filename also once

2 replies

Saravanan_Dharmaraj
Community Advisor
Community Advisor
April 22, 2024

@naruk89179065 Why are you bringing the user generated content (UGC) from form submission into Author instance? Normally the UGC should be stored separate data store than AEM or form can be submitted to Marketo and the AEM instances can read those submitted forms. What is the use case of bringing to AEM author , just for reporting? Also the submitted form data will fill up the author if there is spam attack on these forms and can bring the author down. My 2 cents!

Using SCD it will replicate the submitted data in one publish to all the other publish instances. 

Level 3
April 22, 2024

thanks @saravanan_dharmaraj 

We created custom form, it's around 50 user's information that needs to be stored on the page in the author environment, If end user requires content modification, it should allow  content author  for modification, If that content is available in the author environment, it will be easy to make content modification


 




aanchal-sikka
Community Advisor
Community Advisor
April 23, 2024

@naruk89179065 

 

Is this functionality added on an Intranet site or public site?

 

  • This is possible to send content from publish to author via hacks like Servlet. BUT ITS NOT RECOMMENDED.  Please be careful with the Servlet approach, use access tokens to validate the request between author and publish. It should not open a security issue, where someone can post n number of requests to author to store user info.
  • In general, as @saravanan_dharmaraj suggested, its UGC content and should be out of AEM. 
  • SCD does not support reverse replication. 
Aanchal Sikka
joerghoh
Adobe Employee
Adobe Employee
April 26, 2024

In AEM CS I would store this information in the user profile and request that the usersync feature is enabled.

 

Nevertheless this information will not reach the authoring instance when using usersync, which is correct. If you want users to store data in publish and being able to review/modify it on publish, you need probably to rely on an external storage, as the usersync is not working this way, and sling content distribution does not work on AEM CS this way either.