SAML 和 PHP 入门
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2094136/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Getting Started with SAML and PHP
提问by Mike B
I'm beginning work on adding SAML SSO support to a project and am looking for any helpful resources specifically geared towards PHP. I understand the basic concepts and have poked around for any libraries that could help but have come up empty. The only thing I've found is simpleSAMLphpwhich appears to be an entire stack.
我正在开始向项目添加 SAML SSO 支持,并且正在寻找任何专门针对 PHP 的有用资源。我了解基本概念,并四处寻找任何可以提供帮助但空洞的库。我发现的唯一东西是simpleSAMLphp,它似乎是一个完整的堆栈。
Any tips for integrating SAML into an existing project? Bonus points for Zend-Framework related suggestions!
将 SAML 集成到现有项目中的任何提示?Zend-Framework 相关建议的加分项!
回答by sk_
I think that SimpleSAMLPHP is the way to go to make your application act as a full-fledged SAML 2.0 Service Provider. It's indeed a complete stack, but you can narrow down the functionalities to the bare minimum.
我认为 SimpleSAMLPHP 是让您的应用程序充当成熟的 SAML 2.0 服务提供者的方法。它确实是一个完整的堆栈,但您可以将功能缩小到最低限度。
From my experience, configuration is a lot simpler than with Shibboleth. This step is simplified with the configuration website that ships with the distribution package.
根据我的经验,配置比使用 Shibboleth 简单得多。使用分发包随附的配置网站简化了此步骤。
The impact on each PHP page is relatively small: http://simplesamlphp.org/docs/1.8/simplesamlphp-sp#section_6
对每个PHP页面的影响比较小:http: //simplesamlphp.org/docs/1.8/simplesamlphp-sp#section_6
This is the solution we opted for on our Zend environment.
这是我们在 Zend 环境中选择的解决方案。
回答by Boy Baukema
We used the PHP-SAML toolkit from OneLoginfor a project that worked used non-transparant proxies (simpleSAMLphp didn't like not knowing the URL it was hosted on).
我们将 OneLogin 的 PHP-SAML 工具包用于一个使用非透明代理的项目(simpleSAMLphp 不喜欢不知道它托管的 URL)。
It is dead simple supporting the most basic login, but SAML 2.0 is a huge spec and it may not support what you want from it (for instance it doesn't support signing Authentication Requests).
支持最基本的登录非常简单,但 SAML 2.0 是一个庞大的规范,它可能不支持您想要的内容(例如,它不支持签署身份验证请求)。
回答by saret
While not a PHP specific solution, maybe Shibbolethwill be an acceptable solution for you - it supports both Apache and IIS and can be used with potentially any web framework - java/php/asp.net. This also helps by being a Filter plugin into your webserver so your application will require minimal (if any) modifications to use it
虽然不是特定于 PHP 的解决方案,但Shibboleth可能是您可以接受的解决方案 - 它支持 Apache 和 IIS,并且可以与任何潜在的 Web 框架一起使用 - java/php/asp.net。这也有助于成为您的网络服务器中的过滤器插件,因此您的应用程序将需要最少的(如果有)修改才能使用它
回答by Milos Tomic
We used SamlSpBundlewich we found quite configurable and Symfony2 friendly. If you're not on Symfony2 framework you might look at it's foundation library lightsamlwhich is a stand-alone.
我们使用了SamlSpBundle,我们发现它非常可配置且 Symfony2 友好。如果您不在 Symfony2 框架上,您可能会查看它的基础库lightsaml,它是一个独立的。
回答by Steve
http://framework.zend.com/manual/en/zend.infocard.basics.htmlhas SAML1.0, but SAML has moved on since then...
http://framework.zend.com/manual/en/zend.infocard.basics.html有 SAML1.0,但从那以后 SAML 一直在发展......

