AEM as Cloud Service CUG not working as expected | Community
Skip to main content
Level 2
February 23, 2022

AEM as Cloud Service CUG not working as expected

  • February 23, 2022
  • 3 replies
  • 2297 views

Hi everyone,

On aem sites as cloud services i have my web content structured as following:

mysite/it/otherpages

mysite/en/otherpages

 

i have activated the proerty "enable authentication" and i have added a closed user group just for "it" section not for "en", by activating my my pages, user and group i am expecting on publish server that whenever a user tries to browse the "it" section aem must require authentication through the login page but the en section remains accessible to anonymous users. But in reality aem require authentication for "it" section  which is fine but "en" section is no more accessible for anonymous user aem return 404.

 

i have already tried to use Apache Sling Authentication Service as alternative but the outcome remains same.

 

Thanks in advance!

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

arunpatidar
Community Advisor
Community Advisor
February 23, 2022

Are you using MSM for creating mysite/it/otherpages pages?

Arun Patidar
Level 2
February 23, 2022

Hi Arun,

no they are created manually through page creation procedure. if it can help i would like to share that they use static templates.

arunpatidar
Community Advisor
Community Advisor
February 24, 2022

ok,

are en page accesible with login? can you check anonymous user and if that missing everyone group?

Arun Patidar
Raja-Karuppsamy
Community Advisor
Community Advisor
February 24, 2022

@junaids28771920 

Can you clarify from where you are getting 404 Error for "en" page ( Publisher or Dispatcher ) if you are getting 404 error from dispatcher, tail your dispatcher log for the "en" page request and validate your resource resolver or etc mapping configuration for "en" content path in the publisher instance.

 

Regards,

Raja

Level 2
February 24, 2022

@raja-karuppsamy i'm getting the 404 error for en page on publish. Could you please elaborate "validate your resource resolver or etc mapping configuration for "en" content path in the publisher instance."?

 

Thanks a lot.

 

Junaid

Anmol_Bhardwaj
Community Advisor
Community Advisor
February 24, 2022

Hi @junaids28771920 ,

If possible, can you please share the Apache Sling Authentication Service URL mapping & login page which you have added in the OSGi config.

Level 2
February 24, 2022

Hi @anmol_bhardwaj please feel free to point out any mistake and share your suggestions

{
"auth.annonymous":true,
"auth.sudo.cookie":"sling.sudo",
"auth.http.realm":"Sling (Development)",
"sling.auth.requirements":[
"+/libs/granite/oauth/content/authorization",
"+/content/mysite/it",
"-/content/mysite/en"
],
"sling.auth.anonymous.user":"",
"auth.uri.suffix":[
"/j_security_check"
],
"auth.http":"preemptive",
"auth.sudo.parameter":"sudo"
}

 Thanks

Anmol_Bhardwaj
Community Advisor
Community Advisor
March 4, 2022

Hi @anmol_bhardwaj 

i have followed steps as you suggeste but the issue is still there the outcome remains unchanged.

 

Thanks


Have you deleted the existing changes which you have already done. Maybe one of them is causing this.

 

Also, the path should include my-site/it/*, to make sure it only picks up pages inside it.

 

I have used this way for CUG login multiple times(6.5.8,6.5.10,6.5.11), and it works.