Git Product home page Git Product logo

hvs-demo-app's Introduction

HCP Vault Secrets Demo Application

HCP Vault Secrets is a centralized SaaS secrets lifecycle management solution. This repository showcases the various ways you can store and fetch secrets securely with your application.

We will use Stripe Checkout's sample application to showcase it!

Stripe Checkout is the fastest way to get started with payments. Included are some basic build and run scripts you can use to start up the application.

Running the sample with static secrets locally

  1. Set the stripe.Key in server.go to your test Stripe Secret Key.

  2. Run the server

go run server.go
  1. Go to http://localhost:4242/checkout.html

Pre-Requisites

  1. Ensure you have created an account with Stripe
  2. You will need to create a sample product & price in the Stripe Dashboard - https://support.stripe.com/questions/how-to-create-products-and-prices

Running the sample with vlt with static secrets in HCP Vault Secrets

  1. Sign up for HCP at cloud.hashicorp.com

  2. Create an app "payments-api" in HCP Vault Secrets

  3. Create a secret "STRIPE_SECRET_TEST_KEY" with the test Stripe Secret Key.

  4. Ensure stripe.Key is set to an environment variable name "STRIPE_SECRET_TEST_KEY" in server.go

  5. Download and install vlt CLI

  6. Run the below commands to login to HCP and set the context to your app in HCP Vault Secrets

vlt login && vlt config
  1. Use the below command to run the Go app with fetching secrets from HCP Vault Secrets
vlt run -c "go run server.go"
  1. Go to http://localhost:4242/checkout.html

hvs-demo-app's People

Contributors

kartiklunkad26 avatar jbayer avatar

Watchers

James Cloos avatar  avatar

Forkers

jbayer phanclan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.