Provide restricted access to /bin/querybuilder.json | Community
Skip to main content
Level 3
Jul 26, 2022 7:04 PM UTC
Solved

Provide restricted access to /bin/querybuilder.json

Hi, We need to provide restricted access to AEM's query-builder json API to a 3rd party app. How can we add some sort of authorization/access restriction around this path: /bin/querybuilder.json. 

 

We can't make it publicly accessible for security considerations.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Jul 29, 2022 10:57 AM UTC

with CUG or ACL, it will not work until end user will have session in AEM. I think the best is to achieve from dispatcher.

 

If you want to do it via AEM session then you can use sling filter to check authentication for this path and return 404 status code or continue the request.

Arun Patidar

9 replies

arunpatidar
New Participant
Jul 27, 2022 4:41 PM UTC

Hi,

I think you can enable basic auth at apache server only for this path.

Translate
Arun Patidar
beast42Author
Level 3
Jul 27, 2022 7:54 PM UTC

Thanks for the response @arunpatidar.

 

Is there any way we can call  /bin/querybuilder.json from a sling servlet? I was thinking may be we can have a sling servlet (tied to a resource page) which has some authentication (CUG or ACL)? 

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Jul 29, 2022 10:57 AM UTC

with CUG or ACL, it will not work until end user will have session in AEM. I think the best is to achieve from dispatcher.

 

If you want to do it via AEM session then you can use sling filter to check authentication for this path and return 404 status code or continue the request.

Translate
Arun Patidar
New Participant
Jul 26, 2022 8:20 PM UTC

hi @beast42 

what do you want to expose through querybuilder, what is your requirement.

Translate
beast42Author
Level 3
Jul 26, 2022 8:35 PM UTC

We need to provide search capability to a 3rd party application. It will query AEM DAM and show results in their page.

Translate
New Participant
Jul 26, 2022 9:51 PM UTC

@beast42 

You can use the AEM Asset API for you requirement, here is the reference https://experienceleague.adobe.com/docs/experience-manager-65/assets/extending/mac-api-assets.html?lang=en

Translate