【问题标题】:SAML Integration with IdentityServer4 using Saml2p使用 Saml2p 与 IdentityServer4 集成 SAML
【发布时间】:2020-09-22 07:55:35
【问题描述】:

我正在关注SAML 2.0 Integration with IdentityServer4 并实施“IdentityServer 4 作为 SAML 服务提供商”。

我还阅读了Automatic Metadata Lookup 并配置了我的启动,如下所示

authenticationBuilder = authenticationBuilder.AddSaml2p("saml2p", options =>
    {

        options.Licensee = "DEMO";
        options.LicenseKey = "<<LICENSE_KEY>>";
        options.IdentityProviderMetadataAddress = "https://degreed.com/saml/idp/94";


        options.ServiceProviderOptions = new SpOptions
        {
            EntityId = "https://degreed.com/DegreedIdP/94",
            MetadataPath = "/saml/metadata",

            // optional
            //SignAuthenticationRequests = true,
            //SigningCertificate = new X509Certificate2(Convert.FromBase64String("<<SOME_STRING>>"))
        };

        options.CallbackPath = "/signin-idsrv";
        options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
    });

我正在使用外部提供商之一作为 SAML2P 获得 IdendityServer 登录屏幕,但是当我单击它时,它会重定向到 https://localhost:44380/External/Challenge?provider=saml2p&returnUrl=%2Fgrants,并且我可以看到一个空白页面。当我检查 IdentityServer 日志时,它显示“System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://degreed.com/saml/idp/94'. ---&gt; System.AggregateException: One or more values could not be parsed from the metadata document. See inner exceptions for details. (Unable to parse a value for SigningCertificate from the metadata document) ---&gt; IdentityServer4.Saml.Exceptions.SamlXmlParsingException: Unable to parse a value for SigningCertificate from the metadata document

【问题讨论】:

    标签: asp.net-core identityserver4 saml-2.0 asp.net-core-2.2


    【解决方案1】:

    第一个链接坏了?

    元数据是否有签名元素?

    尝试将“SignAuthenticationRequests”设置为“False”。

    当您按照第二篇文章手动输入元数据时会发生什么?

    【讨论】:

      猜你喜欢
      • 2019-02-17
      • 2017-04-28
      • 2018-09-19
      • 1970-01-01
      • 1970-01-01
      • 2021-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多