2010-08-20 44 views
0

我正在嘗試使用SAML 2.0進行第一次SSO集成。我一直在使用:SAML2.0入門

http://www.codeproject.com/KB/aspnet/DotNetSamlPost.aspx?msg=3562384

至於我自己的例子。

目前我只是想成功發佈到他們的網址。我們連接的網站非常大,並使用ping身份的解決方案來管理他們的sso,這通常似乎給我的幫助不是很大。我已經經歷了幾個工作,但這個我已經難倒:

UnknownBindingException:(?你鍵入 協議端點URL直接進入您的 瀏覽器的地址欄)請求包含 足夠的信息來確定協議綁定。

沒有人有任何想法可能會導致這種情況,我認爲SAML我張貼如下所示:

<Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="_3b052151-fb4f-4e10-89bd-d65ef5141e9d" Version="2.0" IssueInstant="2010-08-20T20:36:02.8093696Z" Destination="https://******/sp/ACS.saml2" xmlns="urn:oasis:names:tc:SAML:2.0:protocol"> 
    <Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">www.******.org</Issuer> 
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> 
    <SignedInfo> 
     <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /> 
     <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /> 
     <Reference URI="#_3b052151-fb4f-4e10-89bd-d65ef5141e9d"> 
     <Transforms> 
      <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /> 
      <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /> 
     </Transforms> 
     <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 
     <DigestValue>****</DigestValue> 
     </Reference> 
    </SignedInfo> 
    <SignatureValue>*******</SignatureValue> 
    </Signature> 
    <Status> 
    <StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" /> 
    </Status> 
    <Assertion Version="2.0" ID="_d0f34b54-cf0b-49c7-9a50-f60842b7e0d2" IssueInstant="2010-08-20T20:36:02.8103697Z" xmlns="urn:oasis:names:tc:SAML:2.0:assertion"> 
    <Issuer>www.*******.org</Issuer> 
    <Subject> 
     <NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">adamb</NameID> 
     <SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> 
     <SubjectConfirmationData NotOnOrAfter="2010-08-20T20:41:02.8103697Z" Recipient="https://*****.com:9031/sp/ACS.saml2" /> 
     </SubjectConfirmation> 
    </Subject> 
    <Conditions NotBefore="2010-08-20T20:36:02.8103697Z" NotOnOrAfter="2010-08-20T20:41:02.8103697Z"> 
     <AudienceRestriction> 
     <Audience>*****</Audience> 
     </AudienceRestriction> 
    </Conditions> 
    <AuthnStatement AuthnInstant="2010-08-20T20:36:02.8103697Z"> 
     <AuthnContext> 
    <AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</AuthnContextClassRef> 
     </AuthnContext> 
    </AuthnStatement> 
    </Assertion> 
</Response> 

任何幫助是非常讚賞,

感謝。

回答

3

當我讀到你的問題時,你的應用程序將成爲一個SAML2聯盟中的ServiceProvider(SP),其中Ping是IdentityProvider(IdP)。你已經標記了c#的問題,所以我假設你的SP是在.Net中實現的。你可以使用哪個SAML2框架,或者你正在自己開發嗎?如果你正在做自己的SAML2框架,我建議使用OIOSAML.net,它是Mozilla許可證下的開源軟件(可用於任何目的)。您可以在此查看源代碼:http://view.svn.softwareborsen.dk/cgi-bin/index.cgi/Softwareborsen/oiosaml.net/branches/ (所有文檔均爲英文)。

它由丹麥政府主動維護,並與Ping,ADFSv2,SimpleSamlPhp和許多其他SAML2 IdP進行了互操作性測試。目前,丹麥有數百個網站與Ping聯合使用IdP。

關於您收到的異常,您打算使用哪種綁定:HTTP重定向或其他?假設它是HTTP重定向,我推薦閱讀SAML2綁定規範中p15開始的相關部分:http://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf

0

聽起來像你是A)通過GET方法而不是POST或B發送斷言)您沒有正確格式化HTML表單,其中包含發送給您的夥伴的斷言。