ASP.Net Core SAML authentication

Tedd Hansen :

I am trying to add SAML 2.0 authentication to an ASP.Net Core solution. I can't find any documentation on the subject, so I am unsure where to start. There is probably documentation out there, but I don't want to spend 3 days becoming an expert on this.

From what I can see ASP.Net Core has changed something from the old OWIN assemblies/namespaces. There are third party libraries to simplify SAML 2.0 implementation such as Kentor.AuthServices.

I am unsure how to combine this with ASP.Net 5 RC 1 / ASP.Net Core. For example making use of the AspNet* tables in SQL.

ASP.Net 5 RC 1 comes with several libraries to implement authentication (client).

For example:

Implementing these is a matter of calling a simple extension method in Startup.cs:

app.UseIdentity()
.UseFacebookAuthentication(new FacebookOptions
{
    AppId = "ID",
    AppSecret = "KEY"
})
.UseGoogleAuthentication(new GoogleOptions
{
    ClientId = "ID",
    ClientSecret = "SECRET"
})
.UseTwitterAuthentication(new TwitterOptions
{
    ConsumerKey = "KEY",
    ConsumerSecret = "SECRET"
});

Once that is done the ASP.Net sample project automatically shows social buttons for login/manage account:

Social buttons

In the backend code the authentication providers are retrieved using var otherLogins = _signInManager.GetExternalAuthenticationSchemes().Where(auth => userLogins.All(ul => auth.AuthenticationScheme != ul.LoginProvider)).ToList();. This means the authentication providers are registered somewhere that makes them available by calling _signInManager.GetExternalAuthenticationSchemes().

How can I implement SAML 2.0 authentication in ASP.Net 5 RC1 / ASP.Net Core?

Anders Abel :

As far as I know, there is no SAML2 implementation for ASP.NET Core. I'm planning to make an ASP.NET Core Middleware for Kentor.AuthServices (I'm the maintainer), but it's just plans yet.

There is now a working prototype of a ASP.NET Core middleware at https://github.com/KentorIT/authservices/pull/489. It will be included in the official release when tests have been added.

It's also important to know that while such a middleware would be compatible with the ASP.NET Core security model, it would only run on the full .NET Framework and not on .NET Core. The reason is that SignedXml and the SAML2 support in System.IdentityModel is not yet available in .NET Core.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

ASP.Net Core SAML authentication

分類Dev

ASP.Net Core SAML authentication

分類Dev

ASP.NET Core 2.0 authentication middleware

分類Dev

Windows Authentication with asp.net core

分類Dev

Change authentication from no authentication to individual authentication in existing project of Asp.Net Core (MVC)

分類Dev

Custom Authentication using legacy user table in Asp.Net Core

分類Dev

Path based authentication in ASP.NET Core MVC 2.0

分類Dev

ASP.Net Core SignalR authentication always responding with 403 - Forbidden

分類Dev

Use ADFS-based authentication inside ASP.NET Core to access a SQL Server using Windows authentication?

分類Dev

How to redirect after Azure AD authentication to different controller action in ASP Net Core MVC

分類Dev

Using Azure Active Directory authentication in ASP.NET Core 2.0 from Web App to Web API

分類Dev

How to migrate asp.net core authentication to new Google SignIn service?

分類Dev

ASP.NET core 2.2: what is the expected behaviour of ChallengeResult when there are multiple authentication schemes configured?

分類Dev

How best to implement Google social sign-in authentication in ASP.NET Core?

分類Dev

.NET CoreとASP.NET Core

分類Dev

ASP.NET CoreIdentityとのSAML統合

分類Dev

Windows Authentication in .net Core 2.1 application

分類Dev

Where can I find the ASP.NET Core 2 source code? Specifically for Microsoft.AspNetCore.Authentication.OpenIdConnect

分類Dev

ASP.NET Core ToHtmlString

分類Dev

Cookieless ASP.NET Core

分類Dev

JWT authentication in SignalR (.NET Core) without passing token in Query String

分類Dev

JWT Authentication for .net core 2.2 application not using Identity

分類Dev

Custom Role with .NET Core 3 Azure AD Authentication

分類Dev

asp.netでSAMLを実装する方法は?

分類Dev

Turn off / Disable windows authentication for asp.net-mvc

分類Dev

Issues with ASP.NET Forms Authentication on Phonegap (Android)

分類Dev

WCF authentication using ASP.NET Membership Provider

分類Dev

Asp.net share forms authentication by two applications in the same domain

分類Dev

ASP.NET Active Directory Authentication on one form

Related 関連記事

  1. 1

    ASP.Net Core SAML authentication

  2. 2

    ASP.Net Core SAML authentication

  3. 3

    ASP.NET Core 2.0 authentication middleware

  4. 4

    Windows Authentication with asp.net core

  5. 5

    Change authentication from no authentication to individual authentication in existing project of Asp.Net Core (MVC)

  6. 6

    Custom Authentication using legacy user table in Asp.Net Core

  7. 7

    Path based authentication in ASP.NET Core MVC 2.0

  8. 8

    ASP.Net Core SignalR authentication always responding with 403 - Forbidden

  9. 9

    Use ADFS-based authentication inside ASP.NET Core to access a SQL Server using Windows authentication?

  10. 10

    How to redirect after Azure AD authentication to different controller action in ASP Net Core MVC

  11. 11

    Using Azure Active Directory authentication in ASP.NET Core 2.0 from Web App to Web API

  12. 12

    How to migrate asp.net core authentication to new Google SignIn service?

  13. 13

    ASP.NET core 2.2: what is the expected behaviour of ChallengeResult when there are multiple authentication schemes configured?

  14. 14

    How best to implement Google social sign-in authentication in ASP.NET Core?

  15. 15

    .NET CoreとASP.NET Core

  16. 16

    ASP.NET CoreIdentityとのSAML統合

  17. 17

    Windows Authentication in .net Core 2.1 application

  18. 18

    Where can I find the ASP.NET Core 2 source code? Specifically for Microsoft.AspNetCore.Authentication.OpenIdConnect

  19. 19

    ASP.NET Core ToHtmlString

  20. 20

    Cookieless ASP.NET Core

  21. 21

    JWT authentication in SignalR (.NET Core) without passing token in Query String

  22. 22

    JWT Authentication for .net core 2.2 application not using Identity

  23. 23

    Custom Role with .NET Core 3 Azure AD Authentication

  24. 24

    asp.netでSAMLを実装する方法は?

  25. 25

    Turn off / Disable windows authentication for asp.net-mvc

  26. 26

    Issues with ASP.NET Forms Authentication on Phonegap (Android)

  27. 27

    WCF authentication using ASP.NET Membership Provider

  28. 28

    Asp.net share forms authentication by two applications in the same domain

  29. 29

    ASP.NET Active Directory Authentication on one form

ホットタグ

アーカイブ