Closed JJefferyDev closed 1 year ago
@JJefferyDev 👋
I'm a little confused if this is one issue or a handful of issues so I broke things up like you did below.
1)
can't create a key pair with the create key pair button
what issues did you have here? Was there an error? You can use the wildcard cert but it might be more secure to use a self signed cert. That key is stored in the db and that’s not something you want leaked somehow.
See docs here: https://saml-sp.flipboxfactory.com/configure/keychain.html
2)
how come there is no response from the application after a successful login on the Azure AD side?
Not sure I understand what is happening here ... like, what behavior you are seeing. When you login successfully from Azure AD you should be redirected back to the Craft site. Can you explain the process here more if you think there's an issue?
3)
qualified MFA, accessing the enterprise application, but no response back from the server (our website)
MFA will happen on the IdP side/Azure AD and shouldn't have any effect on the Craft plugin. If they fail MFA on Azure AD, they won't be redirected with authorization to log into Craft.
4) If this issue is all circulating around this error "Exception: Signature required but not found: Response", follow the instructions on the FAQ. There is a signature on the Assertion and that will be validated. That should suffice security concerns.
I've sent much more detailed information to your hello@flipboxfactory.com email with screenshots. My replies below: 1) When I click the "create keypair" button, all I get is an "unknown server error" message in Craft and I can't find the error in the logs. We use a wildcard cert for all of our websites that are run off of Windows IIS. 2) When I log in through Azure I am redirected back to the Craft site, but I immediately get the error page I emailed you. I have posted it again here. 3) It successfully redirects back to Craft. 4) We aren't sure if this issue is specifically for this error, because of our attempt to work around the keypair issue we had earlier. Please let me know if this is a cert issue or something else.
Can you send the email to damien at flipbox digital ?
@dsmrt I've forwarded you the emails I sent to the other emails. Mine is jessica dot jeffery at bcogc dot ca if you can't find them. Thanks for your help :)
It seems like the key generation error is due to it running on a windows server that may not support openssl. This is just a guess. If you can create a key pair based on my instructions posted in my previous comment, that should work.
The error is due to the default behavior enforcing the strictest security possible. Follow the faq you posted to fix it. Here is the link: https://saml-sp.flipboxfactory.com/faqs.html#signature-required-but-not-found
Once you add the config, you’ll be one step closer!
@dsmrt Good news, creating the new keypair and setting up the saml-sp config file to ignore the response seemed to have worked, but now I get a 403 error. I assume this 403 error is because there is no corresponding user already on my website that matches the one in my Azure AD. Is there a way through your plugin to download users so I don't have to do that part manually? Please see stack trace screenshot below:
@dsmrt Another update: I've been able to successfully login after properly setting up the mapping with a current user on my website and a user in Azure AD, so that's great. My concerns now are:
'requireResponseToBeSigned' => false,
and I would like to make this true, how do I got about getting that working?Thanks a million!!!!
SAML protocol sends the user data over at the time of login in the response assertions. The plugin will create craft users by default. Note that azure ad by default will send the user over with a uuid as the username (in the NameID) so if you need this to work differently, search our docs on nameid.
If you want the Response to be signed in Azure Ad (as well as the Assertions) see the docs here: https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/certificate-signing-options That is something you set on the Azure AD side.
@dsmrt fantastic, thank you so much!!!!
Hi @JJefferyDev , Is everything working here? Can we close this out?
Hi Damien, I can get it to work but I can't get one of the security configs to work. I will troubleshoot with my cybersec team and get back to you. But for now you can close this ticket, thank you.
@JJefferyDev OK Let me know if there's something else I can help with.
We have several issues and questions related to our attempt to setup a SAML single sign on between our Craft 3 website and Azure AD:
Exception: Signature required but not found: Response in D:\inetpub\wwwroot\stores-dev\vendor\flipboxfactory\saml-sp\src\validators\SignedElement.php:51 Stack trace:
0 D:\inetpub\wwwroot\stores-dev\vendor\flipboxfactory\saml-sp\src\validators\Response.php(86): flipbox\saml\sp\validators\SignedElement->validate()
1 D:\inetpub\wwwroot\stores-dev\vendor\flipboxfactory\saml-sp\src\controllers\LoginController.php(113): flipbox\saml\sp\validators\Response->validate()
2 [internal function]: flipbox\saml\sp\controllers\LoginController->actionIndex()
3 D:\inetpub\wwwroot\stores-dev\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array()
4 D:\inetpub\wwwroot\stores-dev\vendor\yiisoft\yii2\base\Controller.php(178): yii\base\InlineAction->runWithParams()
5 D:\inetpub\wwwroot\stores-dev\vendor\yiisoft\yii2\base\Module.php(552): yii\base\Controller->runAction()
6 D:\inetpub\wwwroot\stores-dev\vendor\craftcms\cms\src\web\Application.php(293): yii\base\Module->runAction()
7 D:\inetpub\wwwroot\stores-dev\vendor\yiisoft\yii2\web\Application.php(103): craft\web\Application->runAction()
8 D:\inetpub\wwwroot\stores-dev\vendor\craftcms\cms\src\web\Application.php(278): yii\web\Application->handleRequest()
9 D:\inetpub\wwwroot\stores-dev\vendor\yiisoft\yii2\base\Application.php(384): craft\web\Application->handleRequest()
10 D:\inetpub\wwwroot\stores-dev\web\index.php(21): yii\base\Application->run()
11 {main}
I've sent an email with more sensitive screenshots to your hello@flipboxdigital.com.