Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Qlik Cloud: State not valid, missing request forgery protection when trying to authenticate

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Damien_Villaret
Support
Support

Qlik Cloud: State not valid, missing request forgery protection when trying to authenticate

Last Update:

Apr 11, 2023 4:53:47 AM

Updated By:

Sonja_Bauernfeind

Created date:

Apr 11, 2023 4:08:52 AM

Authenticating to Qlik Cloud fails with:

"errors":[{"title":"State verification failed","detail":"State not valid, missing request forgery protection","code":"STATE-1","status":"401"}],"traceId":"XXXXXXX"}

 

Resolution

This error will show up when the state sent during the authentication request does not match the eas.rfp cookie created at the same time.

This is the basic workflow for the authentication process:

  1. The user accesses the tenant URL (directly or embedded in an iFrame or mashup), Qlik Sense redirects  to the Identity Provider and at the same time instructs the browser to create a cookie in the browser called eas.rfp.XXXX (XXXX is a random string), this cookie will be used to check if the state parameter hasn't been forged when the Identity Provider sends back the user to Qlik Sense.
  2. User inputs credentials on the Identity Provider page and then gets redirected back the user to Qlik Sense
  3. Qlik Sense checks the state parameter against the eas.rfp.XXXX cookie saved in the browser to see if it hasn't been forged, if it cannot find the cookie with the value is initially created or if the values do not match, then it will throw the mentioned error.

 Therefore, the following need to be checked when getting the error:

  • Is the eas.rfp correctly created in the browser? If not, check the browser settings and make sure that cookies are allowed for Qlik Sense. Some browsers will forbid cookies by default when the site is embedded.
  • Is the state parameter seen in the URL when getting redirected keeps the same value during the whole authentication process ? Using the Browser devtools with the "Preserve log" on should help you visualize this.

 

Environments:

Qlik Cloud 

Labels (1)
Version history
Last update:
‎2023-04-11 04:53 AM
Updated by: