Couchbase as key storage provider

I’ve been trying to use Couchbase as the main repository for a multi instances application.
I’ve already found out the extensions to have distributed caching (Couchbase.Extensions.Caching) and sessions (Couchbase.Extensions.Session) but I’m stuck with DataProtection.

Looking here https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/implementation/key-storage-providers?view=aspnetcore-6.0&tabs=visual-studio I think I could try using the official Entity Framework Core provider and setting Couchbase as EF DBContext but I’d prefer to not have EF just for the DataProtection service.

Is there any .NET Core DataProtection provider that uses Couchbase?
Or maybe I could create one from scratch but I don’t really know if there’s some caveat I should be careful of…

I’m unaware of a DataProtection provider based on Couchbase. I think I may have made my own years ago, in the .NET Core 1.1 days, but these days I prefer to avoid storing key material in the DB. I work on apps in AWS, so I just use the libs provided by Amazon that use their Key Management Service to support the DataProtection APIs. I would imagine other cloud providers have similar services. It’s more secure and simpler.

The fact is our apps need to run both on cloud and on premise, in a close environment, and in the latter we prefer to have as few components as possible, thus not having Redis or other stuff unless really really needed.
I could investigate the DIY and the EF Core ways, but maybe a simple network share could be a better solution.

To my knowledge, there is no current EF Core provider for Couchbase, so I think you’d be rolling your own.

1 Like