Sha256: cffa4d9ed8956687e1eaa41d39880d5c728f0c4bae6c8b10c5d0f1b3b8a8ae13

Contents?: true

Size: 615 Bytes

Versions: 88

Compression:

Stored size: 615 Bytes

Contents

require File.join(File.dirname(__FILE__), '../../../../../../lib/kafo/password_manager')
# Decrypts an encrypted password using $kafo_configure::password
#
# you can use this function in order to place passwords into your config files
# in form of a plain text
module Puppet::Parser::Functions
  newfunction(:decrypt, :type => :rvalue) do |args|
    encrypted = args[0]
    if encrypted =~ /\A\$1\$/
      PasswordManager.new.aes_decrypt(encrypted[3..-1], lookupvar('::kafo_configure::password'))
    else
      raise Puppet::ParseError, 'wrong format of encrypted string, should start with $1$'
    end
  end
end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
kafo-2.1.0 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-2.0.2 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-2.0.1 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-2.0.0 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-1.0.8 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-1.0.7 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-1.0.6 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-1.0.5 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-1.0.4 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-0.9.8 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-1.0.3 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-0.9.7 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-1.0.2 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-1.0.1 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-1.0.0 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-0.9.6 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-0.9.5 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-0.9.4 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-0.9.3 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb
kafo-0.9.2 modules/kafo_configure/lib/puppet/parser/functions/decrypt.rb