SAML 2.0 on .net 4.0 - .net-4.0

I am implementing a saml2.0 on a .NET 4.0 what do you recommend on building the metadata for Service Provider ? How should I build it. and the certificate How could I generate on a production environment
I do not want to upgrade the application to 4.5 yet as it can have an effect to some implementation.
Any help would be appreciated.
Thank you

The problem is that .NET 4.0 do not implement the needed SAML 2.0 token handling and signing functionality required for implementing the SAML 2.0 standard. These needed functionalities first came in .NET 4.5.
The ITfoxtec Identity Saml2 packaged add support for the SAML 2.0 standard on top of the functionality implemented in .NET. The package is really a thin rapper adding extra functionality.
There are maybe other SAML 2.0 implementation which have implemented the holde SAML 2.0 standard without relying on the .NET functionality and thereby support .NET 4.0.

Related

OWIN Authentication, Authorization code migration from .net framework to .net 6 (Token based Authentication)

We have implemented OWIN Authorization to our Web Api's in .Net framework project. Now we are migrating this to .Net6. It seems in .net6/.net core owin authentication is not supported.
I don't find any documentation around this.
It seems Microsoft.Owin.OwinMiddleware is not exits in .net core.Also I don't find any Microsoft.Owin.Security.Infrastructure.AuthenticationTokenProvider corresponding nuget packages in .net core.
How can we use OWIN Authorization in .Net core(.net6)? If it is not supported what is alternative to this in .net core
ASP.NET Core using a new authentication middleware which could work like OWIN.
So you could directly using this middleware instead of using owin inside the asp.net core.
For example, if you want to include the MSFT, Goolge, facebook or else, you could refer to this article.

.net core and SAML 2.0

Our University has migrated to a SAML based authentication/authorization method using Shibboleth.
I have been researching for at least a day on how to use SAML with .net core web applications. I can't use Identity server 4 because it is for OaTH/Open ID. I found some documentation on msdn which points to a commercial implementation. I came across this SO answer from a year ago saying Kentor may support it in the future but couldn't find anything on the github page about support for .net core or a .net core sample web app. As of January it was still planned but no date.
The University has the identity provider running. What I don't understand is the following:
How do I set my web application to use that identity provider?
How do I check if that identity provider has already been authenticated for another application, so SSO use?
Also, any sample applications that use SAML without commercial plugins would be greatly appreciated.
ITfoxtec has a ASP.NET MVC Core 1.0 SAML2 plugin, but it requires the .NET Full Framework, and won't run on linux. There's some missing APIs that are preventing full .NET Core support right now for SAML2 (around Crypto XML namespace). https://github.com/ITfoxtec/ITfoxtec.Identity.Saml2
Not exactly what you're looking for I know, but it's an interim solution until probably .NET Standard 2.0, which will probably bring the missing API's to .NET Core.
ITfoxtec Identity Saml2 support .NET Core 2.1 (without the .NET Framework) from version 3.0.0. Project: https://itfoxtec.com/IdentitySaml2
ITfoxtec Identity Saml2 MVC Core support ASP.NET MVC Core 2.1. NuGet package: https://www.nuget.org/packages/ITfoxtec.Identity.Saml2.MvcCore/

Where did the Saml2AuthenticationModule class go?

The Microsoft identity team released a CTP package for WIF back in 2011 adding support for the SAML 2.0 authentication protocol.
http://www.cloudidentity.com/blog/2011/05/16/ATTENTION-ASP-NET-DEVELOPERS-SAML-P-COMES-TO-WIF/
Unfortunately the link to the Microsoft Connect site is dead. Since most WIF functionality has been moved into .NET 4.5 System.IdentityModel namespace, I was hoping to find the Saml2AuthenticationModule class there. However, I cannot find that class anywhere in the identity model assemblies.
Does anyone knows what happened to the SAML 2.0 support classes? Where they migrated to .NET 4.5 System.IdentityModel namespace? If not, is the original CTP package available somewhere?
The WIF SAML stack never made it out of CTP. Had a look around and can't find it anywhere.
It was based on WIF 3.5 so wouldn't run under WIF 4.5 anyway.
My guess it that it was removed because SAML support is non-trivial and you can get the same functionality by federating via ADFS or Azure Active Directory.
There are other libraries available - refer: SAML : SAML connectivity / toolkit.

Build an Active STS using WCF in .net 4.5

I have a scenario whereby i need to build a WCF service to provide custom authentication to 3rd parties non-web application connecting in an "Active" mode - i.e. i cannot present a web login page.
The login mechanism is also custom (i.e. not necessarily username/password), and so i cannot use ADFS or ACS.
I have read up on building active STS using WCF, but they mostly relate to .NET 3.5 and not much has been written around using .NET 4.5 since WIF has been integrated into the framework.
I have read Examples of how to a STS in .Net 4.5 using WCF but it doesn't seem to fit my scenario.
Any pointers appreciated.
Maybe you want to have a look at
http://thinktecture.github.com/Thinktecture.IdentityServer.v2/
This is an open source STS that includes active endpoints.

SharePoint 2010 and SAML 2.0

Can I send SAML 2.0 token to SharePoint 2010 for authentication? I found a sample code in MSDN that connect office 365 in the cloud for the authentication, but the sample code uses SAML 1.1 token.
Does SharePoint work with SAML 2.0 token as well?
No, you can't. Sharepoint supports natively SAML 1.1 for claim-based authentication. To handle SAML 2.0 tokens in Sharepoint 2010, you currently have 3 choices:
develop a custom authentication provider using WIF. That shouldn't
be that complex to do as SAML 2.0 was recently integrated in WIF.
You'll find the library and code samples here:
http://connect.microsoft.com/site1168/Downloads/DownloadDetails.aspx?DownloadID=36088
use Active Directory Federation Services (ADFS). The general idea of
this solution is that Sharepoint delegates authentication to ADFS,
which is configured as a SAML 2.0 Service Provider. Main advantage
of this solution: configuration/installation only, no development.
Obvious downside: much more complex architecture.
wait for Microsoft to implement SAML 2.0 in a future Sharepoint
Service Pack :)
You can create custom Saml2SecurityTokenHandler Class