slosilo 2.2.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Jenkinsfile +23 -6
- data/README.md +3 -0
- data/lib/slosilo/attr_encrypted.rb +4 -1
- data/lib/slosilo/version.rb +1 -1
- data/slosilo.gemspec +1 -1
- data/spec/sequel_adapter_spec.rb +2 -2
- data/test.sh +1 -1
- metadata +4 -5
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81d8f2c013b6f88d01bd7dd4c44b39c7cf0ffaa9385afca3e7ea826dae0855c8
|
4
|
+
data.tar.gz: acd627ef6ca45a404ce08c7bc680c8db7ea1ebdbe10d45b248ae09e59e804a02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz: '
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '098a049570888513d10bf23edacfb8c566f605a08a9e918a2a06c15839d406b14696edaf76c49b84820d3c0fc1147b0f7f754c74fdad680a98f919d134cabcc7'
|
7
|
+
data.tar.gz: 6cef96001fcc2932c23e106c732d9e7722afd2f6a8af11e99a023a49aa005bdc8ff9f3fa4ce278644b753acfe0e50953e14cf86114e78877368b95107a1126c0
|
data/CHANGELOG.md
CHANGED
data/Jenkinsfile
CHANGED
@@ -10,13 +10,22 @@ pipeline {
|
|
10
10
|
|
11
11
|
stages {
|
12
12
|
stage('Test') {
|
13
|
-
|
14
|
-
|
13
|
+
parallel {
|
14
|
+
stage('Run tests on EE') {
|
15
|
+
agent { label 'executor-v2-rhel-ee' }
|
16
|
+
steps {
|
17
|
+
sh './test.sh'
|
18
|
+
}
|
19
|
+
post { always {
|
20
|
+
stash name: 'eeTestResults', includes: 'spec/reports/*.xml', allowEmpty:true
|
21
|
+
}}
|
22
|
+
}
|
15
23
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
24
|
+
stage('Run tests') {
|
25
|
+
steps {
|
26
|
+
sh './test.sh'
|
27
|
+
}
|
28
|
+
}
|
20
29
|
}
|
21
30
|
}
|
22
31
|
|
@@ -52,6 +61,14 @@ pipeline {
|
|
52
61
|
|
53
62
|
post {
|
54
63
|
always {
|
64
|
+
dir('ee-results'){
|
65
|
+
unstash 'eeTestResults'
|
66
|
+
}
|
67
|
+
junit 'spec/reports/*.xml, ee-results/spec/reports/*.xml'
|
68
|
+
cobertura coberturaReportFile: 'spec/coverage/coverage.xml'
|
69
|
+
sh 'cp spec/coverage/coverage.xml cobertura.xml'
|
70
|
+
ccCoverage("cobertura", "github.com/cyberark/slosilo")
|
71
|
+
|
55
72
|
cleanupAndNotify(currentBuild.currentResult)
|
56
73
|
}
|
57
74
|
}
|
data/README.md
CHANGED
@@ -19,6 +19,9 @@ And then execute:
|
|
19
19
|
|
20
20
|
## Compatibility
|
21
21
|
|
22
|
+
Version 3.0 introduced full transition to Ruby 3.
|
23
|
+
Consumers who use slosilo in Ruby 2 projects, shall use slosilo V2.X.X.
|
24
|
+
|
22
25
|
Version 2.0 introduced new symmetric encryption scheme using AES-256-GCM
|
23
26
|
for authenticated encryption. It allows you to provide AAD on all symmetric
|
24
27
|
encryption primitives. It's also **NOT COMPATIBLE** with CBC used in version <2.
|
@@ -26,7 +26,10 @@ module Slosilo
|
|
26
26
|
aad = options[:aad]
|
27
27
|
# note nil.to_s is "", which is exactly the right thing
|
28
28
|
auth_data = aad.respond_to?(:to_proc) ? aad.to_proc : proc{ |_| aad.to_s }
|
29
|
-
|
29
|
+
|
30
|
+
# In ruby 3 .arity for #proc returns both 1 and 2, depends on internal #proc
|
31
|
+
# This method is also being called with aad which is string, in such case the arity is 1
|
32
|
+
raise ":aad proc must take two arguments" unless (auth_data.arity.abs == 2 || auth_data.arity.abs == 1)
|
30
33
|
|
31
34
|
# push a module onto the inheritance hierarchy
|
32
35
|
# this allows calling super in classes
|
data/lib/slosilo/version.rb
CHANGED
data/slosilo.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.name = "slosilo"
|
23
23
|
gem.require_paths = ["lib"]
|
24
24
|
gem.version = Slosilo::VERSION
|
25
|
-
gem.required_ruby_version = '>=
|
25
|
+
gem.required_ruby_version = '>= 3.0.0'
|
26
26
|
|
27
27
|
gem.add_development_dependency 'rake'
|
28
28
|
gem.add_development_dependency 'rspec', '~> 3.0'
|
data/spec/sequel_adapter_spec.rb
CHANGED
@@ -30,13 +30,13 @@ describe Slosilo::Adapters::SequelAdapter do
|
|
30
30
|
describe "#put_key" do
|
31
31
|
let(:id) { "id" }
|
32
32
|
it "creates the key" do
|
33
|
-
expect(model).to receive(:create).with
|
33
|
+
expect(model).to receive(:create).with(hash_including(:id => id, :key => key.to_der))
|
34
34
|
allow(model).to receive_messages columns: [:id, :key]
|
35
35
|
subject.put_key id, key
|
36
36
|
end
|
37
37
|
|
38
38
|
it "adds the fingerprint if feasible" do
|
39
|
-
expect(model).to receive(:create).with
|
39
|
+
expect(model).to receive(:create).with(hash_including(:id => id, :key => key.to_der, :fingerprint => key.fingerprint))
|
40
40
|
allow(model).to receive_messages columns: [:id, :key, :fingerprint]
|
41
41
|
subject.put_key id, key
|
42
42
|
end
|
data/test.sh
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slosilo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafał Rzepecki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -146,7 +146,6 @@ extra_rdoc_files: []
|
|
146
146
|
files:
|
147
147
|
- ".dockerignore"
|
148
148
|
- ".github/CODEOWNERS"
|
149
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
150
149
|
- ".gitignore"
|
151
150
|
- ".gitleaks.toml"
|
152
151
|
- ".kateproject"
|
@@ -199,14 +198,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
198
|
requirements:
|
200
199
|
- - ">="
|
201
200
|
- !ruby/object:Gem::Version
|
202
|
-
version:
|
201
|
+
version: 3.0.0
|
203
202
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
203
|
requirements:
|
205
204
|
- - ">="
|
206
205
|
- !ruby/object:Gem::Version
|
207
206
|
version: '0'
|
208
207
|
requirements: []
|
209
|
-
rubygems_version: 3.1.
|
208
|
+
rubygems_version: 3.1.6
|
210
209
|
signing_key:
|
211
210
|
specification_version: 4
|
212
211
|
summary: Store SSL keys in a database
|
@@ -1,21 +0,0 @@
|
|
1
|
-
### What does this PR do?
|
2
|
-
- _What's changed? Why were these changes made?_
|
3
|
-
- _How should the reviewer approach this PR, especially if manual tests are required?_
|
4
|
-
- _Are there relevant screenshots you can add to the PR description?_
|
5
|
-
|
6
|
-
### What ticket does this PR close?
|
7
|
-
Connected to #[relevant GitHub issues, eg 76]
|
8
|
-
|
9
|
-
### Checklists
|
10
|
-
|
11
|
-
#### Change log
|
12
|
-
- [ ] The CHANGELOG has been updated, or
|
13
|
-
- [ ] This PR does not include user-facing changes and doesn't require a CHANGELOG update
|
14
|
-
|
15
|
-
#### Test coverage
|
16
|
-
- [ ] This PR includes new unit and integration tests to go with the code changes, or
|
17
|
-
- [ ] The changes in this PR do not require tests
|
18
|
-
|
19
|
-
#### Documentation
|
20
|
-
- [ ] Docs (e.g. `README`s) were updated in this PR, and/or there is a follow-on issue to update docs, or
|
21
|
-
- [ ] This PR does not require updating any documentation
|