Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

crx/de restriction for anonymous user

Shakthi1
Level 4
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
ArpitVarshney
Correct answer by
Community Advisor
Community Advisor

Go through this Blog if this can help you.

View solution in original post

0 Replies
ArpitVarshney
Correct answer by
Community Advisor
Community Advisor

Go through this Blog if this can help you.

View solution in original post

Arun_Patidar
Community Advisor
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

 

Shakthi1
Level 4
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
Arun_Patidar
Community Advisor
Community Advisor
you should be getting url as part of request, I will create a sample filter and post a solution.
Arun_Patidar
Community Advisor
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

 

Shakthi1
Level 4
Level 4

Thanks a lot Arun.

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

 

Shakthi1
Level 4
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.
Arun_Patidar
Community Advisor
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
Community Advisor
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

Shakthi1
Level 4
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
Arun_Patidar
Community Advisor
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/