hiera-eyaml 4.0.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +8 -8
- data/CHANGELOG.md +20 -0
- data/README.md +2 -2
- data/hiera-eyaml.gemspec +2 -2
- data/lib/hiera/backend/eyaml/encryptors/pkcs7.rb +6 -3
- data/lib/hiera/backend/eyaml/parser/token.rb +1 -1
- data/lib/hiera/backend/eyaml.rb +1 -1
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9eb7f6a848fd49e92f95073ea457a181427bf20e47ba869515a6510d43cc893d
|
4
|
+
data.tar.gz: cc69d4fa0b0b197c25cd873b30f6974dd669e136e39525fddd6813b72504010b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe9b09b8ee6c02c20680851b8468336ed4c415987c70c19d1ceb3ec61c97898dbeee0b6cf1df1ad7b807f8797104897d75e497dadb21c52d68614028c9a3bf48
|
7
|
+
data.tar.gz: e6a29c5b00b2da302a6e621c0bde65809713391aa827a329ee29b890d244d4c75ecc7718f7179b29b0691580a50a2ecff0bdda598a7c00eeb88392fd83238fee
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2024-
|
3
|
+
# on 2024-10-20 14:24:21 UTC using RuboCop version 1.64.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -94,6 +94,7 @@ Naming/ClassAndModuleCamelCase:
|
|
94
94
|
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
95
95
|
Naming/FileName:
|
96
96
|
Exclude:
|
97
|
+
- 'Rakefile.rb'
|
97
98
|
- 'lib/hiera/backend/eyaml/CLI.rb'
|
98
99
|
|
99
100
|
# Offense count: 3
|
@@ -127,13 +128,6 @@ Naming/VariableNumber:
|
|
127
128
|
Exclude:
|
128
129
|
- 'lib/hiera/backend/eyaml/utils.rb'
|
129
130
|
|
130
|
-
# Offense count: 3
|
131
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
132
|
-
Performance/Casecmp:
|
133
|
-
Exclude:
|
134
|
-
- 'lib/hiera/backend/eyaml/highlinehelper.rb'
|
135
|
-
- 'lib/hiera/backend/eyaml/utils.rb'
|
136
|
-
|
137
131
|
# Offense count: 1
|
138
132
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
139
133
|
Performance/Detect:
|
@@ -270,6 +264,12 @@ Style/IfWithBooleanLiteralBranches:
|
|
270
264
|
- 'lib/hiera/backend/eyaml/highlinehelper.rb'
|
271
265
|
- 'lib/hiera/backend/eyaml_backend.rb'
|
272
266
|
|
267
|
+
# Offense count: 1
|
268
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
269
|
+
Style/MapIntoArray:
|
270
|
+
Exclude:
|
271
|
+
- 'lib/hiera/backend/eyaml_backend.rb'
|
272
|
+
|
273
273
|
# Offense count: 1
|
274
274
|
Style/MultilineBlockChain:
|
275
275
|
Exclude:
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,26 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [v4.2.0](https://github.com/voxpupuli/hiera-eyaml/tree/v4.2.0) (2024-10-21)
|
6
|
+
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/hiera-eyaml/compare/v4.1.0...v4.2.0)
|
8
|
+
|
9
|
+
**Implemented enhancements:**
|
10
|
+
|
11
|
+
- highline: Allow 3.x [\#385](https://github.com/voxpupuli/hiera-eyaml/pull/385) ([bastelfreak](https://github.com/bastelfreak))
|
12
|
+
|
13
|
+
**Merged pull requests:**
|
14
|
+
|
15
|
+
- voxpupuli-rubocop: Fix version pinning, update 2.6-\>2.8 [\#384](https://github.com/voxpupuli/hiera-eyaml/pull/384) ([bastelfreak](https://github.com/bastelfreak))
|
16
|
+
|
17
|
+
## [v4.1.0](https://github.com/voxpupuli/hiera-eyaml/tree/v4.1.0) (2024-05-13)
|
18
|
+
|
19
|
+
[Full Changelog](https://github.com/voxpupuli/hiera-eyaml/compare/v4.0.0...v4.1.0)
|
20
|
+
|
21
|
+
**Implemented enhancements:**
|
22
|
+
|
23
|
+
- Remove public key requirement to decrypt [\#378](https://github.com/voxpupuli/hiera-eyaml/pull/378) ([cmd-ntrf](https://github.com/cmd-ntrf))
|
24
|
+
|
5
25
|
## [v4.0.0](https://github.com/voxpupuli/hiera-eyaml/tree/v4.0.0) (2024-05-10)
|
6
26
|
|
7
27
|
[Full Changelog](https://github.com/voxpupuli/hiera-eyaml/compare/v3.4.0...v4.0.0)
|
data/README.md
CHANGED
@@ -143,9 +143,9 @@ Use the -l parameter to pass in a label for the encrypted value,
|
|
143
143
|
|
144
144
|
### Decryption
|
145
145
|
|
146
|
-
To decrypt something, you need the
|
146
|
+
To decrypt something, you need the private_key.
|
147
147
|
|
148
|
-
To test decryption you can
|
148
|
+
To test decryption you can use the eyaml tool
|
149
149
|
|
150
150
|
$ eyaml decrypt -f filename # Decrypt a file
|
151
151
|
$ eyaml decrypt -s 'ENC[PKCS7,.....]' # Decrypt a string
|
data/hiera-eyaml.gemspec
CHANGED
@@ -16,12 +16,12 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
17
17
|
gem.require_paths = ['lib']
|
18
18
|
|
19
|
-
gem.add_runtime_dependency 'highline', '
|
19
|
+
gem.add_runtime_dependency 'highline', '>= 2.1', '< 4'
|
20
20
|
gem.add_runtime_dependency 'optimist', '~> 3.1'
|
21
21
|
|
22
22
|
gem.add_development_dependency 'rake', '~> 13.2', '>= 13.2.1'
|
23
23
|
gem.add_development_dependency 'rspec-expectations', '~> 3.13'
|
24
|
-
gem.add_development_dependency 'voxpupuli-rubocop', '2.
|
24
|
+
gem.add_development_dependency 'voxpupuli-rubocop', '~> 2.8.0'
|
25
25
|
|
26
26
|
gem.required_ruby_version = '>= 2.7', ' < 4'
|
27
27
|
end
|
@@ -51,10 +51,13 @@ class Hiera
|
|
51
51
|
private_key_pem = load_private_key_pem
|
52
52
|
private_key_rsa = OpenSSL::PKey::RSA.new(private_key_pem)
|
53
53
|
|
54
|
-
public_key_pem = load_public_key_pem
|
55
|
-
public_key_x509 = OpenSSL::X509::Certificate.new(public_key_pem)
|
56
|
-
|
57
54
|
pkcs7 = OpenSSL::PKCS7.new(ciphertext)
|
55
|
+
|
56
|
+
public_key_x509 = OpenSSL::X509::Certificate.new
|
57
|
+
public_key_x509.serial = pkcs7.recipients[0].serial
|
58
|
+
public_key_x509.issuer = pkcs7.recipients[0].issuer
|
59
|
+
public_key_x509.public_key = private_key_rsa.public_key
|
60
|
+
|
58
61
|
pkcs7.decrypt(private_key_rsa, public_key_x509)
|
59
62
|
end
|
60
63
|
|
data/lib/hiera/backend/eyaml.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiera-eyaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.1'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '4'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '2.1'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '4'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: optimist
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,16 +82,16 @@ dependencies:
|
|
76
82
|
name: voxpupuli-rubocop
|
77
83
|
requirement: !ruby/object:Gem::Requirement
|
78
84
|
requirements:
|
79
|
-
- -
|
85
|
+
- - "~>"
|
80
86
|
- !ruby/object:Gem::Version
|
81
|
-
version: 2.
|
87
|
+
version: 2.8.0
|
82
88
|
type: :development
|
83
89
|
prerelease: false
|
84
90
|
version_requirements: !ruby/object:Gem::Requirement
|
85
91
|
requirements:
|
86
|
-
- -
|
92
|
+
- - "~>"
|
87
93
|
- !ruby/object:Gem::Version
|
88
|
-
version: 2.
|
94
|
+
version: 2.8.0
|
89
95
|
description: Hiera backend for decrypting encrypted yaml properties
|
90
96
|
email: voxpupuli@groups.io
|
91
97
|
executables:
|