gl-events / sylius-admin-saml-plugin
SAML auth SSO plugin for Sylius.
Installs: 77
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 0
Forks: 0
Open Issues: 6
Type:sylius-plugin
Requires
- php: ^8.1
- sylius/sylius: ~1.12.0
Requires (Dev)
- behat/behat: ^3.6.1
- behat/mink-selenium2-driver: ^1.4
- dbrekelmans/bdi: ^1.1
- dmore/behat-chrome-extension: ^1.3
- dmore/chrome-mink-driver: ^2.7
- friends-of-behat/mink: ^1.8
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-debug-extension: ^2.0.0
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- onelogin/php-saml: ^4.2
- phpspec/phpspec: ^7.2
- phpstan/extension-installer: ^1.0
- phpstan/phpstan: ^1.8.1
- phpstan/phpstan-doctrine: 1.3.40
- phpstan/phpstan-strict-rules: ^1.3.0
- phpstan/phpstan-webmozart-assert: ^1.2.0
- phpunit/phpunit: ^9.5
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- robertfausk/behat-panther-extension: ^1.1
- sylius-labs/coding-standard: ^4.2
- sylius-labs/suite-tags-extension: ^0.1.0
- symfony/browser-kit: ^5.4 || ^6.0
- symfony/debug-bundle: ^5.4 || ^6.0
- symfony/dotenv: ^5.4 || ^6.0
- symfony/flex: ^2.2.2
- symfony/intl: ^5.4 || ^6.0
- symfony/web-profiler-bundle: ^5.4 || ^6.0
Conflicts
- symfony/framework-bundle: 6.2.8
This package is not auto-updated.
Last update: 2024-12-18 14:21:00 UTC
README
Features
This plugin allow your admin users to sign in with SAML providers (Google, Azure, Okta, etc.)
Installation
- Add the bundle to your
composer.json
file:
composer require gl-events/sylius-admin-saml-plugin
- Write your Identity Provider informations in your
.env
file:
SAML_IDP_ENTITY_ID= SAML_IDP_SSO_URL= SAML_IDP_SLO_URL= SAML_IDP_CERTIFICATE= SAML_IDENTIFIER_KEY=
- Add your SP private key in your
.env
file (you can generate one at your project root withopenssl genpkey -algorithm RSA -out private.key
):
SAML_SP_PRIVATE_KEY=
- Enable or not the traditionnal sylius admin form login in your
.env
file:
SYLIUS_ADMIN_LOGIN=
- Add the plugin class to your
config/bundles.php
file:
return [ ... GlEvents\SyliusAdminSamlPlugin\GlEventsSyliusAdminSamlPlugin::class => ['all' => true], ];
- Add default config
# config/packages/gl_events_saml_admin_plugin.yaml imports: - { resource: "@GlEventsSyliusAdminSamlPlugin/Resources/config/config.yaml" }
- Add in your
config/security.yaml
file:
providers: saml_provider: id: gl_events.saml_plugin.provider.saml_user firewalls: saml: pattern: ^/saml stateless: true custom_authenticator: gl_events.saml_plugin.security.saml_authenticator main: lazy: true provider: saml_provider access_control: - { path: "%sylius.security.admin_regex%/saml", role: ROLE_SUPER_ADMIN } - { path: "%sylius.security.admin_regex%/login/saml", role: PUBLIC_ACCESS } - { path: "%sylius.security.admin_regex%/login/saml/logout", role: PUBLIC_ACCESS } - { path: "%sylius.security.admin_regex%/login/saml/acs", role: PUBLIC_ACCESS } - { path: "%sylius.security.admin_regex%/login/saml/sls", role: PUBLIC_ACCESS } - { path: "%sylius.security.admin_regex%/login/saml/metadata", role: PUBLIC_ACCESS }
- Add in your
config/routes.yaml
file:
glevents_sylius_admin_saml_plugin: resource: "@GlEventsSyliusAdminSamlPlugin/Resources/config/routing.yml"
You are now ready to go ! 🚀
Credits
Developed by GL Events.