Skip to content

Change DataProtection projects to target netcoreapp3.0 - #4473

Merged
Tratcher merged 1 commit into
masterfrom
tratcher/3/dataprotection
Dec 12, 2018
Merged

Tratcher merged 1 commit into
masterfrom
tratcher/3/dataprotection

Conversation

@Tratcher

@Tratcher Tratcher commented Dec 6, 2018

Copy link
Copy Markdown
Member

#3754 The net461 only SystemWeb project was removed.

@Tratcher Tratcher added this to the 3.0.0-preview2 milestone Dec 6, 2018
@Tratcher Tratcher self-assigned this Dec 6, 2018
@Tratcher
Tratcher force-pushed the tratcher/3/dataprotection branch from e698469 to 3d16ba4 Compare December 6, 2018 19:07
@natemcmaster

natemcmaster commented Dec 6, 2018 •

Copy link
Copy Markdown
Contributor

We're adding required PR checks to ensure the repo compiles before you merge. Can you update this PR by rebasing on master?

git fetch origin master:master
git rebase master

Alternative: if you plan to 'squash merge' this PR, you can also use a merge to update this PR. This can be easier to manage if you have lots of changes in this PR.

git fetch origin master:master
git merge master

dougbu
dougbu previously requested changes Dec 6, 2018

@dougbu dougbu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the CI failures, looks like src\Security\src\Microsoft.Owin.Security.Interop\Microsoft.Owin.Security.Interop.csproj needs to be updated before or as part of this change. Otherwise, looks good!

@Tratcher

Tratcher commented Dec 7, 2018

Copy link
Copy Markdown
Member Author

Rebased after removing Microsoft.Owin.Security.Interop.

@natemcmaster

Copy link
Copy Markdown
Contributor

Do we intend to keep shipping Microsoft.Extensions.Identity.{Core, Stores} as NuGet packages? This is a scenario we didn't know about when we discussed DP 3.0 with Barry.

cc @HaoK

2018-12-07T18:26:00.3046226Z D:\a\1\s\src\Identity\src\Core\Microsoft.Extensions.Identity.Core.csproj : error NU1202: Package Microsoft.AspNetCore.Cryptography.KeyDerivation 3.0.0-preview-18607-15 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Microsoft.AspNetCore.Cryptography.KeyDerivation 3.0.0-preview-18607-15 supports: netcoreapp3.0 (.NETCoreApp,Version=v3.0) [D:\a\1\s\src\Identity\Identity.sln]
2018-12-07T18:26:00.3046785Z D:\a\1\s\src\Identity\src\Stores\Microsoft.Extensions.Identity.Stores.csproj : error NU1202: Package Microsoft.AspNetCore.Cryptography.KeyDerivation 3.0.0-preview-18607-15 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Microsoft.AspNetCore.Cryptography.KeyDerivation 3.0.0-preview-18607-15 supports: netcoreapp3.0 (.NETCoreApp,Version=v3.0) [D:\a\1\s\src\Identity\Identity.sln]

@HaoK

HaoK commented Dec 7, 2018

Copy link
Copy Markdown
Member

Yeah I don't see any reason why we would change those packages, what's the issue with them?

@Tratcher

Tratcher commented Dec 7, 2018

Copy link
Copy Markdown
Member Author

They depend on DataProtection which is moving to netcoreapp3.0.

@natemcmaster
natemcmaster requested a review from Eilon December 7, 2018 19:16
@natemcmaster

Copy link
Copy Markdown
Contributor

The transitive graph of Microsoft.Extensions.Identity.Stores includes the packages below. Based on our latest review of packages and frameworks, it appears we need to keep the following supporting .NET Standard 2.0

  • Microsoft.Extensions.Identity.Stores
  • Microsoft.Extensions.Identity.Core
  • Microsoft.AspNetCore.Cryptography.KeyDerivation
  • Microsoft.AspNetCore.Cryptography.Internal

We also need to ensure all of these end up in the right packaging group. It looks like we only have Identity.Stores and Cores in the list correctly, and are missing the Cryptography packages: https://github.com/aspnet/AspNetCore/blob/f1aacdbaa8b7a2b82163c19b8a03496ba6951cf5/build/SharedFrameworkOnly.props#L1-L31

cc @Eilon @DamianEdwards

@HaoK

HaoK commented Dec 7, 2018

Copy link
Copy Markdown
Member

Hrm yeah this is due to the password hasher using key derivation which is pretty core to identity...

@Tratcher

Tratcher commented Dec 7, 2018

Copy link
Copy Markdown
Member Author

Or these aren't proper Extensions packages and they need to get recategorized under AspNetCore, moved to netcoreapp3.0, shared framework, etc..

@ajcvickers

Copy link
Copy Markdown
Contributor

@natemcmaster What is the reason for these shipping as packages? Are there dependencies that force this? If not, maybe all of Identity should be shared framework only?

@HaoK

HaoK commented Dec 7, 2018

Copy link
Copy Markdown
Member

Yeah I'm guessing we didn't realize the password hasher was tied to aspnet core due to using keyderivation at the time. Another option would be to switch the default implementation to something that didn't use AspNet encryption, and move that to the AspNet.Identity package. So if you are only using the Core packages you get a different password hasher than before (but I'm assuming we could make it still work the same @blowdart ?)

@blowdart

blowdart commented Dec 7, 2018

Copy link
Copy Markdown
Contributor

Duplicated code for password hashing seems like a bad bad idea, because you know we'll forget to update one when we update the other

@Tratcher

Tratcher commented Dec 7, 2018 •

Copy link
Copy Markdown
Member Author

Offline notes from @DamianEdwards:

  • The packages depended on AspNetCore DataProtection
  • The namespaces inside the packages are all AspNetCore, not Extensions
  • We should treat these components as part of AspNetCore rather than Extensions (netstandard3.0, shared framework, etc..)
  • Consider renaming the packages to AspNetCore

@dougbu

dougbu commented Dec 7, 2018

Copy link
Copy Markdown
Contributor

Consider renaming the packages to AspNetCore

Is it 🆗 that this would be a breaking change to Microsoft.AspNetCore.App.nupkg and the shared framework?

At least making Microsoft.Extensions.Identity.Stores and Microsoft.Extensions.Identity.Core also netcoreapp3.0 sounds good to me.

@HaoK

HaoK commented Dec 7, 2018

Copy link
Copy Markdown
Member

In the fairly recent past (past month) when ppl asked about renaming the packages we decided it wasn't worth the breaking change

@Tratcher
Tratcher force-pushed the tratcher/3/dataprotection branch from e52f873 to 32b4749 Compare December 12, 2018 17:10
@Tratcher

Copy link
Copy Markdown
Member Author

Rebased. This should be unblocked now.

@Tratcher
Tratcher merged commit 12966c6 into master Dec 12, 2018
@Tratcher
Tratcher deleted the tratcher/3/dataprotection branch December 12, 2018 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants