SAML Authentication with Azure AAD B2C and DotNetCore - .net-core

Guys I have found some links regarding SAML Authentication with AAD but when i go for SAML Authentication with AAD B2C and DotNet Core I didnt find any article on this.
I found that it can be implemented through Custom Policies but how? Didnt find any implementation.
Gone through the links below but havent worked out.
https://cmatskas.com/asp-net-core-saml-authentication-with-azure-ad/
https://learn.microsoft.com/en-us/azure/active-directory-b2c/saml-technical-profile.
It will be nice of you if anyone can help me out with any guidance or any solution so that we can implement SAML with AAD B2C and Dot NetCore?

SAML in B2C using custom policies.
B2C sample code for a web application using .NET Core.
Custom policies are complex - this may help you plus there is a link to a training course at the end.

For information about creating a SAML Relying Party policy for Azure AD B2C, see this sample policy.
(Note that, as at 11 July 2019, support for a SAML Relying Party policy is a preview feature.)
Refer to answers for this SO question for ASP.NET Core authentication middleware that is available for SAML.

Related

Implementing Azure ADFS in Web Forms Application

I have a traditional ASP.NET 3.5 Web Forms application. As of now it is using On-Premise ADFS which is working fine. Now we have a requirement to change on-premise ADFS to Azure ADFS.
In the web.config, I have changed the required URL to point to Azure ADFS but it is not working. I checked Stackoverflow and Googled around but I found examples related to ASP.NET MVC and ASP.NET Core where changes are required in Startup.cs file.
I want to know what all changes are required in my traditional Web Forms application. Any example link would help.
You should be able to get it working by using the Azure AD parameters rather than the ADFS ones e.g. metadata. What protocol are you using?
There are some ADFS samples. Look at the LHS under ADAL and MSAL. These generally start with an Azure AD sample and show how to convert to ADFS. So you can then work "backwards".
Update
I had a look at that code. It looks like OIDC? "Redirect_Uri" is not a WS-Fed parameter.
There is a WS-Fed sample here.

Successfactors SSO with Dotnet API and IdentityServer 4

I have an Dotnet Core API application which uses IdentityServer4 as IDP. The frontend is built in Angular.
Now, I need to connect to Successfactors of one of my client. I understand SAML is the best federation protocol there.
Please suggest what should be my approach here and relevant tutorials that I can follow. I am not getting good google results.
You need a SAML stack.
Microsoft does not have one. So you need to integrate a third-party product.
There are a number of examples here.

Asp.net Identity support for ADFS

We're in the process of migrating our authentication and authorization logic away from the original membership providers. We are currently looking at Asp.net Identity, but no one on the team has experience with this technology. We've been asked to support ADFS in the future and looking to see if this framework directly supports ADFS, which no one on the team has experience with either.
The only article I've found, http://www.cloudidentity.com/blog/2014/02/12/use-the-on-premises-organizational-authentication-option-adfs-with-asp-net-in-visual-studio-2013/ seems to imply asp.net identity will support ADFS as a provider. Are there any other definitive resources for asp.net identity and ADFS?
Regards,
Noobian
ASP.NET Identity offers an "easy" way to add users and authenticate against them in a SQL DB.
ADFS can only authenticate against AD.
WIF is still supported but older - the OWIN WS-Fed libraries are the way to go these days.
If you want to use ASP.NET Identity have a look at thinktecture's IdentityServer. Offers full support for this plus you can federate with ADFS.

WIF SAML 2.0 CTP Identity Provider Initiated SSO

I am developing a single sign on ASP.NET application, and I am trying to decide whether to make use of the WIF SAML 2.0 CTP or instead use ADFS 2.0. I have read several places that the WIF SAML 2.0 CTP enables identity provider initiated SSO, but I can't find any examples or tutorials anywhere. Does anyone know a good resource for becoming familiar with the methods of doing this using WIF CTP?
The SAML2 CTP is pre-release and I am really sceptical that this will ever RTM. So I wouldn't use it.
So you want SSO from your ASP.NET application to a SAML IdP?
It sounds like you've figured out that you can either go direct to the SAML IdP by adding a SAML stack to your application or by going WS-Fed to ADFS and then SAML to the IdP.
As mentioned the SAML CTP has been in CTP for ages and there is little documentation.
Have a look at the OpenSSO Fedlet.
However, you will probably find the ADFS option both quicker and easier.

How to implement DotNetOpenAuth as Oauth provider in MVC3 .net?

I have been researching for a while now about how to implement an OAuth provider to secure my web api, but without good results.
For what I've seen so far, apparently there are only three libraries to develop an OAuth provider in .net:
1- DotNetOpenAuth
2- DevDefined
3- OAuth.net from madgex
madgex doesn't have any documentation for providers at all, at leats I haven't found anything, same with DevDefined, well, the last one has some documentation, but it lacks samples.
DotnetOpenAuth I think is the one most developers use, but I'm having a hard time to understand its samples, and documentation is terrible.
Has anybody implemented any of these libraries to write an Oauth PROVIDER, NOT CONSUMER, or anyone knows where I can find a decent documentation fro any of these.
For the record im trying to develop a 3-legged oauth provider.
Can anybody help me out here??
Have you checked out this project template, which although it's MVC 2 should provide some useful ideas for doing it in MVC 3:
http://visualstudiogallery.msdn.microsoft.com/81153747-70d7-477b-b85a-0374e7edabef
Then there is the OAuthServiceProvider sample that comes with DotNetOpenAuth, which is WebForms but the principles are mostly the same.
A good sample of DotNetOpenAuth implementation could be found here Releasing an ASP.NET MVC 3 OpenId StarterKit under Open Source License
Project url: http://mvcopenid.codeplex.com/
It should be good for you to start with.
UPDATE
By the way in ASP.NET MVC 4 third party auth providers it is out of the box.
I have followed the steps mentioned at https://github.com/DotNetOpenAuth/DotNetOpenAuth/wiki/Security-scenarios to implement an OAuth 2.0 authorization service.
I have used the below link to create security certificates:
http://www.jayway.com/2014/09/03/creating-self-signed-certificates-with-makecert-exe-for-development/
Don't forget to change your solution to use the thumbprints from the certificates created by you.
This is the best place to understand the OAuth 2 protocol:
https://www.rfc-editor.org/rfc/rfc6749

Resources