Problem/Motivation
Observed in Acquia Site Factory, when using version 3.3 of the module, trying to login to a site leads to the following error, and not being able to login:
Error encountered while processing SAML authentication response; details have been logged
In the syslog we get the following error report:
http://site.com/saml/acs||0||RuntimeException encountered while processing SAML authentication response: Error(s) encountered during processing of authentication response. Type(s): invalid_response; reason given for last error: Signature validation failed. SAML Response rejected in Drupal\samlauth\SamlService->processLoginResponse() (line 413 of /mnt/www/html/site01test/docroot/modules/contrib/samlauth/src/SamlService.php). request_id="v-32f867ac-cced-11eb-ba52-9ff459077ed1"
Going back to version 3.2 of the module, this problem is no longer encountered.
Steps to reproduce
Install version 3.3+ of the module in ACSF. Attempt to login.
Proposed resolution
Add patch to acsf module, published at #3218895: Compatibility with samlauth >= 8.3.
(This issue is "Active" to get all ACSF people's attention, when they browse the samlauth queue / possibly add comments. But it will not see any further work.)
Comments
Comment #2
roderikWhile I was typing up a response, I realized the acsf_sso module needs an update for this. Did I just break the compatibility contract by ceasing to use a certain configuration value? :( Then I have to keep that in mind for the future.
I'll whip up a draft patch (untested because no access to ACSF).
Comment #3
roderikPatch posted in #3218895: Compatibility with samlauth >= 8.3 for your review.
I'm not sure that this is officially a breach of an implicit compatibility contract... the error happens because acsf_sso overwrites config values at runtime, which is an edge case.*
Still, it's dumb of me not to consider/check ACSF before releasing a new version.
* I think this happens only on non-live environments. Live environments are OK because they don't get config values injected at runtime. On non-live environments, the login process now sees the (saved) 'live' IdP certificate - which is why you get a "Signature validation failed" error, not a "Certificate not found".
Comment #4
roderikComment #5
jcnventuraJust some info from the original reporter here. I'd be happy if this is closed as a duplicate of #3218895: Compatibility with samlauth >= 8.3.
We've frozen samlauth to 3.2 for now until Acquia releases the next acsf module version. I think this is way easier to test by someone who doesn't need to use a much heavier client site setup to test this. Hopefully someone at Acquia can make sure of that.
Thanks a lot for the fast work on identifying the problem!
Comment #6
roderik+1 for freezing samlauth to 3.2 (for anyone who doesn't somehow need any of the features added in 3.3). ACSF historically isn't quick with its module updates.
I'll keep this issue open so the title stays in the queue... without doing work on it.
Comment #7
kevinquillen commentedThis just happened to me as well, is the recommendation to pin to version 3.2? We are using Site Factory and just can't have the SSO logins be broken for non production sites.
Comment #8
roderikMy recommendation would be to pin to version 3.2 unless you need new features from 3.3 (Key module support). In that case, patch acsf module with the patch in the related issue.
Comment #9
minkahb commentedHi,
I have a site on Drupal 9.5.3, with php 8.3.2. I installed samlauth 8.x-3.8 via composer. I wanted the ACS url to return as https instead of http.
I enabled various reverse_proxy values in settings.php and now I see the ACS url with https, but I get the error "invalid_response; reason given for last error: Signature validation failed. SAML Response rejected" .
I went back to samlauth 8.x-3.2, and I am still getting the error "invalid_response; reason given for last error: Signature validation failed. SAML Response rejected".
Comment #10
minkahb commentedI reverted to samlauth 8.x-3.8 and was able to get this to work once I used the correct certificate.
This is what I had to enable in /var/www/devportal/web/sites/default/settings.php :
$settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy_addresses'] = [$_SERVER['REMOTE_ADDR']];
Comment #11
kevinquillen commentedDoes this work with Acquia Connector 4?
Comment #12
roderik@kevinquillen - I believe the answer is "yes; this issue only applies to the ACSF module specifically". (The Acquia Connector module has nothing to do with this error.)
Please check my reasoning:
Then there's no issue. Specifics: ACSF has a custom (not equal to the 'regular') Acquia dashboard for managing its cookie-cutter sites, and people can log into their individual sites from the dashboard. That is -- this custom ACSF dashboard acts like a SAML IdP, and the bug is specifically in the auto-configuration of that Acquia IdP.
---
@minkahb - for completeness (to the other issue readers)
Comment #13
roderikComment #14
roderik#3218895: Compatibility with samlauth >= 8.3 was fixed 8 months ago.