codegreencreative / laravel-samlidp

Laravel SAML IdP
MIT License
230 stars 81 forks source link

Loading SP certificate from file #89

Open qwertz182 opened 2 years ago

qwertz182 commented 2 years ago

If 'samlidp.encrypt_assertion' is set to true, the SP certificate is needed. It would be great if it was possible to add it from a file instead of placing that long ugly certificate string inside the .env file.

In the package "aacotroneo/laravel-saml2" this is done in the config by adding a prefix like this:

'x509cert' => 'file://' . storage_path('samlsp/cert.pem'),

As far as I could see in the code, the LightSaml package offers a loadFromFile() method in the X509Certificate class.

Regards,

upwebdesign commented 2 years ago

@as-dialoggroup nice suggestion. Yes, I like this idea. Time is sparse these days, so I will mark this as an enhancement. In the meantime, if you have some time to create a PR, I would make the time to review it. If not thats cool. Thanks for sharing your idea!

qwertz182 commented 2 years ago

I guess I could do that. Can't guarantee it the next days, but I'd be happy to it