Project

dsv-sdk

0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
The Thycotic DevOps Secrets Vault SDK for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.7

Runtime

>= 0
>= 0
 Project Readme

dsv-sdk-ruby

Tests Documentation RubyGems GitHub

PUBLIC ARCHIVE

Warning

This repo is archived. This is still available under the licensing terms, but is not being actively developed or updated any further. Please see DelineaXPM for active projects.

Initialize via env variables (best practice)

Vault will initialize easily if the following environment variables are defined:

  • DSV_CLIENT_ID
  • DSV_CLIENT_SECRET
  • DSV_TENANT
  • DSV_TLD - optional
require 'dsv'
# initialize from ENV variables automatically
vault = Dsv::Vault.new

begin
    secret = Dsv::Secret.fetch(vault, "/test/secret")
rescue
    puts "Oh no, we had a problem accessing the vault"
end

puts "The password is: #{secret["data"]["password"]}"

Initialize manually

If you want to manually initialze Vault you will need to pass a Hash to the Vault initialization with the following params: "

  • client_id
  • client_secret
  • tenant
  • tld - optional (default's to .com)
require 'dsv'

configuration = {
  client_id: 'test_client_id',
  client_secret: 'test_client_secret'
  tenant: 'test_tenant'
}

v = Dsv::Vault.new(configuration)

begin
    secret = Dsv::Secret.fetch(vault, "/test/secret")
rescue
    puts "Oh no, we had a problem accessing the vault"
end

puts "The password is: #{secret["data"]["password"]}"