surfnet / stepup-gssp-bundle
A Symfony 6 扩展包,用于辅助创建 GSSP(通用 SAML Step-up 提供商)设备支持。
Requires
- php: ^8.2
- ext-openssl: *
- beberlei/assert: ^3
- surfnet/stepup-saml-bundle: ^6.0
- symfony/dependency-injection: ^6.4
- symfony/framework-bundle: ^6.4
- symfony/monolog-bundle: ^3.8
Requires (Dev)
- behat/behat: ^3.13
- jakub-onderka/php-parallel-lint: ^1
- malukenho/docheader: ^0
- mockery/mockery: ^1.5
- overtrue/phplint: *
- phpmd/phpmd: ^2.13
- phpstan/phpstan: ^1.10
- phpstan/phpstan-symfony: ^1.3
- phpunit/phpcov: ^8.2
- phpunit/phpunit: ^9.6
- sebastian/phpcpd: ^6.0
- slevomat/coding-standard: ^8.13
- squizlabs/php_codesniffer: ^3.7.1
- symfony/phpunit-bridge: ^6.4
- dev-main
- 5.1.0
- 5.0.12
- 5.0.11
- 5.0.10
- 5.0.9
- 5.0.8
- 5.0.7
- 5.0.6
- 5.0.5
- 5.0.4
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 3.0.0-alpha.4
- 3.0.0-alpha.3
- 3.0.0-alpha.2
- 3.0.0-alpha.1
- 2.1.0
- 2.0.0
- 1.2.0
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- dev-feature/stan
- dev-feature/remove-homestead
- dev-release/4.0
- dev-release/3.0
This package is auto-updated.
Last update: 2024-08-24 14:22:19 UTC
README
通用 SAML Stepup 提供商 扩展包。
安装
- 将包添加到您的 Composer 文件中
composer require surfnet/stepup-gssp-bundle
- 将扩展包添加到您的内核中
app/AppKernel.php
public function registerBundles() { // ... $bundles[] = new Surfnet\SamlBundle\SurfnetSamlBundle(); $bundles[] = new Surfnet\GsspBundle\GsspBundle(); }
配置
config.yml
surfnet_saml: hosted: identity_provider: enabled: true service_provider_repository: surfnet_gssp.saml.service_provider_repository sso_route: sso public_key: "%saml_idp_publickey%" private_key: "%saml_idp_privatekey%" metadata: entity_id_route: gssp_saml_metadata public_key: "%saml_metadata_publickey%" private_key: "%saml_metadata_privatekey%" remote: identity_provider: enabled: true entity_id: "%saml_remote_idp_entity_id%" sso_url: "%saml_remote_idp_sso_url%" certificate_file: "%saml_remote_idp_certificate%" surfnet_gssp: registration_route: '<your-registration-route>' authentication_route: '<your-authentication-route>'
有关“surfnet_saml”配置的更多信息,请参阅Saml 扩展包文档
在示例控制器中查看“surfnet_gssp”路由的工作示例
AuthenticationService 和 RegistrationService 是应用程序与该扩展包交互的 API。这两个服务都提供了一个如何在控制器操作中使用它们的示例。
routing.yml
gssp_saml: resource: '@SurfnetGsspBundle/Resources/config/routing.yml'
parameters.yml
parameters: saml_idp_publickey: '%kernel.root_dir%/../vendor/surfnet/stepup-saml-bundle/src/Resources/keys/development_publickey.cer' saml_idp_privatekey: '%kernel.root_dir%/../vendor/surfnet/stepup-saml-bundle/src/Resources/keys/development_privatekey.pem' saml_metadata_publickey: '%kernel.root_dir%/../vendor/surfnet/stepup-saml-bundle/src/Resources/keys/development_publickey.cer' saml_metadata_privatekey: '%kernel.root_dir%/../vendor/surfnet/stepup-saml-bundle/src/Resources/keys/development_privatekey.pem' saml_remote_idp_entity_id: 'https://pieter.aai.surfnet.nl/simplesamlphp/saml2/idp/metadata.php' saml_remote_idp_sso_url: 'https://pieter.aai.surfnet.nl/simplesamlphp/saml2/idp/SSOService.php' saml_remote_idp_certificate: '%kernel.root_dir%/../vendor/surfnet/stepup-gssp-bundle/src/Resources/keys/pieter.aai.surfnet.nl.pem'
这是与 pieter.aai.surfnet.nl idp 一起工作的示例 idp 配置。
开发环境
开发环境的目的仅限于运行不同的测试和指标工具。
要开始,首先设置开发环境。开发环境是一个 docker 容器。它通过 OpenConext-devconf 项目进行控制。
下面描述的每个任务都应该从该容器中运行。
要求
- Docker
- OpenConext-devconf
调试
在配置您的开发 Vagrant 盒子时配置了 Xdebug。它配置了自动连接 IDE_KEY=phpstorm 和 xon
在 cli 环境中。
测试和指标
要运行所有必要的测试,您可以从开发环境中运行以下命令
composer test
每个部分都可以单独运行。检查 composer.json 文件中的“scripts”部分以获取不同的选项。
发布说明
请阅读:https://github.com/OpenConext/Stepup-Deploy/wiki/Release-Management 了解 Stepup 项目中使用的发布策略的更多信息。