AEM Persisted Queries, AEM Headless integration | Community
Skip to main content
Level 2
March 15, 2024

AEM Persisted Queries, AEM Headless integration

  • March 15, 2024
  • 2 replies
  • 749 views

Hi,

 

Do I need to implement any  Authentication system to fetch persisted graphql queries using server side implementation?

I believe persisted queries are available to public through publisher instance, just like

publisher-xyz.adobeaemcloud.com/graphql/execute.json/configuration-name/persisted-query-name

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

aanchal-sikka
Community Advisor
Community Advisor
March 16, 2024

@rohanjuneja 

 

The query results depend on the ACLs of the User (Service credentials in case of App-to-App).

  • You can create the service credentials via CM.
  • Once user syncs, add to a groups with required permissions.
  • Access endpoint via these service credentials [0]
  • If your requirements can be dealt with single user, then dispatcher cache can be used as it is. ELse, you might want to implement permission sensitive caching [1]. In [1], I have added details for using GraphQL with CUG, you can skip Step-1, but remaining steps should still be valid.

 

[0]: https://techrevel.blog/2023/09/06/access-restricted-resources-on-aemaacs-with-java-and-service-accounts/

[1]: https://techrevel.blog/2023/06/07/securing-content-for-graphql-queries/

Aanchal Sikka
Level 2
April 17, 2024

Hi Aanchal,

 

So, if I am implementing AEMaaCS within a React app, and implementing AEM through APIGEE.  How would the authentication mechanism work?

publisher-xyz.adobeaemcloud.com/graphql/execute.json/configuration-name/persisted-query-name

Since, all content is available publically through AEM publisher instance. I just need access to content for frontend, no assets or any other thing from AEM.

 

kautuk_sahni
Community Manager
Community Manager
March 20, 2024

@rohanjuneja Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni