1

我正在尝试在我的 OWIN 网站中通过 Kentor 身份验证服务使用 SAML。但是我认为配置有问题,因为 SAML 返回 URL 与我配置的不同。我做错了什么。

这是配置

<kentor.authServices entityId="https://admin.mercedes-forms.ggg.com.au" returnUrl="http://admin.mercedes-forms.ggg.com.au/Callback/Saml2">    
    <identityProviders>
      <add entityId="https://int.smfed.extranet.daimler.com/" 
           signOnUrl="https://cdiwl-appstest.i.daimler.com/affwebservices/public/saml2sso" 
           allowUnsolicitedAuthnResponse="true" binding="HttpRedirect">
        <signingCertificate fileName="~/App_Data/int.smfed.extranet.daimler.com.cer" />
      </add>
    </identityProviders>
    <federations>
      <add metadataLocation="http://admin.mercedes-forms.ggg.com.au/Federation" allowUnsolicitedAuthnResponse="true" />
    </federations>
    <serviceCertificates>
      <add fileName="~/App_Data/Kentor.AuthServices.StubIdp.cer" />
    </serviceCertificates>
  </kentor.authServices> 

这是身份验证请求

<saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="idaa4b00c6cd334f5c927526106a6da12f" Version="2.0" IssueInstant="2017-04-05T00:18:45Z" Destination="https://cdiwl-appstest.i.daimler.com/affwebservices/public/saml2sso" AssertionConsumerServiceURL="https://admin.mercedes-forms.ggg.com.au/AuthServices/Acs">
  <saml2:Issuer>https://admin.mercedes-forms.ggg.com.au</saml2:Issuer>
</saml2p:AuthnRequest>

提前致谢。

4

1 回答 1

3

ReturnUrl在应用程序中的 AuthServices 处理 SAML使用。因此,您的ReturnUrl值未反映在AssertionConsumerServiceURL您在身份验证请求中看到的值中是正确的。如果您想自定义它的位置,ModulePath参数更多的是您正在寻找的:https ://github.com/KentorIT/authservices/blob/master/doc/Configuration.md#modulepath-attribute

例如,典型的流程可能是这样的:

  1. 在您的应用程序中使用 requests /somesecurepath
  2. 您的身份验证系统(涉及 AuthServices)将它们重定向到身份提供者,并为第 4 步保存 /somesecurepath 的值
  3. 身份提供者将 SAML 发送回位于 /AuthServices/Acs 的断言消费者服务(除非您使用 ModulePath 选项自定义了此位置)
  4. AuthServices 从第 1 步重定向到原始请求的位置

ReturnUrl值仅在没有保存原始请求位置时才起作用,例如对于未经请求的/idp 发起的流。

于 2017-04-28T12:12:56.040 回答