Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SP Signing Certificate - Store details #109

Open
ntbutler-nbcs opened this issue Dec 9, 2024 · 0 comments
Open

SP Signing Certificate - Store details #109

ntbutler-nbcs opened this issue Dec 9, 2024 · 0 comments

Comments

@ntbutler-nbcs
Copy link

ntbutler-nbcs commented Dec 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant