我在我的应用中使用https://simplesamlphp.org/.大部分时间都很好,没有问题.其他时候我得到这个:
SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
Backtrace:
0 ssoclient/www/module.php:180 (N/A)
Caused by: SimpleSAML_Error_Exception: Received an assertion that is valid in the future. Check clock synchronization on IdP and SP.
Backtrace:
3 ssoclient/modules/saml/lib/Message.php:565 (sspmod_saml_Message::processAssertion)
2 ssoclient/modules/saml/lib/Message.php:523 (sspmod_saml_Message::processResponse)
1 ssoclient/modules/saml/www/sp/saml2-acs.php:75 (require)
0 ssoclient/www/module.php:135 (N/A)
Run Code Online (Sandbox Code Playgroud)
为什么会发生这种情况,我该如何解决?我需要更改系统时间吗?(我在Debian上).
我在https://biz.dev.originsystems.co.za上设置了服务提供商.我在http://stage.originsystems.co.za上设置了IdP .
使用https://biz.dev.originsystems.co.za/simplesaml/module.php/core/authenticate.php上的工具测试身份验证时,一切正常.它回到Dev网站,具有所需的属性,一切都快乐和快乐.
但是,当我尝试在https://biz.dev.originsystems.co.za上的代码中实际点击IdP时,我被重定向到舞台登录页面但登录后我收到"状态信息丢失"错误.我得到以下调试信息:
SimpleSAML_Error_NoState: NOSTATE
Backtrace:
2 /webdevroot/Updraft/web/external/System/SSO/simplesaml/lib/SimpleSAML/Auth/State.php:225 (SimpleSAML_Auth_State::loadState)
1 /webdevroot/Updraft/web/external/System/SSO/simplesaml/modules/saml/www/sp/saml2-acs.php:63 (require)
0 /webdevroot/Updraft/web/external/System/SSO/simplesaml/www/module.php:134 (N/A)
Run Code Online (Sandbox Code Playgroud)
我已经完成了页面要求我做的所有故障排除,但情况仍然存在.
我在浏览器上打开了开发工具并观看了cookie信息.biz.dev.originsystems.co.za的cookies包含一个SimpleAMLAuthToken,因此我认为cookie正在运行.我用来点击IdP的代码是:
$as = new SimpleSAML_Auth_Simple("stage-sso-sp");
$as->requireAuth();
$attributes = $as->getAttributes();
print_r($attributes);
Run Code Online (Sandbox Code Playgroud)
更新:
这里有更多信息......
我想确定问题是否与我如何设置IdP有关,所以我开始使用SSO Circle作为IdP.在SSO Circle上进行身份验证后,状态信息也会丢失.我认为这意味着问题出在我的SimpleSAML服务提供商设置的某个地方.这是发生了什么......
当我访问https://biz.stage.originsystems.co.za/simplesaml上的SimpleSAML测试认证来源页面时,我有以下cookie值...
Name Value
SimpleSAMLAuthToken _a53569c0701dd02832532df14cf10cd0b2d9fcd6b6
biz.stage.originsystems.co.za 10fc356e0bfbf707af5fa5854c378755
ccof RGN002
xbrF 84aadc624fc51c0c9340d45645c08643
Run Code Online (Sandbox Code Playgroud)
除SimpleSAMLAuthToken之外的所有内容都来自我们的应用程序,不应影响SimpleSAML.一旦我被重定向到SSO Circle并进行身份验证,我将返回到我的SimpleSAML页面,并且Auth Token现在具有值,_39679e07cb1911e08b2bff3580a9929faddd07e9b6并且正确返回所有相关信息.日志文件显示以下活动.
Feb 02 12:58:22 simplesamlphp DEBUG [7c4534ae0a] Received SAML2 Response from 'http://idp.ssocircle.com'.
Feb 02 12:58:22 simplesamlphp DEBUG [7c4534ae0a] No certificate in message when …Run Code Online (Sandbox Code Playgroud) 特别是在浏览了整个互联网之后
我尝试了对authsource.php和元数据php的所有建议修改.没有任何效果.
这是我的authsource.php
'default-sp' => array(
'saml:SP',
'privatekey' => 'saml.pem',
'certificate' => 'saml.crt',
'idp' => 'http://domain.com/adfs/services/trust',
Run Code Online (Sandbox Code Playgroud)
我用它XML to simpleSAMLphp metadata converter来生成saml20-idp-remote.php
因此,当我访问该页面时,SimpleSAMLPHP正确地将我重定向到IDP登录页面.我解码了SAML请求:
<samlp:AuthnRequest
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="_4e03333c7aa76314d965e05f8fcdd3e1f4c5be96c8"
Version="2.0"
IssueInstant="2014-12-11T19:41:50Z"
Destination="https://domain.com/adfs/ls/"
AssertionConsumerServiceURL="https://sub.domain.com/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST">
<saml:Issuer>
https://su.bdomain.com/simplesaml/module.php/saml/sp/metadata.php/default-sp
</saml:Issuer>
<samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" AllowCreate="true"/>
</samlp:AuthnRequest>
Run Code Online (Sandbox Code Playgroud)
使用有效的测试帐户登录后,我将重定向回到我的网站并显示错误.
SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
Backtrace:
0 /var/www/html/igt_s3k/web/simplesamlphp/www/module.php:179 (N/A)
Caused by: sspmod_saml_Error: Requester/InvalidNameIDPolicy
Backtrace:
3 /var/www/html/igt_s3k/web/simplesamlphp/modules/saml/lib/Message.php:385 (sspmod_saml_Message::getResponseError)
2 /var/www/html/igt_s3k/web/simplesamlphp/modules/saml/lib/Message.php:495 (sspmod_saml_Message::processResponse)
1 /var/www/html/igt_s3k/web/simplesamlphp/modules/saml/www/sp/saml2-acs.php:96 (require)
0 /var/www/html/igt_s3k/web/simplesamlphp/www/module.php:134 (N/A)
Run Code Online (Sandbox Code Playgroud)
我尝试设置不同的NameIDPolicy,但没有一个工作.
//'NameIDFormat' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
//'NameIDPolicy' => 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient', …Run Code Online (Sandbox Code Playgroud) 我正在考虑使用Passport在Laravel 5中开发一个完整的身份系统.
以下是我的要求:
我试过的事情:
我知道OAuth 2.0不是身份验证协议.相反,它使用称为授权的东西,但我们可能会使其工作以支持此处提到的身份验证协议.这是Laravel护照支持的吗?
我正在使用SSOCircle来测试我的SAML实现与Codeigniter.目前的步骤是:
但是,在步骤3之后,它立即进入步骤4并返回步骤3.
这是我的代码:
public function index()
{
$data['languages']= get_all_languages();
$sp_auth = 'default-sp';
try {
$auth = new SimpleSAML_Auth_Simple($sp_auth);
$auth->requireAuth(array(
'ReturnTo' => $this->data['controller'],
'KeepPost' => FALSE,
));
$attributes = $auth->getAttributes();
var_dump($attributes);
} catch (Error $e) {
print_r($e);
}
}
Run Code Online (Sandbox Code Playgroud)
我认为我的重定向可能是它继续调用同意页面的原因.但是当添加另一个url以便使用此功能进行访问时
public function auth(){
$attributes = $auth->getAttributes();
var_dump($attributes);
}
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
Backtrace:
1 www/_include.php:45 (SimpleSAML_exception_handler)
0 [builtin] (N/A)
Caused by: SimpleSAML_Error_Exception: No authentication source with id 'Login/Auth' found.
Backtrace:
2 lib/SimpleSAML/Auth/Source.php:335 (SimpleSAML_Auth_Source::getById)
1 modules/saml/www/sp/saml2-acs.php:12 (require)
0 www/module.php:135 …Run Code Online (Sandbox Code Playgroud) SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
Backtrace:
0 simplesamlphp/www/module.php:189 (N/A)
Caused by: Exception: Unable to validate Signature
Backtrace:
6 simplesamlphp/lib/SAML2/Utils.php:149 (SAML2_Utils::validateSignature)
5 simplesamlphp/lib/SAML2/Assertion.php:494 (SAML2_Assertion::validate)
4 simplesamlphp/modules/saml/lib/Message.php:185 (sspmod_saml_Message::checkSign)
3 simplesamlphp/modules/saml/lib/Message.php:560 (sspmod_saml_Message::processAssertion)
2 simplesamlphp/modules/saml/lib/Message.php:532 (sspmod_saml_Message::processResponse)
1 simplesamlphp/modules/saml/www/sp/saml2-acs.php:81 (require)
0 simplesamlphp/www/module.php:144 (N/A)
Run Code Online (Sandbox Code Playgroud)
登录运行SimpleSAMLphp的站点时出现错误.这在服务器上的SSL证书过期时启动,但此后已更新为新的有效证书.我认为这会纠正错误,但正如你所看到的,它没有.
我一直无法找到其他人遇到同样的问题所以我一定错过了一些明显的东西.
我在yii框架中有两个项目,我想使用SimpleSAMLphp和SSO两个项目.我需要的条件是,如果我从第一个项目登录,我想访问第二个项目.先感谢您.
我想在Windows Apache/Xampp中安装SimpleSAMLphp.让我告诉你到目前为止做了什么:1.我从https://simplesamlphp.org/download下载了最新的稳定版本,并将解压缩的文件放在Apache文件夹中,即C:\ Apache24\simplesamlphp目录包含composer.json.我也下载了依赖项.2.现在,当我要在站点中显示vhost时6.将Apache部分配置为
<VirtualHost *:80>
ServerName localhost
DocumentRoot C:/Apache24/htdocs
</VirtualHost>
<VirtualHost *:80>
ServerName service.example.com
DocumentRoot C:/Apache24/service.example.com
Alias /simplesaml C:/Apache24/simplesamlphp/www
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
现在问题是:我无法在浏览器中打开Alias.并在浏览器中运行httpd.exe显示有关example.com不存在的错误.
如果有人在Windows中设置SimpleSAMLphp需要帮助,请分享您的步骤和虚拟主机配置.这会帮助我思考很多人.
提前致谢.
SimpleSAMLphp不会在第一次将我重定向到我的ReturnTo地址,而是将我带到我的IdP登出页面。如果我再次单击注销链接,它将带我到正确的ReturnTo页面。为什么会这样呢?
我正在$as->logout("http://myurl.com");处理注销。