A collection of copy-pastable code example snippets demonstrating the various ways to use the Vault client libraries for various languages to authenticate and retrieve secrets.
Find the relevant directory for the concept you're interested in learning about, then find the file for your language of choice. You can use the example code as a reference or paste it into your application and tweak as needed. Each concept's directory also contains a readme explaining some of the specific terminology and operational setup.
This repo is not intended to be "run" as a standalone application.
For an out-of-the-box runnable sample app, please see our Hello-Vault repos.
Hello-Vault:
For complete, runnable client application examples that demonstrate real-world Vault integration patterns, see the Client Applications directory.
These examples include:
Each example includes:
See the Client Applications README for more details.
For examples demonstrating how to secure a Spring AI Model Context Protocol (MCP) server using HashiCorp Vault for API key management, see the Spring AI MCP Server with Vault directory.
This example demonstrates:
See the Spring AI MCP Server with Vault README for more details.
For examples demonstrating Vault integration with Model Context Protocol (MCP) servers for identity-aware credential management, see the MCP Examples directory.
The identity-aware remote example demonstrates:
See the MCP Remote Vault Demo README and Quick Start Guide for more details.
If you would like to submit a code example to this repo, please create a file containing one function (or a grouping of several related functions) in the appropriate directory.
A collection of copy-pastable code example snippets demonstrating the various ways to use the Vault client libraries for various languages to authenticate and retrieve secrets.
Find the relevant directory for the concept you're interested in learning about, then find the file for your language of choice. You can use the example code as a reference or paste it into your application and tweak as needed. Each concept's directory also contains a readme explaining some of the specific terminology and operational setup.
This repo is not intended to be "run" as a standalone application.
For an out-of-the-box runnable sample app, please see our Hello-Vault repos.
Hello-Vault:
For complete, runnable client application examples that demonstrate real-world Vault integration patterns, see the Client Applications directory.
These examples include:
Each example includes:
See the Client Applications README for more details.
For examples demonstrating how to secure a Spring AI Model Context Protocol (MCP) server using HashiCorp Vault for API key management, see the Spring AI MCP Server with Vault directory.
This example demonstrates:
See the Spring AI MCP Server with Vault README for more details.
For examples demonstrating Vault integration with Model Context Protocol (MCP) servers for identity-aware credential management, see the MCP Examples directory.
The identity-aware remote example demonstrates:
See the MCP Remote Vault Demo README and Quick Start Guide for more details.
If you would like to submit a code example to this repo, please create a file containing one function (or a grouping of several related functions) in the appropriate directory.