How to restrict page view with CUG when SAML authentication is configured | Community
Skip to main content
December 17, 2024
Solved

How to restrict page view with CUG when SAML authentication is configured

  • December 17, 2024
  • 1 reply
  • 722 views

We are using SAML authentication to access our site. Within same content tree, I want to restrict access to some pages based on user group. The AEM groups are synced based on SAML response.

 

Is this possible by adding CUG without configuring Login Page? Is there another solution to achieve this?

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

1 reply

arunpatidar
Community Advisor
Community Advisor
December 17, 2024

Hi @abhijit_thete 

Yes, you need to add CUG (Closed User Group) groups to the pages that are meant to be restricted.

Arun Patidar
December 17, 2024

I created a CUG and added required permission, enabled authentication but it did not worked. My structure is

 

/content/site  SAML authentication required for this path. User is added to groups available in SAML response. If user has GroupA, it is added in AEM GroupA.

 

Requirement particular page from /content/site should be accessible to users belonging to GroupA only

/content/site/pageA - This page should be accessible to users from GroupA only.

 

I tried editing pageA properties and added Authentication required, permissions for GroupA but it does not worked. Users not member of GroupA can still access pageA.

 

konstantyn_diachenko
Community Advisor
Community Advisor
December 18, 2024

Hi @abhijit_thete ,

 

Do you test it through publisher or dispatcher? 

 

If the 2nd option, you will need to check a cache. Probably you cache authorized data. Check the /allowAuthorized in the dispatcher configuration.

 

Best regards,

Kostiantyn Diachenko.

Kostiantyn Diachenko, Community Advisor, Certified Senior AEM Developer, creator of free AEM VLT Tool, maintainer of AEM Tools plugin.