Skip to content

anders-swanson/spring-vault-oracle-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-vault-oracle-app

The Spring Vault Oracle App sample demonstrates dynamically loading secrets from OCI Vault into the Spring Boot context during startup. All secrets loaded this way are made available by name as application properties, accessible using @Value annotations.

Prerequisites

Setup

  1. Create an OCI Vault, and add two secrets to the vault named s1 and s2.

  2. Set the following environment variables, using values for your OCI Compartment, Region, and Vault.

OCI_COMPARTMENT_ID=<OCI Compartment ID>
OCI_REGION=<OCI Region>
OCI_VAULT_ID=<OCI Vault OCID>

Run the app

Using Maven, start the app:

mvn spring-boot:run

Now, query the app to see if the Vault secrets were successfully loaded:

curl localhost:9001/values

About

Example app using OCI Vault to load properties in a Spring App

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages