Expand my Community achievements bar.

SOLVED

Not able to access Tools.html in publish.

Avatar

Level 4

Hi Team,

When i access localhost:4502/Tools.html am able to access it properly. But when i access localhost:4503/Tools.html the publish environment am getting resource not found 404 error.

I have customized 404.jsp at /apps/sling/servlet/errorhandler/404.jsp. When i move this 404.jsp it works fine in publish environemnt also.

Not able to find out the problem here.

Please your help is greatly appreciated.

Thanks,

Madhu

1 Accepted Solution

Avatar

Correct answer by
Level 10

On publish you need to login first at [1]  & then go to tools.html it will work.   If does not work following are the things you should look

  1. Make sure user you are logging is part of admin group Or as access to /libs/cq/core/content/tools
  2. Make sure /libs/cq/core/content/tools/jcr:content has sling:vanityPath equal to tools exist.
  3. Make sure to validate your custom 404 logic.

[1]    http://localhost:4503/libs/granite/core/content/login.html

View solution in original post

5 Replies

Avatar

Level 10

What version of CQ are you using? 

Avatar

Level 4

Hi,

 

Am using CQ5.6.

Thanks,

Madhu

Avatar

Correct answer by
Level 10

On publish you need to login first at [1]  & then go to tools.html it will work.   If does not work following are the things you should look

  1. Make sure user you are logging is part of admin group Or as access to /libs/cq/core/content/tools
  2. Make sure /libs/cq/core/content/tools/jcr:content has sling:vanityPath equal to tools exist.
  3. Make sure to validate your custom 404 logic.

[1]    http://localhost:4503/libs/granite/core/content/login.html

Avatar

Level 4

Hi Sham,

Thank you so much for your reply.

But the problem is "We could not access tools.html page when not logged in". Atleast it should take to login page but it is throwing 404 page.

 

Thanks,

Madhu

Avatar

Employee

First, keep in mind that a 404 is technically correct here - there is no 'tools' node at the root of the repository. It's only via the use of a vanity path that you can access this page at /tools.html as an admin, and only an admin would get access to the real location under /libs (which means the vanity path configuration which is also stored under /libs would only be in effect for admins).

I think for security reasons this is not default behavior on Publish. That is, the normal use case for Publish is really for end users to be accessing it, and thus you would really never want to expose internal functions to them (i.e. you'd restrict them to things under /content and /etc/designs, and the specific servlets you are using).

You could theoretically add a Login Page Mapping of '/libs/granite/core/content/login:/tools' in the Day CQ Login Selector Authentication Handler, and a corresponding Authentication requirement of '+/tools' to the Apache Sling Authentication Service to achieve the desired result. (This would mimic the behavior of the Author.)

But if you do this, I would be very careful to ensure you are restricting access to the server itself and doing rigorous testing to ensure this does not introduce a potential security vulnerability. Personally, I would keep the normal authentication configuration of Publish, since I would be restricting access to /crx/de and /system/console on Publish anyway, and just require admins to log in via CRXDE Lite or Felix before being able to get to /tools.html - but AEM is very flexible so please do what makes the most sense for your use case.
 

- Carey