From 5d8c49ae0d48c63120cfdd31bd07924b28d6d093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ga=C3=9F?= Date: Tue, 10 Oct 2023 11:02:57 +0200 Subject: [PATCH] add all known hiera-eyaml methods I created the list by searching rubygems.org and looking at all the Github repos that were still available. --- lib/puppet-syntax/hiera.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/puppet-syntax/hiera.rb b/lib/puppet-syntax/hiera.rb index af55fb9..5b32cf7 100644 --- a/lib/puppet-syntax/hiera.rb +++ b/lib/puppet-syntax/hiera.rb @@ -54,7 +54,8 @@ def check_eyaml_blob(val) method = 'PKCS7' end - return "has unknown eyaml method #{method}" unless %w[PKCS7 GPG GKMS KMS].include? method + known_methods = %w[PKCS7 GPG GKMS KMS TWOFAC SecretBox VAULT GCPKMS RSA SSHAGENT VAULT_RS cli] + return "has unknown eyaml method #{method}" unless known_methods.include? method return 'has unpadded or truncated base64 data' unless base64.length % 4 == 0 # Base64#decode64 will silently ignore characters outside the alphabet,