-
Notifications
You must be signed in to change notification settings - Fork 415
Migrating from Katana (OWIN) 3.x to 4.x
Maria Furman edited this page Aug 28, 2018
·
3 revisions
Asp.Net Core uses IdentityModel 5.x for runtime support. IdentityModel 4.x uses System.IdentityModel.dll for Crypto, Token, and Key support. It was not possible or desirable to port System.IdentityModel.dll to .Net Core, so IdentityModel 5.x was developed from the ground up to provide targets for .Net Core and .Net Desktop applications.
This left developers in a bad spot. We updated Katana 4.x to take a dependency on IdentityModel 5.x and are committed to maintaining back-compat moving forward.
- Microsoft.IdentityModel.Protocol.Extensions - open source
- System.IdentityModel - .NetDesktop
- System.IdentityModel.Tokens.Jwt - open source
- Microsoft.IdentityModel.Logging
- Microsoft.IdentityModel.Protocols
- Microsoft.IdentityModel.Protocols.OpenIdConnect
- Microsoft.IdentityModel.Protocols.WsFederation
- Microsoft.IdentityModel.Tokens
- Microsoft.IdentityModel.Tokens.Saml
- Microsoft.IdentityModel.Xml
- System.IdentityModel.Tokens.Jwt
When upgrading to Katana 4.0, it is important to remove all references to IdentityModel 4.x in your project file (listed below):
- System.IdentityModel.Tokens.Jwt
- Microsoft.IdentityModel.Protocol.Extensions
- You must upgrade your project to a minimum .Net 4.5.1
- Users have had breaking experiences when simply upgrading System.IdentityModel.Tokens.Jwt from 4.x to 5.x.
- Conceptually we now use SecurityKey instead of SecurityToken for crypto operations. This will break users that are adding keys for validation. Just return SecurityKey.
- Types have moved into different namespaces. For example TokenValidationParameters is now in Microsoft.IdentityModel.Tokens rather than System.IdentityModel.Tokens.Jwt. There are several such changes.
- Each assembly now has a numerical space set aside for it's id's. So some exceptions id's (IDxxxx numbers) have changed. This allows us to return unique id's for all errors.
- Microsoft.IdentityModel.Tokens types are used for SecurityToken , SecurityKey and CryptoOperations. There is quite a bit of conceptional difference between the old and new. Previous versions of IdentityModel viewed a SecurityKey as having intelligence and could return an algorithm. We now think of SecurityKey as just data that is used by a CryptoOperator (such as SignatureProvider) to perform operations.
Conceptual Documentation
- Using TokenValidationParameters.ValidateIssuerSigningKey
- Scenarios
- Validating tokens
- Outbound policy claim type mapping
- How ASP.NET Core uses Microsoft.IdentityModel extensions for .NET
- Using a custom CryptoProvider
- SignedHttpRequest aka PoP (Proof-of-Possession)
- Creating and Validating JWEs (Json Web Encryptions)
- Caching in Microsoft.IdentityModel
- Resiliency on metadata refresh
- Use KeyVault extensions
- Signing key roll over