After SAML login "/content" is added in the URL. | Community
Skip to main content
Anmol_Bhardwaj
New Participant
Jan 12, 2022 8:19 AM UTC
Solved

After SAML login "/content" is added in the URL.

I am trying to add CUG through SAML login for a portion of my website. 

The login is working fine in author. But, when in publisher with dispatcher , I am getting 404 after I login.

I can notice after login "/content" is added to the URL , which should not be present.

 

Do I need to write a new dispatcher rule for this or change something in the OSGi configuration of Granite SAML authenticator , I already have internal redirect to change /content to /. 

Also, after it shows 404 , and I try to go to a protected page, it works fine after login. The issue only exists at the first time of logging in.

 

Can anyone please help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ApmagAccepted solution
Level 3
Jan 12, 2022 5:13 PM UTC

Hi ,

 

Here are 2 things

     1) ACS callback URL is not a shot URL  OR

     2) Dispatcher is modifying your ACS URL-Short URL with rewrite rules.

 

So dispatcher side need to write -RULE    [PT,L] 

 

Thanks,

nani.

3 replies

ApmagAccepted solution
Level 3
Jan 12, 2022 5:13 PM UTC

Hi ,

 

Here are 2 things

     1) ACS callback URL is not a shot URL  OR

     2) Dispatcher is modifying your ACS URL-Short URL with rewrite rules.

 

So dispatcher side need to write -RULE    [PT,L] 

 

Thanks,

nani.

Translate
Vijayalakshmi_S
Level 10
Jan 12, 2022 2:21 PM UTC

Hi @anmol_bhardwaj 

Could you please let know the

  • "Path", "Default Redirect" and "ACS URL" property that you have set on SAML config (If possible, share the screenshot of your SAML config)
  • Path on which CUG is enabled. 
Translate
Anmol_Bhardwaj
New Participant
Jan 13, 2022 8:37 AM UTC

Hi @vijayalakshmi_s ,

 

I have not used Granite SAML authenticator config.

We have used AEM CUG, and configured login page with Granite Login Authentication Service. 

So don't have any Default Redirect and ACS URL, just have content/wknd/en/login: content/wknd/en/home,

like this.

 

path on which CUG enabled : /content/wknd/en/home and child pages of home.

 

This is working fine in author, when I login it redirects me to the page / deep link within hierarchy where I want to go, but with dispatcher, it redirects to the right url, but with a /content added to the url and hence throws a 404.

The thing is , dispatcher is configured to shorten URL and rewrite /content to /, but just in this scenario where I login , it is not shortening.

Translate