SAML2 icon indicating copy to clipboard operation
SAML2 copied to clipboard

does it support .net core?

Open emailtowalter opened this issue 8 years ago • 28 comments

Need to have saml as service prodiver to validate the saml 2 token using .net core.

Supported?

Thanks

emailtowalter avatar Jul 04 '16 19:07 emailtowalter

.net core does not yet support XmlDocument and a lot of things around SignedXml etc... If you grabbed those classes from the .net45 source code and ported them then yes it would work

eByte23 avatar Jul 10 '16 08:07 eByte23

Any update on this please?

ravipunjwani avatar Nov 09 '16 21:11 ravipunjwani

Still the same story, .netstandard2.0 will reimplemented 99% off old .net461 api so the .netcore support would be possible

eByte23 avatar Nov 09 '16 21:11 eByte23

.netstandard2.0 is slated for next year some time

eByte23 avatar Nov 09 '16 21:11 eByte23

Thanks @eByte23 for the quickest reply ever.

The waiting is too much and I don't think it would be easier for me at this moment to manage the same from net45 source code. Can you suggest any other quickest workaround?

Thanks though.

ravipunjwani avatar Nov 09 '16 21:11 ravipunjwani

If the implementation for the SignedXml and other xml apis have already been done the you could build your own version of system.xml.* from corefx and convert this project to dotnetcore style and reference that library

eByte23 avatar Nov 10 '16 03:11 eByte23

I tried a remake of whole solution into a solution with .net core project starting with SAML2.Core. Failed badly as many of the libraries are yet to be implemented. Especially Cryptography.Xml*

Trying out something else now

ravipunjwani avatar Nov 10 '16 03:11 ravipunjwani

Yes i dont believe those apis are available in current stable build. You would have to get code from github and build it

eByte23 avatar Nov 10 '16 03:11 eByte23

For a while, I dropped idea of going with this. Will try with Kentor.AuthServices.AspNetCore and see if that works out for me. Or else will come back to this library continuing porting to core.

ravipunjwani avatar Nov 10 '16 03:11 ravipunjwani

Kentor only supports fullframework net451

eByte23 avatar Nov 10 '16 03:11 eByte23

KentorIT/authservices#489 The work is in progress and another branch available to test out: KentorIT/authservices/aspnetcore

The work is pending to be merged due to tests only.

ravipunjwani avatar Nov 10 '16 03:11 ravipunjwani

But that pr still only supports full framework though if you check the project json. It must be netstandard or netcoreapp to support core xplat

eByte23 avatar Nov 10 '16 03:11 eByte23

Yes that's the problem right here, right now! A day is lost. 👎

ravipunjwani avatar Nov 10 '16 03:11 ravipunjwani

So your obviously trying to run xplat correct?

eByte23 avatar Nov 10 '16 03:11 eByte23

Well not really, but I thought of keeping it xplat. Current platform is IIS with everything up and running. But I would still love to go with "No Managed Code".

I guess it would just take a bit of configuration in my project.json to refer 4.5 and get my project running, at least on IIS. Am i right?

ravipunjwani avatar Nov 10 '16 03:11 ravipunjwani

I believe you can run it in the same matter if it is full framework however i have not run full framework under iis only core xplat

eByte23 avatar Nov 10 '16 04:11 eByte23

Yes it would work well. However, I have another console application that depends on my web project.

This console app references another nuget package also, that serves only .netstandard. So if I make my web project full framework, the console app suffers. :)

ravipunjwani avatar Nov 10 '16 04:11 ravipunjwani

Does it actually depend on mvc things? Or just your code? If so extract the code out to a netstandard lib and reference it from web and console that way not taking a dep on the web project.

eByte23 avatar Nov 10 '16 05:11 eByte23

Any update now .NET Core 2.0 has been released?

AshleyPoole avatar Sep 15 '17 08:09 AshleyPoole

You should check my repo SAMLSilly


From: Ashley Poole [email protected] Sent: Friday, September 15, 2017 6:53:20 PM To: elerch/SAML2 Cc: Elijah Bate; Mention Subject: Re: [elerch/SAML2] does it support .net core? (#17)

Any update now .NET Core 2.0 has been released?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/elerch/SAML2/issues/17#issuecomment-329722667, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIJiax_7bjINy0Vfo2rlVA6Nnfb039gCks5sijsAgaJpZM4JEn3V.

eByte23 avatar Sep 15 '17 13:09 eByte23

It was originally a fork but is diverging too much

eByte23 avatar Sep 15 '17 13:09 eByte23

This is definitely on my todo list, but carving out time on the project has been extremely difficult. I'm certainly open to PRs until I can get around to it. @eByte23 - what are your thoughts on creating a separate project we can co-own ?

elerch avatar Sep 20 '17 17:09 elerch

I've been looking at what it would take to port the Kentor.AuthServices library to .NET Core for ASP.NET Core 2 and can give you some pointers:

  • You should target .NetStandard and not .NET Core directly. That way the same lib can run on both the full .NET Framework and .NET Core.
  • The important stuff for SAML2 token handling has been moved to a Microsoft.IdentityModel nuget package. Currently the dev branch has SAML2 support available: https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/tree/dev

AndersAbel avatar Sep 20 '17 18:09 AndersAbel

Hi All. @elerch - Happy to do that but there are alot of things I have started to change over in the SamlSilly repo.

  • Support for ADFS and AzureAD
  • Support for SHA256/SHA512 Sigs and encryption
  • Making the metadata more compatible with IDP's

As well as the last task before I moved jobs was I wanted to start to remove all the Exceptions being throw everywhere. Alot of that is really invalid ways of handling code paths so I was started to create a "ValidationObjectResult" class that would return list ValidationObjects that you could filter based on your requirements e.g. When the document is return the Signature would also be checked by default and then if you opted that the signature was to be ignored then the validationObjectResult would then ignore that.

As I said more than happy to create another repo that we can co-own, there would just be alot of work I'd like to do before doing a proper release.

eByte23 avatar Sep 20 '17 22:09 eByte23

Also @AndersAbel I have already done the targeting netstandard but I have had a chance to look at the new IdentityModel. I just did now and it doesn't look to challenging to implement.

eByte23 avatar Sep 20 '17 23:09 eByte23

It's been a couple months, any progress on this? I see even paid libraries by componentpro and componentspace are struggling to provide libraries that can be used for this.

VictorioBerra avatar Dec 14 '17 17:12 VictorioBerra

Just to correct @VictorioBerra, ComponentSpace has had a .NetStandard 2.0 SAML library available for a few months now. This is a commercial product. https://www.nuget.org/packages/ComponentSpace.Saml2/

componentspace avatar Dec 16 '17 05:12 componentspace

Thanks @componentspace, we will look into your product.

VictorioBerra avatar Dec 17 '17 19:12 VictorioBerra