Expand my Community achievements bar.

SOLVED

Permissions on Publish for anonymous

Avatar

Former Community Member

Hello,

Using: AEM 6.1.0

 

We are in middle on the developing of our first website. The content and code is transferred correctly to the publish instance.

Trying to render a page on publish, does not work as anonymous, but works as admin.  So I guess it is a permissions problem for the user anonymous, who has only (standard) access to /content and /bin. 


I could not find any documentation, which permissions to give to the anonymous user except for an article on stack overflow.

Here it was suggested to give him read on everything and let the dispatcher deny any direct access to /apps, /etc and other folders...

This seems like a bad security concept, letting a web server handle the security.

 

Is this the only possible way to do this?

 

Kind regards,

Jerry

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Problem solved:

 

Template from the developers tried to read sth beneath /etc/siteconfig. (some parameters for the website are stored here, like how many news to show, etc...)

"Anonymous" had no access to that /etc/siteconfig.

 

What I don't understand is: 

Why does the system checks if a user has the permission to read that content, that a template needs? 

"anonymous" has no rights to read the code from the components, but they still get exectued?!

View solution in original post

8 Replies

Avatar

Level 10

couple of questions.

Are you able to access /content/geometrixx/en.html without login which is the default behaviour of publisher  ?

When you say it doesnt render, does it throw 404 or is it partially rendered ?

Avatar

Level 4

Did you moved rep:policy node along with your content to publish?

If so, please check for the existence of rep:policy node in publish instandce under your project content path, it might cause the issue. 

Avatar

Former Community Member

bsloki wrote...

couple of questions.

Are you able to access /content/geometrixx/en.html without login which is the default behaviour of publisher  ?

When you say it doesnt render, does it throw 404 or is it partially rendered ?

 

 

  • I installed with "nosamplecontent", so there is no geometrixx.
  • Logged in as admin: renders the page perfectly
  • Being "anonymous":

    java.lang.reflect.InvocationTargetException

    RequestURI=/content/conseil_etat/fr/composition0.html

    Servlet= /apps/global/components/page/basepage/basepage.jsp

 

 

Premkarthic wrote...

Did you moved rep:policy node along with your content to publish?

If so, please check for the existence of rep:policy node in publish instandce under your project content path, it might cause the issue. 

 

  • If I'm logged in as admin, I can see the rep:policy under /content
  • If I'm logged out, I can't see any rep:policy  ( but I guess this is the correct behaviour)

Avatar

Level 4

That is expected behavior.

Did you applied any acl at author and moved the same to publish instance, if so please remove the same from publish and check.

Avatar

Former Community Member

I never replicated any ACL's. I created new ones for the replication agent, but this should not have impacted the "anonymou" user. I did not change the "everyone" group (picture attached).

 

Avatar

Level 10

Is this happening for all the pages or any specific page ? 

Avatar

Correct answer by
Former Community Member

Problem solved:

 

Template from the developers tried to read sth beneath /etc/siteconfig. (some parameters for the website are stored here, like how many news to show, etc...)

"Anonymous" had no access to that /etc/siteconfig.

 

What I don't understand is: 

Why does the system checks if a user has the permission to read that content, that a template needs? 

"anonymous" has no rights to read the code from the components, but they still get exectued?!

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----