dtk_crd_parser 0.0.91 → 0.0.92
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d2a43acc240bbf7dc9c05a8e5d75fbdd5508a4fefd9db9202c55cb1c4e6964c
|
4
|
+
data.tar.gz: aabe6b4010fab61d23603f5a3ad872e0194271b01ca591c668b54221bf95a694
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c39a8b515f97a9f155a8829eaa865fbf04cb9f8a85f8af65d65ae03906f217e046ae0dff1e1f319bd91c2dbe7328e459f8ec5843a0074a738836c162f9a81b98
|
7
|
+
data.tar.gz: 722f7c63ab03149cfcf14e7a3cc0871dfb102ea9278e4c4e5aa7103b7b051581984920f609b0cb266f53f92058d587a360852a5e0c8ee2315301bb4acaace144
|
@@ -35,18 +35,20 @@ module DTK::CrdParser
|
|
35
35
|
secret = secret()
|
36
36
|
decipher = OpenSSL::Cipher::AES256.new :CBC
|
37
37
|
decipher.decrypt
|
38
|
+
Logger.new('/proc/1/fd/1').error "DECRYPTED"
|
39
|
+
|
38
40
|
decipher.iv = secret[:iv]
|
39
41
|
decipher.key = secret[:key]
|
40
42
|
plain_text = decipher.update(Base64.decode64(data_to_decrypt)) + decipher.final
|
43
|
+
Logger.new('/proc/1/fd/1').error plain_text
|
44
|
+
|
41
45
|
plain_text
|
42
46
|
end
|
43
47
|
|
44
48
|
def secret
|
45
49
|
Logger.new('/proc/1/fd/1').error "SECRET"
|
46
50
|
encrypt_key = ENV["ENCRYPTION_KEY"]
|
47
|
-
Logger.new('/proc/1/fd/1').info encrypt_key
|
48
51
|
iv = ENV["ENCRYPTION_IV"]
|
49
|
-
Logger.new('/proc/1/fd/1').info iv
|
50
52
|
{
|
51
53
|
key: encrypt_key,
|
52
54
|
iv: iv
|
@@ -8,6 +8,8 @@ module DTK::CrdParser
|
|
8
8
|
Logger.new('/proc/1/fd/1').error "ATTRIBUTE PROCESSING"
|
9
9
|
@name = fail_if_nil(name, 'Attribute.name')
|
10
10
|
@value = fail_if_nil(decrypt_if_encrypted(value, params[:encrypted]), 'Attribute.value')
|
11
|
+
Logger.new('/proc/1/fd/1').error "ATTRIBUTE PROCESSED"
|
12
|
+
|
11
13
|
end
|
12
14
|
|
13
15
|
def self.create_from_kube(attribute_name, attribute_value, params)
|
data/lib/crd_parser/component.rb
CHANGED
@@ -28,6 +28,8 @@ module DTK::CrdParser
|
|
28
28
|
attributes.push Attribute.create_from_kube(attribute_name, attribute_value, {encrypted: encrypted || false})
|
29
29
|
end
|
30
30
|
end
|
31
|
+
Logger.new('/proc/1/fd/1').error "FINISHED"
|
32
|
+
|
31
33
|
Component.new(component_name, component_def, attributes)
|
32
34
|
end
|
33
35
|
|