Demo application for utilising Hashicorp Vault for encryption.
Demo application for utilising Hashicorp Vault for encryption.
JWT_SECRET
: a random secret value used for signing the JWT's issued by the api.JWT_EXPIRY
: how long the issued JWT's should last. e.g. "30m"
for 30 minutes.JWT_ISSUER
: used to populate the iss
claim of generated JWT's. e.g. http://localhost:7777
JWT_AUDIENCE
: used to populate the aud
claim of generated JWT's. e.g. http://localhost:7777
VAULT_APP_TOKEN
: the token output from terraform after deploying the vault resources.VAULT_KEY_NAME
: name of the transit key for the application to use for encryption/decryption. this should align with the name of the transit key in the terraform configuration file main.tf
yarn
from the project root.sqlite3 db/prisma/dev.db "VACUUM;"
.yarn generate --cwd db
.vault
folder from the terminal.terraform init
to initialise terraform.terraform plan -out tfplan
to create a terrform plan file.terraform apply tfplan
to apply the generated plan file and create the required vault resources.terraform output app_client_token
to print out the generated app token for vault..env.example
file and rename to .env.development
, populating the required environment variables with values.yarn dev --cwd api
.