Identityazuretable
This project provides a high performance cloud solution for ASP.NET Identity Core using Azure Table storage replacing the Entity Framework / MSSQL provider.
Package Versioning
Use the unit tests as a guide to seeding operational and configuration data.
- ElCamino.IdentityServer.AzureStorage v7.x match major version of Duende IdentityServer
- ElCamino.IdentityServer4.AzureStorage v2.x uses IdentityServer4 >= 4.x
- ElCamino.IdentityServer4.AzureStorage v1.x uses IdentityServer4 2.x & 3.x
Duende IdentityServer v7
IdentityServer4 v3 to v4
Config changes to support ApiScope blobs
New config settings, complete settings further down.
{
{
...
"resourceStorageConfig": {
"apiScopeBlobContainerName": "idsrv4apiscopes",
"apiScopeBlobCacheContainerName": "idsrv4apiscopescache",
}...
}
}
Changes to startup.cs
Important
Breaking changes
There are breaking changes when moving to IdentityServer4 v3 to v4. and respectively upgrading ElCamino.IdentityServer4.AzureStorage v1.x to v2.x. Shown below in complete context, add .MigrateResourceV3Storage() into the startup services pipline. Must be added after services.AddIdentityServer().AddResourceStore() in the pipeline. Remove after the first run.
Getting Started
startup.cs
using ElCamino.IdentityServer.AzureStorage.Stores;
using ElCamino.IdentityServer.AzureStorage.Services;
using Duende.IdentityServer;
...
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddMvc();
...
//Add the Custom IdentityServer PersistentGrantStorageContext/Create Storage Table
services.AddPersistedGrantContext(Configuration.GetSection("IdentityServer:persistedGrantStorageConfig"))
.CreatePersistedGrantStorage() //Can be removed after first run.
.AddClientContext(Configuration.GetSection("IdentityServer:clientStorageConfig"))
.CreateClientStorage() //Can be removed after first run.
.AddResourceContext(Configuration.GetSection("IdentityServer:resourceStorageConfig"))
.CreateResourceStorage() //Can be removed after first run.
.AddDeviceFlowContext(Configuration.GetSection("IdentityServer:deviceFlowStorageConfig"))
.CreateDeviceFlowStorage() //Can be removed after first run.
.AddSigningKeyContext(Configuration.GetSection("IdentityServer:signingKeyStorageConfig"))
.CreateSigningKeyStorage(); //Can be removed after first run.
// Adds IdentityServer
services.AddIdentityServer()
.AddSigningCredential(credential)
.AddResourceStore<ResourceStore>()
.AddClientStore<ClientStore>()
.AddCorsPolicyService<StorageCorsPolicyService>()
.AddPersistedGrantStore<PersistedGrantStore>()
.AddDeviceFlowStore<DeviceFlowStore>()
.AddSigningKeyStore<SigningKeyStore>()
...
//Use for migrating ApiScopes from IdentityServer4 v3 ApiResources
//Must be added after services.AddIdentityServer().AddResourceStore() in the pipeline
//services.MigrateResourceV3Storage();
...
appsettings.json
{
"IdentityServer": {
"persistedGrantStorageConfig": {
"storageConnectionString": "UseDevelopmentStorage=true;",
"blobContainerName": "idsrv4persistedgrants",
"persistedGrantTableName": "idsrv4persistedgrant",
"enableTokenCleanup": true,
"tokenCleanupInterval": 3600,
"tokenCleanupBatchSize": 100
},
"clientStorageConfig": {
"storageConnectionString": "UseDevelopmentStorage=true;",
"blobContainerName": "idsrvclientconfig",
"blobCacheContainerName": "idsrvclientconfigcache",
"enableCacheRefresh": true,
"cacheRefreshInterval": 1800
},
"resourceStorageConfig": {
"storageConnectionString": "UseDevelopmentStorage=true;",
"apiTableName": "idsrvapiscopeindex",
"apiBlobContainerName": "idsrvapiresources",
"apiScopeBlobContainerName": "idsrvapiscopes",
"identityBlobContainerName": "idsrvidentityresources",
"apiBlobCacheContainerName": "idsrvapiresourcescache",
"apiScopeBlobCacheContainerName": "idsrvapiscopescache",
"identityBlobCacheContainerName": "idsrvidentityresourcescache",
"enableCacheRefresh": true,
"cacheRefreshInterval": 1800
},
"deviceFlowStorageConfig": {
"storageConnectionString": "UseDevelopmentStorage=true;",
"blobUserContainerName": "idsrvdeviceflowusercodes",
"blobDeviceContainerName": "idsrvdeviceflowdevicecodes"
},
"signingKeyStorageConfig": {
"storageConnectionString": "UseDevelopmentStorage=true;",
"blobContainerName": "idsrvsigningkeys"
}
}
}
A blog for modern software development
Subscribe and get the latest blog post in your inbox.
Software as a Service
Price Steady
Customized, Hosted Subscription Pricing Pages Up Quickly With No And Low Code Options.
Optic Nerve AI
No code, first class import/publish with Azure, Google cloud custom vision AI services.