【问题标题】:Composing a SAML2 AuthnRequest for OpenAM为 OpenAM 编写 SAML2 AuthnRequest
【发布时间】:2011-10-19 11:24:12
【问题描述】:

我正在尝试为 OpenAM 编写 SAML2 AuthnRequest。我有一个 URL,我可以针对该 URL 执行 get,但是在将其组合到 XHTML 帖子表单中时遇到问题。

带有查询字符串的工作 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 的值是

的 Base 64 编码表示
<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>

发出此表单会导致来自 OpenAM 的错误消息指出“服务提供商 ID 为空”

我可以立即看到 XML 不包含 metaAlias=/MYRealm/idp 参数,但消息表明它也找不到 spEntityID=https://saml.salesforce.com 参数。

请告知需要在 XML 中指定这两个属性(metaAlias 和 spEntityID)的位置。

还可以提供指向特定位置的链接,该链接指定 OpenAM COT / IdP 配置如何映射到 SAML AuthnRequest 消息。

【问题讨论】:

    标签: single-sign-on opensso saml-2.0 openam


    【解决方案1】:

    问题是我访问了错误的 URL,应该是访问了 spssoinit,因为它是服务提供商发起的 SSO

    【讨论】:

    • 如何生成这个 文档?我想知道该怎么做?我正在使用 LAMP 环境。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-11
    • 1970-01-01
    • 2020-03-09
    • 2020-07-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多