Expand my Community achievements bar.

SOLVED

crx/de restriction for anonymous user

Avatar

Level 4

How to restrict access(anonymous)  crx/de  if  dispatcher not installed on instance,please any suggestions ,advise.

 

I went through the 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/access-denied-to-crxde/qaq...

and on that the below url doesnot have the details

See if this helps you :- http://aemfaq.blogspot.in/2013/05/blocking-anonymous-access-to-crx-in-non.html

// Blocking anonymous access to Crx in a non dispatcher protected instance

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Go through this Blog if this can help you.

View solution in original post

12 Replies

Avatar

Correct answer by
Community Advisor

Go through this Blog if this can help you.

Avatar

Community Advisor

Hi,

The sling filters can be a good example to achieve this. I have an example where I sjow custom screen based on user, you can redirect user to home screen if he try to access crx de

https://github.com/arunpatidar02/aem63app-repo/blob/master/java/CustomScreenFilter.java

 



Arun Patidar

Avatar

Level 4
bUt the url we dont get as crx/de/index.jsp we wanted to retsrtcit acecss to CRX/De only for ceratin users ,but we get /libs/cq/i18n/dict.en.json,please can you suggets if any other way ti get the url for crx/de

Avatar

Community Advisor
you should be getting url as part of request, I will create a sample filter and post a solution.


Arun Patidar

Avatar

Community Advisor

https://github.com/arunpatidar02/aem63app-repo/blob/master/java/CustomCRXScreenFilter.java

 

create a clientlib (js) at any location(in above example it is at /apps/AEM63App/clientlibs/crxredirect.js) with below code e.g. 

 

window.location="/aem/start.html"

 

Screenshot 2020-04-23 at 2.35.02 PM.png

 



Arun Patidar

Avatar

Level 4

Thanks a lot Arun.

added in  /apps/AEM63App/clientlibs/crxredirect.js file, the redirect is not happening.

 

Avatar

Level 4
Enabling crx/de crul is curl -u admin:admin -F "jcr:primaryType=sling:OsgiConfig" -F "alias=/crx/server" -F "dav.create-absolute-uri=true" -F "dav.create-absolute-uri@TypeHint=Boolean" http://localhost:4502/apps/system/config/org.apache.sling.jcr.davex.impl.servlets.SlingDavExServlet please advsie if there is a curl to disable , we are tryinng this option also.Thanks in advance.

Avatar

Community Advisor
Is it in Author or Publisher, can you check on Author. In publisher you can use another script/location if there is access issue.


Arun Patidar

Avatar

Community Advisor

curl -u $AEMUID:$PWD -Faction=$ACTION \ http://$H:$P/system/console/bundles/com.adobe.granite.crxde-lite

curl -u $AEMUID:$PWD -Faction=$ACTION \ http://$H:$P/system/console/bundles/com.adobe.granite.crx-explorer



Arun Patidar

Avatar

Level 4
When the redirect slingResponse.sendRedirect("/apps/clientlibs/crxredirect.js") is called it navigates to the location of the file /crx/de/index.jsp#apps/sling/servlet/errorhandler/404.html

Avatar

Community Advisor
The reason could be file is not found or access to apps is blocked, you can use proxy clientlibs and changes path to /etc.clientlibs/


Arun Patidar