slosilo 0.0.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/.gitignore +0 -2
  2. data/LICENSE +2 -2
  3. data/README.md +8 -128
  4. data/lib/slosilo/adapters/abstract_adapter.rb +0 -4
  5. data/lib/slosilo/adapters/mock_adapter.rb +1 -14
  6. data/lib/slosilo/adapters/sequel_adapter/migration.rb +2 -5
  7. data/lib/slosilo/adapters/sequel_adapter.rb +5 -67
  8. data/lib/slosilo/attr_encrypted.rb +7 -33
  9. data/lib/slosilo/http_request.rb +59 -0
  10. data/lib/slosilo/key.rb +6 -129
  11. data/lib/slosilo/keystore.rb +12 -40
  12. data/lib/slosilo/rack/middleware.rb +123 -0
  13. data/lib/slosilo/symmetric.rb +17 -47
  14. data/lib/slosilo/version.rb +2 -21
  15. data/lib/slosilo.rb +2 -2
  16. data/lib/tasks/slosilo.rake +0 -10
  17. data/slosilo.gemspec +6 -19
  18. data/spec/http_request_spec.rb +107 -0
  19. data/spec/http_stack_spec.rb +44 -0
  20. data/spec/key_spec.rb +32 -175
  21. data/spec/keystore_spec.rb +2 -15
  22. data/spec/rack_middleware_spec.rb +109 -0
  23. data/spec/random_spec.rb +2 -12
  24. data/spec/sequel_adapter_spec.rb +22 -133
  25. data/spec/slosilo_spec.rb +12 -78
  26. data/spec/spec_helper.rb +15 -37
  27. data/spec/symmetric_spec.rb +26 -69
  28. metadata +51 -104
  29. checksums.yaml +0 -7
  30. data/.github/CODEOWNERS +0 -10
  31. data/.gitleaks.toml +0 -221
  32. data/.kateproject +0 -4
  33. data/CHANGELOG.md +0 -50
  34. data/CONTRIBUTING.md +0 -16
  35. data/Jenkinsfile +0 -132
  36. data/SECURITY.md +0 -42
  37. data/dev/Dockerfile.dev +0 -7
  38. data/dev/docker-compose.yml +0 -8
  39. data/lib/slosilo/adapters/file_adapter.rb +0 -42
  40. data/lib/slosilo/adapters/memory_adapter.rb +0 -31
  41. data/lib/slosilo/errors.rb +0 -15
  42. data/lib/slosilo/jwt.rb +0 -122
  43. data/publish.sh +0 -5
  44. data/secrets.yml +0 -1
  45. data/spec/encrypted_attributes_spec.rb +0 -114
  46. data/spec/file_adapter_spec.rb +0 -81
  47. data/spec/jwt_spec.rb +0 -102
  48. data/test.sh +0 -8
data/spec/slosilo_spec.rb CHANGED
@@ -2,37 +2,33 @@ require 'spec_helper'
2
2
 
3
3
  describe Slosilo do
4
4
  include_context "with mock adapter"
5
- include_context "with example key"
6
- before { Slosilo['test'] = key }
5
+ let(:key) { OpenSSL::PKey::RSA.new 512 }
6
+ before { adapter['test'] = key.to_der }
7
7
 
8
8
  describe '[]' do
9
9
  it "returns a Slosilo::Key" do
10
- expect(Slosilo[:test]).to be_instance_of Slosilo::Key
11
- end
12
-
13
- it "allows looking up by fingerprint" do
14
- expect(Slosilo[fingerprint: key_fingerprint]).to eq(key)
10
+ Slosilo[:test].should be_instance_of Slosilo::Key
15
11
  end
16
12
 
17
13
  context "when the requested key does not exist" do
18
14
  it "returns nil instead of creating a new key" do
19
- expect(Slosilo[:aether]).not_to be
15
+ Slosilo[:aether].should_not be
20
16
  end
21
17
  end
22
18
  end
23
19
 
24
20
  describe '.sign' do
25
21
  let(:own_key) { double "own key" }
26
- before { allow(Slosilo).to receive(:[]).with(:own).and_return own_key }
22
+ before { Slosilo.stub(:[]).with(:own).and_return own_key }
27
23
  let (:argument) { double "thing to sign" }
28
24
  it "fetches the own key and signs using that" do
29
- expect(own_key).to receive(:sign).with(argument)
25
+ own_key.should_receive(:sign).with(argument)
30
26
  Slosilo.sign argument
31
27
  end
32
28
  end
33
29
 
34
30
  describe '.token_valid?' do
35
- before { allow(adapter['test']).to receive_messages token_valid?: false }
31
+ before { adapter['test'].stub token_valid?: false }
36
32
  let(:key2) { double "key 2", token_valid?: false }
37
33
  let(:key3) { double "key 3", token_valid?: false }
38
34
  before do
@@ -44,81 +40,19 @@ describe Slosilo do
44
40
  subject { Slosilo.token_valid? token }
45
41
 
46
42
  context "when no key validates the token" do
47
- before { allow(Slosilo::Key).to receive_messages new: (double "key", token_valid?: false) }
48
- it { is_expected.to be_falsey }
43
+ before { Slosilo::Key.stub new: (double "key", token_valid?: false) }
44
+ it { should be_false }
49
45
  end
50
46
 
51
47
  context "when a key validates the token" do
52
48
  let(:valid_key) { double token_valid?: true }
53
49
  let(:invalid_key) { double token_valid?: true }
54
50
  before do
55
- allow(Slosilo::Key).to receive_messages new: invalid_key
56
- adapter[:key2] = valid_key
51
+ Slosilo::Key.stub new: invalid_key
52
+ Slosilo::Key.stub(:new).with(key2).and_return(valid_key)
57
53
  end
58
54
 
59
- it { is_expected.to be_truthy }
60
- end
61
- end
62
-
63
- describe '.token_signer' do
64
-
65
- context "when token matches a key" do
66
- let(:token) {{ 'data' => 'foo', 'key' => key.fingerprint, 'signature' => 'XXX' }}
67
-
68
- context "and the signature is valid" do
69
- before { allow(key).to receive(:token_valid?).with(token).and_return true }
70
-
71
- it "returns the key id" do
72
- expect(subject.token_signer(token)).to eq('test')
73
- end
74
- end
75
-
76
- context "and the signature is invalid" do
77
- before { allow(key).to receive(:token_valid?).with(token).and_return false }
78
-
79
- it "returns nil" do
80
- expect(subject.token_signer(token)).not_to be
81
- end
82
- end
83
- end
84
-
85
- context "when token doesn't match a key" do
86
- let(:token) {{ 'data' => 'foo', 'key' => "footprint", 'signature' => 'XXX' }}
87
- it "returns nil" do
88
- expect(subject.token_signer(token)).not_to be
89
- end
90
- end
91
-
92
- context "with JWT token" do
93
- before do
94
- expect(key).to receive(:validate_jwt) do |jwt|
95
- expect(jwt.header).to eq 'kid' => key.fingerprint
96
- expect(jwt.claims).to eq({})
97
- expect(jwt.signature).to eq 'sig'
98
- end
99
- end
100
-
101
- it "accepts pre-parsed JSON serialization" do
102
- expect(Slosilo.token_signer(
103
- 'protected' => 'eyJraWQiOiIxMDdiZGI4NTAxYzQxOWZhZDJmZGIyMGI0NjdkNGQwYTYyYTE2YTk4YzM1ZjJkYTBlYjNiMWZmOTI5Nzk1YWQ5In0=',
104
- 'payload' => 'e30=',
105
- 'signature' => 'c2ln'
106
- )).to eq 'test'
107
- end
108
-
109
- it "accepts pre-parsed JWT token" do
110
- expect(Slosilo.token_signer(Slosilo::JWT(
111
- 'protected' => 'eyJraWQiOiIxMDdiZGI4NTAxYzQxOWZhZDJmZGIyMGI0NjdkNGQwYTYyYTE2YTk4YzM1ZjJkYTBlYjNiMWZmOTI5Nzk1YWQ5In0=',
112
- 'payload' => 'e30=',
113
- 'signature' => 'c2ln'
114
- ))).to eq 'test'
115
- end
116
-
117
- it "accepts compact serialization" do
118
- expect(Slosilo.token_signer(
119
- 'eyJraWQiOiIxMDdiZGI4NTAxYzQxOWZhZDJmZGIyMGI0NjdkNGQwYTYyYTE2YTk4YzM1ZjJkYTBlYjNiMWZmOTI5Nzk1YWQ5In0=.e30=.c2ln'
120
- )).to eq 'test'
121
- end
55
+ it { should be_true }
122
56
  end
123
57
  end
124
58
  end
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,4 @@
1
1
  require "simplecov"
2
- require "simplecov-cobertura"
3
-
4
- SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
5
2
  SimpleCov.start
6
3
 
7
4
  require 'slosilo'
@@ -44,41 +41,22 @@ Dg1ikwi8GUF4HPZe9DyhXgDhg19wM/qcpjX8bSypsUWHWP+FanhjdWU=
44
41
  -----END RSA PRIVATE KEY-----
45
42
  """ }
46
43
  let (:key) { Slosilo::Key.new rsa.to_der }
47
- let (:key_fingerprint) { "107bdb8501c419fad2fdb20b467d4d0a62a16a98c35f2da0eb3b1ff929795ad9" }
48
-
49
- let (:another_rsa) do
50
- OpenSSL::PKey::RSA.new """
51
- -----BEGIN RSA PRIVATE KEY-----
52
- MIIEowIBAAKCAQEAryP0uGEIcDFmHDj1MjxbW+eWMeQ1k2FTKI7qx2M3MP9FR3Bz
53
- KjFzGKnAA6QV46K/QtEt+wpWedB/bcikPXY4/vh/b2TEi8Ybw2ztT1oW9le8Djsz
54
- 3sQv5QrHsOXzSIARw4NZYxunxMFKCVC9jA8tXJb16RLgS3wAOMiPADlWIKEmPIX6
55
- +hg2PDgFcrCuL3XAwJ4GKy3Q5BpIFF2j+wRNfjCXDFf1bU9Gy9DND8Y50Khhw/Zn
56
- GYN1Y3AZ3YPzz1SPf08WM663ImYwORjdkA5VlIAMKcmSStNZZUrCOo7DQjNZVD2O
57
- vfGhGUlPqYkmTPnCG2aNP8aJm3IbF+Cb6N6PjwIDAQABAoIBAEaYtr9PlagrsV40
58
- 81kxjR3pptgrhhEHTQ7vNOH0Mz4T16gpQrLCRgOuARE2pgAhDPlw+hjUHPFzQrpN
59
- Ay8nJWhZYHzVYIh67ZwDn1C6HsFjshEGei0UZb3sb3v15O/Xd9GYc4KIlkKwKxjA
60
- K/d18rH8w9kUW8bxj+FTrpjHg9kYkWGjl1WUM4o4dALVVAbbILCHKUIv3wmU5Off
61
- oqBDunItrfVvvc9UOt1SMO15fwuZZpk0B5cjjo6+1NNpIOzqnuu48iI5dQRAIr50
62
- n44U4/Ix4E1p4i/9i5trCeSZRMrVxBruNxFBtCeDU6YW5fXYNBLptndfb83iqSJf
63
- 46myqakCgYEA2MAsbtOcvQv+C7KsRMQih4WqpybV/TRdeC+dZ3flPvSuI8VLJAHp
64
- p2Tp3WXATCwgUWL/iktwWE7WFMn3VvAuMm2ITmAze/Uk71uUS5R+iaGIeRXHgd9J
65
- fyJrIeD63ncWbb23rif2sO6zH4cp9NLS/OopHiRNlRsWEUoGpybxczMCgYEAztrf
66
- mX4oqjqk4af4o4/UHVp3Y9lpcUXRi6dYYECoqv6wS7qCIbJkD4I4P6oTwvk25vbk
67
- p9fwOttuqHC53/rDXVjedNe9VExIe5NhVaug1SyArw/qsafYs0QeDRBkSgCcLfP6
68
- LP4g824Wbv52X33BO0rJbDCICDqGDCOkqB4XcjUCgYBCkcMTxqo85ZIAxb9i31o7
69
- hTIEZEkUmyCZ6QXO4WPnEf7pvY52YKACaVvqQ3Xr7yF93YneT40RkiTt/ZmZeeq2
70
- Ui2q5KDrUT8mxFmnXNQAMTxY8/dyS8Gm6ks8/HwQF0MsMThYpK1/adBZvomER7vF
71
- MaWvPDcXtFnytWmVrMA7QQKBgQDIHpHR4m6e+atIMIPoYR5Z44q7i7tp/ZzTGevy
72
- +rry6wFN0jtRNE9/fYDDftwtdYL7AYKHKu7bUi0FQkFhAi39YhudOJaPNlmtTBEP
73
- m8I2Wh6IvsJUa0jHbbAQ/Xm46kwuXOn8m0LvnuKPMRj+GyBVJ24kf/Mq2suSdO04
74
- RBx0vQKBgFz93G6bSzmFg0BRTqRWEXEIuYkMIZDe48OjeP4pLYH9aERsL/f/8Dyc
75
- X2nOMv/TdLP7mvGnwCt/sQ2626DdiNqimekyBki9J2r6BzBNVmEvnLAcYaQAiQYz
76
- ooQ2FuL0K6ukQfHPjuMswqi41lmVH8gIVqVC+QnImUCrGxH9WXWy
77
- -----END RSA PRIVATE KEY-----
78
- """
44
+
45
+ def self.mock_own_key
46
+ before { Slosilo.stub(:[]).with(:own).and_return key }
79
47
  end
48
+ end
80
49
 
81
- def self.mock_own_key
82
- before { allow(Slosilo).to receive(:[]).with(:own).and_return key }
50
+ class RackEnvironmentInputMatcher
51
+ def initialize expected
52
+ @expected = expected
53
+ end
54
+
55
+ def == env
56
+ env['rack.input'].read.should == @expected
83
57
  end
84
58
  end
59
+
60
+ def rack_environment_with_input expected
61
+ RackEnvironmentInputMatcher.new expected
62
+ end
@@ -3,92 +3,49 @@ require 'spec_helper'
3
3
  describe Slosilo::Symmetric do
4
4
  # TODO transform it to class methods only?
5
5
  let(:plaintext) { "quick brown fox jumped over the lazy dog" }
6
- let(:auth_data) { "some record id" }
7
- let(:key) { "^\xBAIv\xDB1\x0Fi\x04\x11\xFD\x14\xA7\xCD\xDFf\x93\xFE\x93}\v\x01\x11\x98\x14\xE0;\xC1\xE2 v\xA5".force_encoding("ASCII-8BIT") }
8
- let(:iv) { "\xD9\xABn\x01b\xFA\xBD\xC2\xE5\xEA\x01\xAC".force_encoding("ASCII-8BIT") }
9
- let(:ciphertext) { "G^W1\x9C\xD4\xCC\x87\xD3\xFF\x86[\x0E3\xC0\xC8^\xD9\xABn\x01b\xFA\xBD\xC2\xE5\xEA\x01\xAC\x9E\xB9:\xF7\xD4ebeq\xDC \xC0sG\xA4\xAE,\xB8A|\x97\xBC\xFD\x85\xE1\xB93\x95>\xBD\n\x05\xFB\x15\x1F\x06#3M9".force_encoding('ASCII-8BIT') }
10
-
6
+ let(:key) { "^\xBAIv\xDB1\x0Fi\x04\x11\xFD\x14\xA7\xCD\xDFf\x93\xFE\x93}\v\x01\x11\x98\x14\xE0;\xC1\xE2 v\xA5" }
7
+ let(:iv) { "\xA1\xFA#z\x16\x80R\xCC|\x0Fyc\xB7j\x17\xED" }
8
+ let(:ciphertext) { "\xA1\xFA#z\x16\x80R\xCC|\x0Fyc\xB7j\x17\xED\x15\xC9r\xC9\xEE\xB9\xBC5\xB7\ni\x0F\f\xC8X\x80 h\a\xF4\xA6\xE3\x15\x9D\xF1-\xE5\bs\xF6\x02Z\x0F\xCD|S\x1A\xAA\x9At\xEFT\x17\xA5lT\x8C\xF3" }
11
9
  describe '#encrypt' do
12
- it "encrypts with AES-256-GCM" do
13
- allow(subject).to receive_messages random_iv: iv
14
- expect(subject.encrypt(plaintext, key: key, aad: auth_data)).to eq(ciphertext)
10
+ it "encrypts with AES-256-CBC" do
11
+ subject.stub random_iv: iv
12
+ subject.encrypt(plaintext, key: key).should == ciphertext
15
13
  end
16
14
  end
17
-
15
+
18
16
  describe '#decrypt' do
19
-
20
- it "doesn't fail when called by multiple threads" do
21
- threads = []
22
-
23
- begin
24
- # Verify we can successfuly decrypt using many threads without OpenSSL
25
- # errors.
26
- 1000.times do
27
- threads << Thread.new do
28
- 100.times do
29
- expect(
30
- subject.decrypt(ciphertext, key: key, aad: auth_data)
31
- ).to eq(plaintext)
32
- end
33
- end
34
- end
35
- ensure
36
- threads.each(&:join)
37
- end
38
- end
39
-
40
- it "decrypts with AES-256-GCM" do
41
- expect(subject.decrypt(ciphertext, key: key, aad: auth_data)).to eq(plaintext)
42
- end
43
-
44
-
45
- context "when the ciphertext has been messed with" do
46
- let(:ciphertext) { "pwnd!" } # maybe we should do something more realistic like add some padding?
47
- it "raises an exception" do
48
- expect{ subject.decrypt(ciphertext, key: key, aad: auth_data)}.to raise_exception /Invalid version/
49
- end
50
- context "by adding a trailing 0" do
51
- let(:new_ciphertext){ ciphertext + '\0' }
52
- it "raises an exception" do
53
- expect{ subject.decrypt(new_ciphertext, key: key, aad: auth_data) }.to raise_exception /Invalid version/
54
- end
17
+ it "decrypts with AES-256-CBC" do
18
+ subject.decrypt(ciphertext, key: key).should == plaintext
19
+ end
20
+
21
+ context "when ciphertext happens to end in a zero" do
22
+ let(:ciphertext) { "\x7F\xD6\xEAb\xE56\a\xD3\xC5\xF2J\n\x8C\x8Fg\xB7-\\\x8A\fh\x18\xC8\x91\xB9 \x97\xC9\x12\xE6\xA6\xAE\xB1I\x1E\x80\xAB\xD8\xDC\xBD\xB6\xCD\x9A\xA3MH\xA8\xB0\xC7\xDA\x87\xA7c\xD75,\xD2A\xB8\x9E\xE3o\x04\x00" }
23
+ let(:key) { "4pSuk1rAQyuHA5uUYaj0X0BsiPCFb9Nc8J03XA6V5/Y" }
24
+ it "works correctly" do
25
+ subject.decrypt(ciphertext, key: key).should == "R6KNTQ4aUivojbaqhgAqj1I4PaF8h/5/YcENy4uNbfk="
55
26
  end
56
27
  end
57
28
 
58
- context "when no auth_data is given" do
59
- let(:auth_data){""}
60
- let(:ciphertext){ "Gm\xDAT\xE8I\x9F\xB7\xDC\xBB\x84\xD3Q#\x1F\xF4\x8C\aV\x93\x8F_\xC7\xBC87\xC9U\xF1\xAF\x8A\xD62\x1C5H\x86\x17\x19=B~Y*\xBC\x9D\eJeTx\x1F\x02l\t\t\xD3e\xA4\x11\x13y*\x95\x9F\xCD\xC4@\x9C"}
61
-
62
- it "decrypts the message" do
63
- expect(subject.decrypt(ciphertext, key: key, aad: auth_data)).to eq(plaintext)
64
- end
65
-
66
- context "and the ciphertext has been messed with" do
67
- it "raises an exception" do
68
- expect{ subject.decrypt(ciphertext + "\0\0\0", key: key, aad: auth_data)}.to raise_exception OpenSSL::Cipher::CipherError
69
- end
70
- end
71
- end
72
-
73
- context "when the auth data doesn't match" do
74
- let(:auth_data){ "asdf" }
75
- it "raises an exception" do
76
- expect{ subject.decrypt(ciphertext, key: key, aad: auth_data)}.to raise_exception OpenSSL::Cipher::CipherError
29
+ context "when the iv ends in space" do
30
+ let(:ciphertext) { "\xC0\xDA#\xE9\xE1\xFD\xEDJ\xADs4P\xA9\xD6\x92 \xF7\xF8_M\xF6\x16\xC2i$\x8BT^\b\xA1\xB2L&\xE9\x80\x02[]6i\x9B\xD3\xC3\xED\xA9\xD1\x94\xE8\x15\xFD\xDA\xFEUj\xC5upH*\xBF\x82\x15le" }
31
+ let(:key) { "4pSuk1rAQyuHA5uUYaj0X0BsiPCFb9Nc8J03XA6V5/Y" }
32
+ it "works correctly" do
33
+ subject.decrypt(ciphertext, key: key).should == "zGptmL3vd4obi1vqSiWHt/Ias2k+6qDtuq9vdow8jNA="
77
34
  end
78
35
  end
79
36
  end
80
-
37
+
81
38
  describe '#random_iv' do
82
39
  it "generates a random iv" do
83
- expect_any_instance_of(OpenSSL::Cipher).to receive(:random_iv).and_return :iv
84
- expect(subject.random_iv).to eq(:iv)
40
+ OpenSSL::Cipher.any_instance.should_receive(:random_iv).and_return :iv
41
+ subject.random_iv.should == :iv
85
42
  end
86
43
  end
87
44
 
88
45
  describe '#random_key' do
89
46
  it "generates a random key" do
90
- expect_any_instance_of(OpenSSL::Cipher).to receive(:random_key).and_return :key
91
- expect(subject.random_key).to eq(:key)
47
+ OpenSSL::Cipher.any_instance.should_receive(:random_key).and_return :key
48
+ subject.random_key.should == :key
92
49
  end
93
50
  end
94
51
  end
metadata CHANGED
@@ -1,153 +1,110 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slosilo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.1.2
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Rafał Rzepecki
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2023-11-15 00:00:00.000000000 Z
12
+ date: 2013-03-12 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - ">="
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0'
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - ">="
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rspec
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '3.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '3.0'
41
- - !ruby/object:Gem::Dependency
42
- name: ci_reporter_rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
35
+ - - ! '>='
46
36
  - !ruby/object:Gem::Version
47
37
  version: '0'
48
38
  type: :development
49
39
  prerelease: false
50
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
51
42
  requirements:
52
- - - ">="
43
+ - - ! '>='
53
44
  - !ruby/object:Gem::Version
54
45
  version: '0'
55
46
  - !ruby/object:Gem::Dependency
56
- name: simplecov
47
+ name: ci_reporter
57
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
58
50
  requirements:
59
- - - ">="
51
+ - - ! '>='
60
52
  - !ruby/object:Gem::Version
61
53
  version: '0'
62
54
  type: :development
63
55
  prerelease: false
64
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
65
58
  requirements:
66
- - - ">="
59
+ - - ! '>='
67
60
  - !ruby/object:Gem::Version
68
61
  version: '0'
69
62
  - !ruby/object:Gem::Dependency
70
- name: simplecov-cobertura
63
+ name: simplecov
71
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
72
66
  requirements:
73
- - - ">="
67
+ - - ! '>='
74
68
  - !ruby/object:Gem::Version
75
69
  version: '0'
76
70
  type: :development
77
71
  prerelease: false
78
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
79
74
  requirements:
80
- - - ">="
75
+ - - ! '>='
81
76
  - !ruby/object:Gem::Version
82
77
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: io-grab
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.0.1
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.0.1
97
78
  - !ruby/object:Gem::Dependency
98
79
  name: sequel
99
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
100
82
  requirements:
101
- - - ">="
83
+ - - ! '>='
102
84
  - !ruby/object:Gem::Version
103
85
  version: '0'
104
86
  type: :development
105
87
  prerelease: false
106
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
107
90
  requirements:
108
- - - ">="
91
+ - - ! '>='
109
92
  - !ruby/object:Gem::Version
110
93
  version: '0'
111
94
  - !ruby/object:Gem::Dependency
112
95
  name: sqlite3
113
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
114
98
  requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: bigdecimal
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: activesupport
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
99
+ - - ! '>='
144
100
  - !ruby/object:Gem::Version
145
101
  version: '0'
146
102
  type: :development
147
103
  prerelease: false
148
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
149
106
  requirements:
150
- - - ">="
107
+ - - ! '>='
151
108
  - !ruby/object:Gem::Version
152
109
  version: '0'
153
110
  description: This gem provides an easy way of storing and retrieving encryption keys
@@ -158,79 +115,69 @@ executables: []
158
115
  extensions: []
159
116
  extra_rdoc_files: []
160
117
  files:
161
- - ".github/CODEOWNERS"
162
- - ".gitignore"
163
- - ".gitleaks.toml"
164
- - ".kateproject"
165
- - CHANGELOG.md
166
- - CONTRIBUTING.md
118
+ - .gitignore
167
119
  - Gemfile
168
- - Jenkinsfile
169
120
  - LICENSE
170
121
  - README.md
171
122
  - Rakefile
172
- - SECURITY.md
173
- - dev/Dockerfile.dev
174
- - dev/docker-compose.yml
175
123
  - lib/slosilo.rb
176
124
  - lib/slosilo/adapters/abstract_adapter.rb
177
- - lib/slosilo/adapters/file_adapter.rb
178
- - lib/slosilo/adapters/memory_adapter.rb
179
125
  - lib/slosilo/adapters/mock_adapter.rb
180
126
  - lib/slosilo/adapters/sequel_adapter.rb
181
127
  - lib/slosilo/adapters/sequel_adapter/migration.rb
182
128
  - lib/slosilo/attr_encrypted.rb
183
- - lib/slosilo/errors.rb
184
- - lib/slosilo/jwt.rb
129
+ - lib/slosilo/http_request.rb
185
130
  - lib/slosilo/key.rb
186
131
  - lib/slosilo/keystore.rb
132
+ - lib/slosilo/rack/middleware.rb
187
133
  - lib/slosilo/random.rb
188
134
  - lib/slosilo/symmetric.rb
189
135
  - lib/slosilo/version.rb
190
136
  - lib/tasks/slosilo.rake
191
- - publish.sh
192
- - secrets.yml
193
137
  - slosilo.gemspec
194
- - spec/encrypted_attributes_spec.rb
195
- - spec/file_adapter_spec.rb
196
- - spec/jwt_spec.rb
138
+ - spec/http_request_spec.rb
139
+ - spec/http_stack_spec.rb
197
140
  - spec/key_spec.rb
198
141
  - spec/keystore_spec.rb
142
+ - spec/rack_middleware_spec.rb
199
143
  - spec/random_spec.rb
200
144
  - spec/sequel_adapter_spec.rb
201
145
  - spec/slosilo_spec.rb
202
146
  - spec/spec_helper.rb
203
147
  - spec/symmetric_spec.rb
204
- - test.sh
205
- homepage: https://github.cyberng.com/Conjur-Enterprise/slosilo/
206
- licenses:
207
- - MIT
208
- metadata: {}
148
+ homepage: ''
149
+ licenses: []
209
150
  post_install_message:
210
151
  rdoc_options: []
211
152
  require_paths:
212
153
  - lib
213
154
  required_ruby_version: !ruby/object:Gem::Requirement
155
+ none: false
214
156
  requirements:
215
- - - ">="
157
+ - - ~>
216
158
  - !ruby/object:Gem::Version
217
- version: 3.0.0
159
+ version: 1.9.3
218
160
  required_rubygems_version: !ruby/object:Gem::Requirement
161
+ none: false
219
162
  requirements:
220
- - - ">="
163
+ - - ! '>='
221
164
  - !ruby/object:Gem::Version
222
165
  version: '0'
166
+ segments:
167
+ - 0
168
+ hash: 40977695530656319
223
169
  requirements: []
224
- rubygems_version: 3.4.10
170
+ rubyforge_project:
171
+ rubygems_version: 1.8.24
225
172
  signing_key:
226
- specification_version: 4
173
+ specification_version: 3
227
174
  summary: Store SSL keys in a database
228
175
  test_files:
229
- - spec/encrypted_attributes_spec.rb
230
- - spec/file_adapter_spec.rb
231
- - spec/jwt_spec.rb
176
+ - spec/http_request_spec.rb
177
+ - spec/http_stack_spec.rb
232
178
  - spec/key_spec.rb
233
179
  - spec/keystore_spec.rb
180
+ - spec/rack_middleware_spec.rb
234
181
  - spec/random_spec.rb
235
182
  - spec/sequel_adapter_spec.rb
236
183
  - spec/slosilo_spec.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA256:
3
- metadata.gz: c502ebb0a07b26d44dc5761d60efe6e0287031c7705fea7d6b41e9958b1c8280
4
- data.tar.gz: e4b042d59298a7df94407881e319e35c62257ae705e9151b39f9664fd561f30e
5
- SHA512:
6
- metadata.gz: c21146818734f623efc4c81e283627e72a85ac5265b5a48f68e100881de30877ea23380ecdc16b67597f65ef7831afa6f0acaf310396415d5b03f7603c74f2ef
7
- data.tar.gz: 06311b28a0a5b35e021988c99881a13005cd5d6343f85ebeaa78805c7f91e51df1ca084254ebbd2c980be866572d31d237e46fa163a6bd16300cfd2789e02850
data/.github/CODEOWNERS DELETED
@@ -1,10 +0,0 @@
1
- * @cyberark/conjur-core-team @conjurinc/conjur-core-team @conjurdemos/conjur-core-team @conjur-enterprise/community-and-integrations
2
-
3
- # Changes to .trivyignore require Security Architect approval
4
- .trivyignore @cyberark/security-architects @conjurinc/security-architects @conjurdemos/security-architects @conjur-enterprise/conjur-security
5
-
6
- # Changes to .codeclimate.yml require Quality Architect approval
7
- .codeclimate.yml @cyberark/quality-architects @conjurinc/quality-architects @conjurdemos/quality-architects @conjur-enterprise/conjur-quality
8
-
9
- # Changes to SECURITY.md require Security Architect approval
10
- SECURITY.md @cyberark/security-architects @conjurinc/security-architects @conjurdemos/security-architects @conjur-enterprise/conjur-security