Project

tss-sdk

0.0
Repository is archived
No release in over 3 years
The Thycotic TSS 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

PUBLIC ARCHIVE

NOTE 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.

tss-sdk-ruby

Tests Documentation RubyGems GitHub

Installation

Usage

Initialize via env variables (best practice)

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

  • TSS_USERNAME
  • TSS_PASSWORD
  • TSS_TENANT
require 'vault'
# initialize from ENV variables
server = Server.new({
    username: ENV['TSS_USERNAME'].to_s,
    password: ENV['TSS_PASSWORD'],
    tenant: ENV['TSS_TENANT']
})

begin
    secret = Server::Secret.fetch(@server, 1)
rescue AccessDeniedException
    puts "Whoops, looks like we're unauthorized"
rescue  Exception => e
    puts "Something went wrong: #{e.to_s}"
end

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