2011-10-19 37 views
2

我正在嘗試編寫OpenAM的SAML2 AuthnRequest。我有一個URL可以對付這些作品,但是在將這些內容寫入XHTML帖子表單時遇到了問題。爲OpenAM編寫SAML2 AuthnRequest

與查詢字符串的工作URL是

http://internal.authhost.com:8080/opensso/idpssoinit?NameIDFormat=urn:oasis:names:tc:SAML:2.0:nameid-format:transient&metaAlias=%2FMYRealm%2Fidp&spEntityID=https%3A%2F%2Fsaml.salesforce.com&binding=urn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Abindings%3AHTTP-POST&RelayState=webj_captureCustomerDetails

我的HTML表單的外觀:

<form action="http://internal.authhost.com:8080/opensso/idpssoinit" method="post" target="new"> 
    <input type="text" name="SAMLRequest" value="PHNhbWxwOkF1dGhuUmV..."></input> 
    <input type="text" name="RelayState" value="webj_captureCustomerDetails"></input> 
    <input type="submit"/> 
</form> 

與SAMLRequest的價值是的

<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" 
    xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" 
    ID="_d7607d551380ac97853a6ff4907c4ef01219be97dd" Version="2.0" 
    IssueInstant="2008-05-27T07:46:06Z" ForceAuthn="true" IsPassive="false" 
    ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" 
    AssertionConsumerServiceURL="https://cs4.salesforce.com/?saml=lkjhkljhkljhkjhlkjh" 
    ProviderName="https://saml.salesforce.com"> 
    <saml:Issuer>https://saml.salesforce.com</saml:Issuer> 
    <samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" 
     AllowCreate="true"/> 
</samlp:AuthnRequest> 
基地64編碼表示

簽發此表單會導致錯誤從OpenAM說明消息「服務提供商ID爲空」

我可以立即看到XML不包含metaAlias =/MYREALM/IDP的說法,但該消息表明它無法找到spEntityID = https://開頭SAML .salesforce.com的論點。

請告知這兩個屬性(metaAlias和spEntityID)需要在XML中指定的位置。

指向OpenAM COT/IdP配置如何映射SAML AuthnRequest消息的某處的鏈接也將被讚賞。

回答

2

問題是,我訪問了錯誤的網址,應該已經擊中spssoinit,因爲它是服務提供商intitated SSO

+0

你如何產生這個的文件?我想知道如何做到這一點?我正在使用LAMP環境。 –