【问题标题】:Symfony2.8 website(SP) & OKTA(IDP)Symfony2.8 网站(SP) & OKTA(IDP)
【发布时间】:2018-02-10 23:52:03
【问题描述】:

我已经用 Symfony2 创建了会员网站。我在网站上使用了 FOSuserbundle。

然后我尝试使用此网站和 OKTA 设置 IDP 启动的单点登录环境,但我在此处遇到了 SP 端设置的情况。

enter image description here

我可以在执行 No.4(attached image) 过程后使用 Firefox SAML tracer 看到发布的 SAML,但身份验证会失败。

列表在我所做的下面。


第一步

获取 okta-simplesamlphp-example 以设置 SimpleSAMLphp

https://github.com/jpf/okta-simplesamlphp-example


saml-autoconfig.php

$metadata_url_for = array(
     'example' => 'ttps://xxxxxx.com/app/xxxxxxxxxxxxxx/sso/saml/metadata',
);


第二步

设置 OKTA

单点登录网址

ttp://xxxxxxxx.com/simplesamlphp/www/module.php/saml/sp/saml2-acs.php/example

受众 URI(SP 实体 ID)

ttp://xxxxxxxx.com/simplesamlphp/www/module.php/saml/sp/metadata.php/example

默认中继状态

ttps://xxxx.okta.com/app/xxxxxxxxxxxxxxxxxxxxxxxwebsite_1/xxxxxxxxxxxxxx/sso/saml

(我通过单击管理控制台中应用程序的“登录”选项卡上的“查看设置说明”找到了该网址)


第三步

为会员网站安装 SamlBundle

ttps://github.com/pdias/SamlBundle



我想我缺少网站和 SimpleSAMLphp 之间的连接。如何相互连接?

如有任何帮助,我们将不胜感激。

【问题讨论】:

    标签: symfony okta simplesamlphp


    【解决方案1】:

    我可以解决这个问题!

    我的 SamlBundle 设置出错了。

    # UserBundle\Resources\config\services.xml
    
    <service id="saml.backend.fosuser.provider" class="UserBundle\Security\User\FosBackendSamlUserProvider">
        <argument type="service" id="samlauth.service"/>
        <argument type="service" id="fos_user.user_manager"/>
    </service>
    

    这是示例代码,但在我的情况下应该是......

      <services>
    <service id="saml.backend.fosuser.provider" class="FOS\UserBundle\Security\User\FosBackendSamlUserProvider">
        <argument type="service" id="samlauth.service"/>
        <argument type="service" id="fos_user.user_manager"/>
    </service>
    

    课程 URL 应该已更改。

    我也对 OKTA 的默认 RelayState 犯了一个错误。

    它只是主页 URL,例如“http://xxxxxxxxxx.com/”。

    "OKTA + simplesamlPHP + symfony2.8(with fosuserbundle) + pdias/SamlBundle"

    这种组合现在有效。

    【讨论】:

    • 默认 RelayState 现在不是主页 URL。空白很好。
    猜你喜欢
    • 2015-06-12
    • 2013-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-25
    • 1970-01-01
    • 2019-09-26
    • 1970-01-01
    相关资源
    最近更新 更多