laravel-saml2 icon indicating copy to clipboard operation
laravel-saml2 copied to clipboard

INVALID_RESPONSE : The response was received at http://... instead of https://...

Open avecNava opened this issue 6 years ago • 10 comments

I am seeing this error with remove_mcrypt branch. Any suggestions what went missing?

The response was received at http:/xxx/saml2/acs instead of https://xxx/saml2/acs

array:1 [▼ 0 => "invalid_response" ]

avecNava avatar Jun 19 '18 06:06 avecNava

@avecNava i have this issue too.

lvidal1 avatar Jun 27 '18 00:06 lvidal1

I was wonder if my callback url is set to https, and urls on my metadata are using https, how come does error message claims request has gone through http?

lvidal1 avatar Jun 27 '18 00:06 lvidal1

Do you happen to use a proxy? In that case, make sure to set

'proxyVars' => true,

in saml2settings.php and make sure the server generates the Forwarded headers.

danmichaelo avatar Jun 30 '18 17:06 danmichaelo

@lvidal1 Hi have you fix this ? I have the same errors, and i set the proxyVars to true, but nothing change, still the same errors

Saml2 error_detail {"error":"The response was received at http://.../saml2/acs instead of https://.../saml2/acs"}

devglrd avatar Sep 09 '19 10:09 devglrd

Thanks set proxyVars to true fix this

devglrd avatar Sep 15 '19 08:09 devglrd

'proxyVars' => true, doesn't help if your SP entityId and/or SP assertionConsumerService and/or SP singleLogoutService are empty in your config. My solution https://github.com/aacotroneo/laravel-saml2/issues/213#issuecomment-790875829

jrbecart avatar Mar 04 '21 19:03 jrbecart

wich parameter are "SP entityId and/or SP assertionConsumerService and/or SP singleLogoutService "?

I have same issue, i'm using docker with nginx in background

Is correct?

image

sefirosweb avatar Jul 14 '21 19:07 sefirosweb

Config your Webserver / proxy to add headers such as: HTTP_X_FORWARDED_PROTO HTTP_X_FORWARDED_PORT

in config/saml2_settings.php 'proxyVars' => true,

diederikdr avatar Mar 11 '22 08:03 diederikdr

@sefirosweb wich parameter are "SP entityId and/or SP assertionConsumerService and/or SP singleLogoutService "?

I have same issue, i'm using docker with nginx in background

Is correct?

image

Hi friend, did you manage to solve this problem? I'm trying to find the solution but without success! I am also running the application via nginx inside a docker. I've tried everything but nothing worked! When I run it locally I don't have any problems now when I point it to my server with SSH it always returns all requests as HTTP instead of HTTPS.

nagibi avatar Mar 27 '23 02:03 nagibi

Config your Webserver / proxy to add headers such as: HTTP_X_FORWARDED_PROTO HTTP_X_FORWARDED_PORT

in config/saml2_settings.php 'proxyVars' => true,

@diederikdr Good evening friend, could you show the NGINX configuration file? I already tested several configurations but without success! Requests keep returning with HTTP instead of HTTPS. I'm running the application via docker with NGINX.

{"error":["invalid_response"],"last_error_reason":"Invalid audience for this Response (expected 'http://sso.ibigan.app/saml2/test/metadata', got &#039 ;https://sso.ibigan.app/saml2/test/metadata')"}

nagibi avatar Mar 27 '23 02:03 nagibi