-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move all of DataProtection and Extensions.Identity to netstandard2.0 #11008
Conversation
@natemcmaster @blowdart this seems a bit scary as the NetCorePbkdf2Provider provider is using a netcore DeriveBytes API, I only started with a few of the DP.abstractions packages and KeyDerivation which is the main thing that Identity needs for the password hasher. I also reverted the Apr 26 PR that switched the password hasher to use CryptographicOperations.FixedTimeEquals (2b2aeee) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start, but let's use cross compiling to keep existing improvements.
...ection/Cryptography.KeyDerivation/src/Microsoft.AspNetCore.Cryptography.KeyDerivation.csproj
Outdated
Show resolved
Hide resolved
src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/NetCorePbkdf2Provider.cs
Outdated
Show resolved
Hide resolved
src/Identity/Extensions.Core/src/Microsoft.Extensions.Identity.Core.csproj
Outdated
Show resolved
Hide resolved
Okay so I took a stab at switching DP to netstandard and the issue is the
Was there any prior discussion about how this should be resolved? |
@natemcmaster @ajcvickers what do you guys think about merging the identity + some of dataprotection changes since this at least enables extensions identity + dp abstractions / keyderivations to be used on netstandard 2.0. I can open another PR addressing the gnarly hosting + DP when we have agreed on an approach |
Discussed briefly with @ajcvickers. I'm okay merging the changes in this PR as long as you update the description to remove the "fixes #3774" description. The goal of #3774 was to support packages which are both .NET Standard and do not have a dependency on the .NET Core shared framework, and this PR doesn't yet satisfy that criteria. To complete that issue, you'll need to address the DP -> Hosting dependency. Here are my thoughts on ways you might solve this: #3774 (comment). Also, to make the packages available as packages, you need to set |
Removed fix comment and added |
@@ -2,7 +2,9 @@ | |||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | |||
|
|||
using System; | |||
#if NETCOREAPP3_0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYi @BrennanConroy I had to add this guard around the using buffers introduced from the spanify web encoders change last week since it isn't available in netstandard 2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍
This should now fix #3774 pending the resolution of IHostedService not running before the server starts :( |
src/DataProtection/DataProtection/src/Microsoft.AspNetCore.DataProtection.csproj
Show resolved
Hide resolved
In WebHost IHostedServices are started just after the server. In generic Host the web app is an IHostedService and they're started in registration order. Try testing with generic host to make sure you can get the ordering right. For WebHost it looks like IHostedServices is better than first-request, but not quite as good as IStartupFilter. |
This reverts commit 2b2aeee.
…pNetCore.Cryptography.KeyDerivation.csproj Co-Authored-By: Nate McMaster <[email protected]>
Co-Authored-By: Nate McMaster <[email protected]>
…aProtection.csproj Co-Authored-By: Doug Bunting <[email protected]>
Figured out the diff was trailing whitespace in the sharedframework.local...grrr |
Per offline thread with @Tratcher and @davidfowl this seems good enough for preview 7, will tweak in subsequent PRs as needed |
First part of #3774 this will allow Extensions.Identity.Core Stores, and a few parts of data protection to target netstandard 2.0