<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y00009Y2ZMBSA3Okta Classic EngineAuthenticationAnswered2024-01-11T03:00:42.000Z2020-10-01T20:27:25.000Z2020-12-23T22:44:05.000Z

ServiceM.47051 (Customer) asked a question.

Problem with sporadic Correlation Failed exception for dotnet core OIDC web application

Hi! 

 

I am struggling with an issue that seems to be hard to troubleshoot: 

The application I am referring to authenticates users to a financial application. In the Okta portal, the application is configured as Open ID Connect with Authorization Code. The URI where Okta is sending the authn response is configured correctly. We are hosting the Okta sign-in widget as part of the application.

 

The application resides on several web servers behind a load balancer. Ever since we went live with our authentication, we had to enable session affinity to make sure that every request pertaining to the same authentication would be routed to the same web server where the authentication originated. This setup worked well for a while until we started to utilize services from Akamai to protect our applications from malicious traffic. Ever since users have been accessing our authentication via the Akamai edge servers, we have been seeing the occasional "Correlation Failed" exception. If I had to put a number on it, I would say it's far less than 1% of all authentications. The problem became worse when we tried to introduce a feature from Akamai that reduces the number of servers from Akamai to go to Origin (Okta and our web application). This was needed to facilitate some sign-on policy rules to work correctly by being able to list all Amakai edge servers as proxies. The Akamai service that facilitates this is called SiteShield.

 

Having googled the "Correlation Failed" exception in conjunction with oauth, it seems that this is a pretty common problem where the IDP callback to the `.../authorization-code/callback` endpoint results in dotnet core not being able to correlate the request to the original authn request because of some reason. We initially thought that using data protection would solve the problem in case our load balancer was somehow routing callback to the wrong server - maybe because of some header changes that Akamai was introducing. Even after adding data protection (all servers use the same secret to en/de-crypt cookies), the problem still existed.

 

I was wondering if anybody else had encountered this problem or had any idea how to troubleshoot it. Our application setup follows the recommendations by Okta.

 

Thanks for any pointers anybody might be able to provide.


  • KJM.50446 (Customer)

    After 3 months, has there been any updates to this? We get the same error.

  • ServiceM.47051 (Customer)

    If you are not already using Data Protection, make sure you do. If you are, look into whether it's working as expected. To be safe, set the application name.

     

    For a dotnet core app:

    services.AddDataProtection()

    .SetApplicationName("MyAuthApp")

    ...;

     

    By default the absolute path on each server is used to set the common denominator between each box your app is running on. If the path is slightly different, then DataProtection will not work, and you might see more Correlation errors.

    Expand Post
  • KJM.50446 (Customer)

    Yeah still getting that error. I wonder if it's because I'm not using https on the development server.

This question is closed.
Loading
Problem with sporadic Correlation Failed exception for dotnet core OIDC web application