Use HashiCorp Vault C# Client with .NET Core
New step-by-step tutorials to demonstrate the use of Vault C# client library to leverage HashiCorp Vault in your .NET applications.
When you have an application that reads data from a database, you can leverage Vault's database secrets engine to dynamically generate a short-lived username and password to secure the database access.
![Scenario diagram](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1606943444-dotnet-blog-1.png&w=3840&q=75)
This sounds easy, but to accomplish this, your application must:
- Authenticate with Vault and acquire a token
- Use the token to request database credentials from Vault
- Connect to the target database using the credentials managed by Vault
To demonstrate the end-to-end workflow, we introduced the Using HashiCorp Vault C# Client with .NET Core tutorial. You will see how an ASP.NET Core application uses the Vault Sharp client library to authenticate with Vault and then acquire database credentials to read data from a database.
At the end of this tutorial, it will present another challenge. By keeping the database credentials short-lived, you secure the database connection. However, you now must build additional logic into your application to watch for changes in dynamic secrets and reload. To address this, the Using HashiCorp Vault Agent with .NET Core tutorial demonstrates the use of Vault Agent.
If you are running .NET applications, visit the Vault Learn page to find these two new tutorials.
![Vault Learn](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1606943097-dotnet-blog-2.png&w=3840&q=75)
Sign up for the latest HashiCorp news
More blog posts like this one
![Why use Vault-backed dynamic credentials to secure HCP Terraform infrastructure?](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1572286031-vault-terraform-background.png&w=1920&q=75)
Why use Vault-backed dynamic credentials to secure HCP Terraform infrastructure?
Learn how HCP Terraform and Terraform Enterprise users can use Vault-backed dynamic credentials to secure their infrastructure during provisioning better than the base-level dynamic provider credentials.
![Solving the data security challenge for AI builders](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1714171278-blog-library-product-vault-black.jpg&w=3840&q=75)
Solving the data security challenge for AI builders
This demo highlights the potential risks of using contextual data with LLMs and demonstrates how HashiCorp Vault can integrate with Pinecone to tackle AI data security challenges.
![PKI certificate metadata in Vault](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1695238878-vault-keys-pki-imagery.png&w=3840&q=75)
PKI certificate metadata in Vault
Creating and using custom metadata helps you better manage and scale your PKI certificates with HashiCorp Vault.