You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/docs/en/Migration-Guides/Abp-4_0.md

2.8 KiB

ABP Framework 3.3 to 4.0 Migration Guide

Identity Server Changes

ABP Framework upgrades the IdentityServer4 library from 3.x to 4.x with the ABP Framework version 4.0. IdentityServer 4.x has a lot of changes, some of them are breaking changes in the data structure.

Database Changes

So, if you are upgrading from 3.x, then there are some change should be done in your database.

ApiScope

As the most important breaking change, Identity Server 4.x places the ApiScope as an independent aggregate root. Previously it was a part of the to ApiResource aggregate. This requires manual operation. See the Database Migration section.

Also, added Enabled(string) and Description(bool,true) properties.

Client

  • Added RequireRequestObject (bool) and AllowedIdentityTokenSigningAlgorithms (string) properties.
  • Changed default value of RequireConsent from true to false.
  • Changed default value of RequirePkce from false to true.

DeviceFlowCodes

  • Added SessionId (string) and Description (string) properties.

PersistedGrant

  • Added SessionId (string) and ShowInDiscoveryDocument (bool, default: true) properties

ApiResource

  • Added AllowedAccessTokenSigningAlgorithms (string) and Description (string) and ConsumedTime (DateTime?) properties

ApiScope

  • Before it was a property of ApiResource, now it becomes an independent aggregate root.

Migrating the Database

Attention: Please backup your database before the migration!

If you are using Entity Framework Core, you need to add a new database migration, using the Add-Migration command, and apply changes to the database. Please review the migration script to understand if it effects your existing data. Otherwise, you may loose some of your configuration.

If you haven't customize the IdentityServerDataSeedContributor and haven't customized the initial data inside the IdentityServer* tables;

  1. Update IdentityServerDataSeedContributor class by comparing to the latest code. You probably only need to add the CreateApiScopesAsync method and the code related to it.
  2. Then you can simply clear all the table data in these tables then execute the DbMigrator application again to fill it with the new configuration.

If you've customize your IdentityServer configuration in the database or in the seed data, you should understand the changes and upgrade your code/data accordingly.