-
Notifications
You must be signed in to change notification settings - Fork 83
SP Signing Certificate - Store details #109
Description
Hi all.
I'm trying to build an app that has more of a front-end to manage SAML settings. How can I get the laravel-saml2 package to pull the certificate from somewhere other than the .env file?
In the /config/saml2.php file, the comment on the SP Certificates seems to indicate that the files could be stored in a particular folder, but I haven't been able to figure out how to get that to work. The actual config seems to simply pull the values from the .env file.
/*
|--------------------------------------------------------------------------
| SP Certificates.
|--------------------------------------------------------------------------
|
| Usually x509cert and privateKey of the SP are provided by files placed at
| the certs folder. But we can also provide them with the following parameters.
|
*/
'x509cert' => env('SAML2_SP_CERT_x509',''),
'privateKey' => env('SAML2_SP_CERT_PRIVATEKEY',''),Part of my plan is to incorporate the idea from PR #81 (commit 026d5b7) to make cert generation/renewal simple. Ideally if the files are just generated into a target folder that the SAML2 plugin picks up from, that'd be awesome.
At this stage, I don't seem to get anywhere at all if I don't have the SAML2_SP_CERT_x509 and SAML2_SP_CERT_PRIVATEKEY properties in the .env file. Until I enter and populate those, I just get this error when I try to auth
OneLogin\Saml2\Error
Invalid array settings: sp_certs_not_found_and_required