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.
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.
Sign up for the latest HashiCorp news
More blog posts like this one
Fix the developers vs. security conflict by shifting further left
Resolve the friction between dev and security teams with platform-led workflows that make cloud security seamless and scalable.
HashiCorp at AWS re:Invent: Your blueprint to cloud success
If you’re attending AWS re:Invent in Las Vegas, Dec. 2 - Dec. 6th, visit us for breakout sessions, expert talks, and product demos to learn how to take a unified approach to Infrastructure and Security Lifecycle Management.
HCP Vault Secrets adds enterprise capabilities for auto-rotation, dynamic secrets, and more
HCP Vault Secrets focuses on making a fast and easy path for secure development with key new features including auto-rotation (GA), dynamic secrets (beta), a new secret sync destination, and more.