标签: ws-federation

WS-Trust,WS-Fed和SAML 1.1/2.0协议之间的区别

WS-Trust,WS-Fed和SAML 1.1/2.0协议之间有什么区别?

当SAML用作WS-Trust和WS-Fed协议中的安全令牌时,我对这些协议的理解会变得混乱.

有兴趣了解这些协议使用的场景以及它们与众不同的原因.如果没有使用商业产品/技术参考,您的答案将很容易理解.

adfs federated-identity saml-2.0 ws-federation ws-trust

1
推荐指数
1
解决办法
4441
查看次数

O365 联合设置 - Set-MsolDomainAuthentication - “无法完成操作。稍后重试”消息

我正在使用 Powershell 使用“Set-MsolDomainAuthentication”命令将 O365 域转换为联合域。当我使用正确的参数运行该命令时,出现以下错误 -“ Set-MsolDomainAuthentication:无法完成此操作。稍后重试”。

下面是我使用的命令 -

cls
$dom = "mydomain.net"
$passiveLogOnUri = "{{...}}"
$activeLogOnUri = "{{...}}"
$entity = "wsfed-o365-idp"
$logOffUrl = "{{...}}"
$signingCert = "{{...}}"

Set-MsolDomainAuthentication -DomainName $dom -FederationBrandName $dom -    Authentication Federated -PassiveLogOnUri $passiveLogOnUri -SigningCertificate $signingCert -IssuerUri $entity -ActiveLogOnUri $activeLogOnUri -LogOffUri $logOffUrl -PreferredAuthenticationProtocol "WsFed"
Run Code Online (Sandbox Code Playgroud)

我等了几个小时并尝试了。我仍然收到此错误。这对我来说已经成为一个障碍。任何帮助或建议将不胜感激。

powershell ws-federation azure-active-directory

1
推荐指数
1
解决办法
7056
查看次数

IdentityServer4 作为带有 .Net Core WSFederation preview2 的 WSFederation-client

我正在尝试向 IdentityServer4 添加 WSFederation 身份验证提供程序。最近Microsoft.AspNetCore.Authentication.WsFederation Preview 2发布了,我能够将它添加到普通的 Asp.NetCore 应用程序中。

但是我很难将它添加到IdentityServer4 EntityFramework-Quickstart-Example 中

这就是我在 Startup.cs/ConfigureServices-method 中添加 AuthenticationProvider 的方式:

services.AddAuthentication()
                .AddWsFederation("WsFederation", options =>
                {
                    options.Wtrealm = realm;
                    options.MetadataAddress = metadata;
                })
Run Code Online (Sandbox Code Playgroud)

我在前端获得了 WSFederation 按钮,我也可以登录。但是在回调之后我收到这个错误:

InvalidOperationException:子声明缺少 IdentityServer4.Hosting.IdentityServerAuthenticationService.AssertRequiredClaims(ClaimsPrincipal principal)

我可以理解这是从哪里来的,它是IdentityServer4 的 IdentityServerAuthenticationService.cs 中的这一行,它需要一个“子”声明——WSFed 不会返回这样的声明:

if (principal.FindFirst(JwtClaimTypes.Subject) == null) throw new InvalidOperationException("sub claim is missing");
Run Code Online (Sandbox Code Playgroud)

据我所知,我无法配置此声明,尽管快速入门项目中有一些表似乎可以用于此目的,尤其是那些 2: dbo.IdentityResources 表 dbo.IdentityClaims 表

我已经尝试将我想使用的声明而不是主题声明添加到表中,但它似乎没有任何影响,我也不知道数据库如何映射到我在代码中添加的身份提供者. 我很乐意为您提供有关后续步骤的任何提示,或者如果您知道任何示例,那就更好了。

PS:已经有一些关于这个主题的问题,但它们都是在 .Net Core 实现 WSFederation 之前可用的,或者参考 WSFederation 服务器的示例,而不是客户端。

c# ws-federation .net-core asp.net-core identityserver4

0
推荐指数
1
解决办法
2262
查看次数

ASP.Net Core WSFederationAuth 使用 Cookie 登录 - 无法访问网站

我正在将旧站点升级到 ASP.NET Core 2.1,但仍将 .NET Framework 4.7.2 作为目标框架。

我们正在尝试使用 WSFederation 服务来处理身份验证,如本 Microsoft文档中所述。一个单独的站点处理实际的登录,然后重定向回我们位于 /Federation 端点的站点。

我们的 Startup.cs 类:

public void ConfigureServices(IServiceCollection services)
{
    services.AddAuthentication(authOptions =>
    {
        authOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
        authOptions.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
        authOptions.DefaultChallengeScheme = WsFederationDefaults.AuthenticationScheme;
    })
    .AddWsFederation(wsOptions =>
    {
        wsOptions.Wtrealm = Configuration.GetValue<string>("WSFed:Realm");
        wsOptions.MetadataAddress = Configuration.GetValue<string>("WSFed:Metadata");
        wsOptions.CallbackPath = "/Federation";
    })
    .AddCookie(cookieOptions => 
    {
        cookieOptions.Cookie.SameSite = SameSiteMode.None;
    });

    //Fixes correlation error
    services.Configure<CookiePolicyOptions>(options =>
    {
        options.MinimumSameSitePolicy = SameSiteMode.None;
    });

    services.AddMvc()
        .SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

    services.AddHttpsRedirection(options =>
    {
        options.HttpsPort = 443;
    });
}

public void Configure(IApplicationBuilder …
Run Code Online (Sandbox Code Playgroud)

cookies claims-based-identity ws-federation asp.net-core

0
推荐指数
1
解决办法
1520
查看次数