Sha256: 9432b453334bdfdc81d76deacd9e1949c2b4729a6ec106a2d95787f6916e5ba9

Contents?: true

Size: 630 Bytes

Versions: 14

Compression:

Stored size: 630 Bytes

Contents

require 'conjur/authn'
require 'conjur/command'

class Conjur::Command::Secrets < Conjur::Command
  self.prefix = :secret
  
  desc "Create and store a secret"
  arg_name "secret"
  command :create do |c|
    acting_as_option(c)

    c.action do |global_options,options,args|
      secret = args.shift or raise "Missing parameter: secret"
      display api.create_secret(secret, options), options
    end
  end

  desc "Retrieve a secret"
  arg_name "id"
  command :value do |c|
    c.action do |global_options,options,args|
      id = args.shift or raise "Missing parameter: id"
      puts api.secret(id).value
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
conjur-cli-2.6.0 lib/conjur/command/secrets.rb
conjur-cli-2.4.1 lib/conjur/command/secrets.rb
conjur-cli-2.4.0 lib/conjur/command/secrets.rb
conjur-cli-2.3.0 lib/conjur/command/secrets.rb
conjur-cli-2.2.1 lib/conjur/command/secrets.rb
conjur-cli-2.1.9 lib/conjur/command/secrets.rb
conjur-cli-2.1.8 lib/conjur/command/secrets.rb
conjur-cli-2.1.7 lib/conjur/command/secrets.rb
conjur-cli-2.1.6 lib/conjur/command/secrets.rb
conjur-cli-2.1.5 lib/conjur/command/secrets.rb
conjur-cli-2.1.4 lib/conjur/command/secrets.rb
conjur-cli-2.1.3 lib/conjur/command/secrets.rb
conjur-cli-2.1.2 lib/conjur/command/secrets.rb
conjur-cli-2.1.1 lib/conjur/command/secrets.rb