External Redirect to AEM is returning 403

Avatar

Avatar
Ignite 1
Level 2
Sachindey11
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile

Avatar
Ignite 1
Level 2
Sachindey11
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile
Sachindey11
Level 2

17-07-2020

I am getting redirected from an payment gateway page to AEM page. However i am getting 403 error when i redirect.

Tried to redirect to we-retail page as well but the same issue persists.

Replies

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

17-07-2020

Hi,

Is this a post request or a get request?

Avatar

Avatar
Ignite 1
Level 2
Sachindey11
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile

Avatar
Ignite 1
Level 2
Sachindey11
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile
Sachindey11
Level 2

17-07-2020

Its a post request. Payment Gateways frame is injected into AEM page and then we redirect to bank page and back to AEM page.

Avatar

Avatar
Validate 1
MVP
ArpitVarshney
MVP

Likes

136 likes

Total Posts

185 posts

Correct reply

36 solutions
Top badges earned
Validate 1
Establish
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
MVP
ArpitVarshney
MVP

Likes

136 likes

Total Posts

185 posts

Correct reply

36 solutions
Top badges earned
Validate 1
Establish
Give Back 5
Give Back 3
Give Back 25
View profile
ArpitVarshney
MVP

17-07-2020

Hi @Sachindey11 

If you are working on your local machine and have created a sling servlet to make post request to local AEM Server , you may be getting 403 Error Code : Forbidden
This issue is due to CSRF Filter blocking POST Requests.

You can unblock this via OSGi Configuration. You shouldn't be doing it on production instances.

  1. Go to http://localhost:4502/system/console/configMgr
  2. Find Adobe Granite CSRF Filter 
  3. Remove POST from Filter Methods
  4. Save and Test the servlet again.



Avatar

Avatar
Ignite 1
Level 2
Sachindey11
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile

Avatar
Ignite 1
Level 2
Sachindey11
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile
Sachindey11
Level 2

17-07-2020

Thanks Arpit. I have already done that but still i get the below error...Status 500 Message java.lang.IllegalArgumentException: Value for key response-signature-base64 can't be put into node:

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

17-07-2020

Can you check the logs then, Post request may be blocked because of Apache Sling Referrer Filter, check this https://aem6solutions.wordpress.com/2015/06/19/apache-sling-referrer-filter/ article and configure source host in allow host section to allow post request from another host/domain. You may see CORS issue if injecting using Ajax but that is another topic.

Avatar

Avatar
Ignite 1
Level 2
Sachindey11
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile

Avatar
Ignite 1
Level 2
Sachindey11
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile
Sachindey11
Level 2

17-07-2020

I have already done all the settings at felix console level, however those did not help.

Avatar

Avatar
Ignite 1
Level 2
Sachindey11
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile

Avatar
Ignite 1
Level 2
Sachindey11
Level 2

Likes

4 likes

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 3
Boost 1
View profile
Sachindey11
Level 2

17-07-2020

I have already done all the settings at felix console level, however those did not help. But i was able to resolve the issue by using the ".external" selector and then passing the selector in the url. There is an out of the box external.post.jsp which handles anything with .external selector. Thanks community guys for responding quickly.

Avatar

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

593 likes

Total Posts

705 posts

Correct reply

207 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

593 likes

Total Posts

705 posts

Correct reply

207 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile
asutosh_jena
Level 10

17-07-2020

@Sachindey11 Are you trying to post something while redirecting or it's just a 301/302 redirect to a static page in AEM?