rack-saml Assertion Consumer Service绑定

时间:2013-11-13 02:20:37

标签: ruby-on-rails omniauth rack shibboleth

我使用rack-saml作为omniauth-shibboleth的中间件,以允许我的应用程序作为服务提供商工作。

我想知道如何为断言消费者服务(ACS)网址设置绑定?

目前我的ACS网址绑定是“任何'”。但是,我在rack-saml和omniauth-shibboleth中搜索了这个设置的位置,并且无法找到它。

我正在尝试让我的应用程序与testshib.org一起使用,希望将该应用程序与类似配置的身份提供程序(IdP)一起使用。

我已将我的元数据上传到testshib.org。我不确定如何实现他们的自定义shibboleth.xml文件;但是我的应用程序能够重定向到他们的IdP登录页面,并且Cookie由他们的IdP设置。

听到testhib.org日志中的一些错误。

20:14:15.864 - WARN [org.opensaml.saml2.binding.AuthnResponseEndpointSelector:206] - Relying party 'https://test_shib.com' requested the response to be returned to endpoint with ACS URL 'https://test_shib.com:443/auth/shibboleth/callback'  and binding 'any' however no endpoint, with that URL and using a supported binding,  can be found in the relying party's metadata 

20:14:15.864 - ERROR [edu.internet2.middleware.shibboleth.idp.profile.AbstractSAMLProfileHandler:447] - No return endpoint available for relying party https://test_shib.com

非常感谢任何帮助。

2 个答案:

答案 0 :(得分:0)

可能有更好的方法来做到这一点;但我通过覆盖Onelogin::Saml::Authrequest(以及其他调用Onelogin::Saml::Authrequest的类)然后在创建方法中将AssertionConsumerServiceURL更改为AssertionConsumerService来完成工作。

答案 1 :(得分:0)

在lib / rack / saml.rb中你会发现:

 @config['assertion_consumer_service_uri'] ||= "#{saml_sp_prefix}#{@config['protected_path']}"

因此,在你的config / rack-saml.yml中,你可以像这样配置它(你可能需要在uri中输入端口号导致问题):

assertion_consumer_service_uri: https://www.abc.edu/users/auth/shibboleth/callback

此外,您不应该从他们的shibboleth2.xml文件中获取任何内容,只需将其提供者的xml中的证书放入metadata.yml配置文件中:

---
idp_lists:
  https://idp.testshib.org/idp/shibboleth:
    certificate: |-
      -----BEGIN CERTIFICATE-----
      MIIEDjCCAvagAwIBAgIBADANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJVUzEV
      ...
      8K/qhmFT2nIQi538n6rVYLeWj8Bbnl+ev0peYzxFyF5sQA==
      -----END CERTIFICATE-----
    saml2_http_redirect: https://idp.testshib.org/idp/profile/SAML2/Redirect/SSO
相关问题