ElCamino.IdentityServer.AzureStorage 6.1.2

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package ElCamino.IdentityServer.AzureStorage --version 6.1.2                
NuGet\Install-Package ElCamino.IdentityServer.AzureStorage -Version 6.1.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ElCamino.IdentityServer.AzureStorage" Version="6.1.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ElCamino.IdentityServer.AzureStorage --version 6.1.2                
#r "nuget: ElCamino.IdentityServer.AzureStorage, 6.1.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ElCamino.IdentityServer.AzureStorage as a Cake Addin
#addin nuget:?package=ElCamino.IdentityServer.AzureStorage&version=6.1.2

// Install ElCamino.IdentityServer.AzureStorage as a Cake Tool
#tool nuget:?package=ElCamino.IdentityServer.AzureStorage&version=6.1.2                

identityserver4-azurestorage

Uses Azure Blob and Table Storage services as an alternative to Entity Framework/SQL data access for IdentityServer4 and Entity Framework/SQL data access for Duende IdentityServer. Use the unit tests as a guide to seeding operational and configuration data.

  • ElCamino.IdentityServer.AzureStorage v6.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

Build Status

NuGet Badge

NuGet Badge

Duende IdentityServer v6

  • Removed Newtonsoft.Json
  • Updated to Azure.Data.Tables SDK
  • Added support for SignedKeys Store

IdentityServer4 v3 to v4

There are breaking changes when moving to IdentityServer4 v3 to v4. and respectively upgrading ElCamino.IdentityServer4.AzureStorage v1.x to v2.x.

Config changes to support ApiScope blobs

New config settings, complete settings further down.

{": {
   ...
    "resourceStorageConfig": {
      "apiScopeBlobContainerName": "idsrv4apiscopes",
      "apiScopeBlobCacheContainerName": "idsrv4apiscopescache",
    }...
  }
}

Changes to startup.cs

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"
    }
  }
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.0.0 1,299 1/26/2024
6.3.0 264 11/23/2023
6.1.2 817 8/20/2022
6.0.0 449 7/29/2022