sym 2.8.5 → 2.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +19 -12
  3. data/.envrc +7 -0
  4. data/.gitignore +1 -0
  5. data/.rubocop.yml +150 -928
  6. data/.travis.yml +16 -28
  7. data/CHANGELOG.md +201 -174
  8. data/Gemfile +1 -0
  9. data/README.adoc +650 -0
  10. data/Rakefile +6 -2
  11. data/codecov.yml +29 -0
  12. data/exe/keychain +1 -1
  13. data/exe/sym +5 -2
  14. data/lib/ruby_warnings.rb +7 -0
  15. data/lib/sym.rb +1 -7
  16. data/lib/sym/app.rb +1 -1
  17. data/lib/sym/app/args.rb +3 -2
  18. data/lib/sym/app/cli.rb +1 -2
  19. data/lib/sym/app/cli_slop.rb +1 -1
  20. data/lib/sym/app/commands.rb +1 -1
  21. data/lib/sym/app/commands/base_command.rb +1 -1
  22. data/lib/sym/app/commands/bash_completion.rb +2 -2
  23. data/lib/sym/app/commands/open_editor.rb +1 -1
  24. data/lib/sym/app/commands/password_protect_key.rb +4 -4
  25. data/lib/sym/app/commands/show_examples.rb +1 -1
  26. data/lib/sym/app/keychain.rb +15 -9
  27. data/lib/sym/app/output/noop.rb +2 -1
  28. data/lib/sym/app/password/cache.rb +1 -1
  29. data/lib/sym/app/password/providers.rb +2 -3
  30. data/lib/sym/app/private_key/decryptor.rb +2 -2
  31. data/lib/sym/app/private_key/detector.rb +4 -7
  32. data/lib/sym/application.rb +5 -10
  33. data/lib/sym/constants.rb +4 -4
  34. data/lib/sym/data/wrapper_struct.rb +20 -12
  35. data/lib/sym/errors.rb +11 -2
  36. data/lib/sym/extensions/instance_methods.rb +7 -8
  37. data/lib/sym/extensions/stdlib.rb +0 -1
  38. data/lib/sym/extensions/with_retry.rb +1 -1
  39. data/lib/sym/extensions/with_timeout.rb +1 -1
  40. data/lib/sym/version.rb +30 -5
  41. data/sym.gemspec +35 -35
  42. metadata +86 -68
  43. data/README.md +0 -620
  44. data/lib/sym/app/password/providers/drb_provider.rb +0 -41
@@ -2,24 +2,32 @@ require 'sym/errors'
2
2
  module Sym
3
3
  module Data
4
4
  class WrapperStruct < Struct.new(
5
- :encrypted_data, # [Blob] Binary encrypted data (possibly compressed)
6
- :iv, # [String] IV used to encrypt the data
7
- :cipher_name, # [String] Name of the cipher used
8
- :salt, # [Integer] For password-encrypted data this is the salt
9
- :version, # [Integer] Version of the cipher used
10
- :compress # [Boolean] indicates if compression should be applied
11
- )
5
+ # [Blob] Binary encrypted data (possibly compressed)s
6
+ :encrypted_data,
7
+ # [String] IV used to encrypt the datas
8
+ :iv,
9
+ # [String] Name of the cipher used
10
+ :cipher_name,
11
+ # [Integer] For password-encrypted data this is the salt
12
+ :salt,
13
+ # [Integer] Version of the cipher used
14
+ :version,
15
+ # [Boolean] indicates if compression should be applied
16
+ :compress
17
+ )
18
+
19
+ define_singleton_method(:new, Class.method(:new))
12
20
 
13
21
  VERSION = 1
14
22
 
15
23
  attr_accessor :compressed
16
24
 
17
25
  def initialize(
18
- encrypted_data:, # [Blob] Binary encrypted data (possibly compressed)
19
- iv:, # [String] IV used to encrypt the data
20
- cipher_name:, # [String] Name of the cipher used
21
- salt: nil, # [Integer] For password-encrypted data this is the salt
22
- version: VERSION, # [Integer] Version of the cipher used
26
+ encrypted_data:,
27
+ iv:,
28
+ cipher_name:,
29
+ salt: nil,
30
+ version: VERSION,
23
31
  compress: Sym::Configuration.config.compression_enabled
24
32
  )
25
33
  super(encrypted_data, iv, cipher_name, salt, version, compress)
@@ -1,16 +1,21 @@
1
1
  module Sym
2
2
  # All public exceptions of this library are here.
3
3
  module Errors
4
+ # @formatter:off
4
5
  # Exceptions superclass for this library.
5
- class Sym::Errors::Error < StandardError; end
6
+ class Error < StandardError; end
6
7
 
7
8
  # No secret has been provided for encryption or decryption
8
9
  class InsufficientOptionsError < Sym::Errors::Error; end
9
10
 
10
11
  class PasswordError < Sym::Errors::Error; end
12
+
11
13
  class NoPasswordProvided < Sym::Errors::PasswordError; end
14
+
12
15
  class PasswordsDontMatch < Sym::Errors::PasswordError; end
16
+
13
17
  class PasswordTooShort < Sym::Errors::PasswordError; end
18
+
14
19
  class CantReadPasswordNoTTY < Sym::Errors::PasswordError; end
15
20
 
16
21
  class EditorExitedAbnormally < Sym::Errors::Error; end
@@ -20,13 +25,17 @@ module Sym
20
25
  class DataEncodingVersionMismatch< Sym::Errors::Error; end
21
26
 
22
27
  class KeyError < Sym::Errors::Error; end
28
+
23
29
  class InvalidEncodingPrivateKey < Sym::Errors::KeyError; end
24
- class InvalidPasswordProvidedForThePrivateKey < Sym::Errors::KeyError; end
30
+
31
+ class WrongPasswordForKey < Sym::Errors::KeyError; end
32
+
25
33
  class NoPrivateKeyFound < Sym::Errors::KeyError; end
26
34
 
27
35
  class NoDataProvided < Sym::Errors::Error; end
28
36
 
29
37
  class KeyChainCommandError < Sym::Errors::Error; end
38
+ # @formatter:on
30
39
 
31
40
  # Method was called on an abstract class. Override such methods in
32
41
  # subclasses, and use subclasses for instantiation of objects.
@@ -71,7 +71,7 @@ module Sym
71
71
  def make_password_key(cipher, password, salt = nil)
72
72
  key_len = cipher.key_len
73
73
  salt ||= OpenSSL::Random.random_bytes 16
74
- iter = 20000
74
+ iter = 20_000
75
75
  digest = OpenSSL::Digest::SHA256.new
76
76
  key = OpenSSL::PKCS5.pbkdf2_hmac(password, salt, iter, key_len, digest)
77
77
  return key, salt
@@ -87,12 +87,12 @@ module Sym
87
87
  block.call(cipher_struct) if block
88
88
 
89
89
  encrypted_data = update_cipher(cipher_struct.cipher, data)
90
- wrapper_struct = WrapperStruct.new(
91
- encrypted_data: encrypted_data,
92
- iv: cipher_struct.iv,
93
- cipher_name: cipher_struct.cipher.name,
94
- salt: cipher_struct.salt,
95
- compress: !compression_enabled)
90
+ arguments = { encrypted_data: encrypted_data,
91
+ iv: cipher_struct.iv,
92
+ cipher_name: cipher_struct.cipher.name,
93
+ salt: cipher_struct.salt,
94
+ compress: !compression_enabled }
95
+ wrapper_struct = WrapperStruct.new(arguments)
96
96
  encode(wrapper_struct, false)
97
97
  end
98
98
 
@@ -107,7 +107,6 @@ module Sym
107
107
  decode(update_cipher(cipher_struct.cipher, wrapper_struct.encrypted_data))
108
108
  end
109
109
 
110
-
111
110
  def encode_incoming_data(data)
112
111
  compression_enabled = !data.respond_to?(:size) || (data.size > 100 && encryption_config.compression_enabled)
113
112
  data = encode(data, compression_enabled)
@@ -1,4 +1,3 @@
1
-
2
1
  module Kernel
3
2
  def require_dir(___dir)
4
3
  @___dir ||= File.dirname(__FILE__)
@@ -2,7 +2,7 @@ module Sym
2
2
  module Extensions
3
3
  module WithRetry
4
4
 
5
- def with_retry(retries: 3, fail_block: nil, &block)
5
+ def with_retry(retries: 3, fail_block: nil)
6
6
  attempts = 0
7
7
  yield if block_given?
8
8
  rescue StandardError => e
@@ -3,7 +3,7 @@ module Sym
3
3
  module WithTimeout
4
4
 
5
5
  def with_timeout(timeout = 3)
6
- status = Timeout::timeout(timeout) {
6
+ status = Timeout.timeout(timeout) {
7
7
  yield if block_given?
8
8
  }
9
9
  end
@@ -1,8 +1,33 @@
1
1
  module Sym
2
- VERSION = '2.8.5'
3
- DESCRIPTION = <<-eof
4
- Sym is a ruby library (gem) that offers both the command line interface (CLI) and a set of rich Ruby APIs, which make it rather trivial to add encryption and decryption of sensitive data to your development or deployment flow. As a layer of additional security, you can encrypt the private key itself with a password. Unlike many other existing encryption tools, Sym focuses on getting out of the way — by offering its streamlined interface, hoping to make encryption of application secrets nearly completely transparent to the developers. For the data encryption Sym uses a symmetric 256-bit key with the AES-256-CBC cipher, same cipher as used by the US Government. For password-protecting the key Sym uses AES-128-CBC cipher. The resulting data is zlib-compressed and base64-encoded. The keys are also base64 encoded for easy copying/pasting/etc.
5
-
6
- Sym accomplishes encryption transparency by combining convenience features: 1) Sym can read the private key from multiple source types, such as: a pathname to a file, an environment variable name, a keychain entry, or CLI argument. You simply pass either of these to the -k flag — one flag that works for all source types. 2) By utilizing OS-X Keychain on a Mac, Sym offers truly secure way of storing the key on a local machine, much more secure then storing it on a file system, 3) By using a local password cache (activated with -c) via an in-memory provider such as memcached or drb, sym invocations take advantage of password cache, and only ask for a password once per a configurable time period, 4) By using SYM_ARGS environment variable, where common flags can be saved. This is activated with sym -A, 5) By reading the key from the default key source file ~/.sym.key which requires no flags at all, 6) By utilizing the --negate option to quickly encrypt a regular file, or decrypt an encrypted file with extension .enc 7) By implementing the -t (edit) mode, that opens an encrypted file in your $EDITOR, and replaces the encrypted version upon save & exit, optionally creating a backup. 8) By offering the Sym::MagicFile ruby API to easily read encrypted files into memory.
2
+ VERSION = '2.10.0'.freeze
3
+ DESCRIPTION = <<~eof
4
+ Sym is a ruby library (gem) that offers both the command line interface (CLI) and a set of rich Ruby APIs, which make it rather trivial to add encryption and decryption of sensitive data to your development or deployment workflow.
5
+
6
+ For additional security the private key itself can be encrypted with a user-generated password. For decryption using the key the password can be input into STDIN, or be defined by an ENV variable, or an OS-X Keychain Entry.
7
+
8
+ Unlike many other existing encryption tools, Sym focuses on getting out of your way by offering a streamlined interface with password caching (if MemCached is installed and running locally) in hopes to make encryption of application secrets nearly completely transparent to the developers.
9
+
10
+ Sym uses symmetric 256-bit key encryption with the AES-256-CBC cipher, same cipher as used by the US Government.
11
+
12
+ For password-protecting the key Sym uses AES-128-CBC cipher. The resulting data is zlib-compressed and base64-encoded. The keys are also base64 encoded for easy copying/pasting/etc.
13
+
14
+ Sym accomplishes encryption transparency by combining several convenient features:
15
+
16
+ 1. Sym can read the private key from multiple source types, such as pathname, an environment variable name, a keychain entry, or CLI argument. You simply pass either of these to the -k flag — one flag that works for all source types.
17
+
18
+ 2. By utilizing OS-X Keychain on a Mac, Sym offers truly secure way of storing the key on a local machine, much more secure then storing it on a file system,
19
+
20
+ 3. By using a local password cache (activated with -c) via an in-memory provider such as memcached, sym invocations take advantage of password cache, and only ask for a password once per a configurable time period,
21
+
22
+ 4. By using SYM_ARGS environment variable, where common flags can be saved. This is activated with sym -A,
23
+
24
+ 5. By reading the key from the default key source file ~/.sym.key which requires no flags at all,
25
+
26
+ 6. By utilizing the --negate option to quickly encrypt a regular file, or decrypt an encrypted file with extension .enc
27
+
28
+ 7. By implementing the -t (edit) mode, that opens an encrypted file in your $EDITOR, and replaces the encrypted version upon save & exit, optionally creating a backup.
29
+
30
+ 8. By offering the Sym::MagicFile ruby API to easily read encrypted files into memory.
31
+
7
32
  eof
8
33
  end
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'sym/version'
@@ -19,48 +18,49 @@ Gem::Specification.new do |spec|
19
18
  spec.bindir = 'exe'
20
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
20
  spec.require_paths = ['lib']
22
- spec.required_ruby_version = '>= 2.2'
23
- spec.post_install_message = <<-EOF
24
-
25
- Thank you for installing Sym!
26
-
27
- BLOG POST
28
- =========
29
- http://kig.re/2017/03/10/dead-simple-encryption-with-sym.html
30
-
31
- BASH COMPLETION
32
- ===============
33
- To enable bash command line completion and install highly useful
34
- command line BASH wrapper 'symit', please run the following
35
- command after installing the gem. It appends sym's shell completion
36
- wrapper to the file specified in arguments to -B flag.
37
-
38
- sym -B ~/.bash_profile
39
- source ~/.bash_profile
40
- # then:
41
- sym --help
42
- symit --help
43
-
44
- Thank you for using Sym and happy encrypting :)
45
-
46
- @kigster on Github,
47
- @kig on Twitter.
48
-
49
- EOF
21
+ spec.required_ruby_version = '>= 2.3'
22
+ spec.post_install_message = <<~EOF
23
+
24
+ Thank you for installing Sym!
25
+
26
+ BLOG POST
27
+ =========
28
+ http://kig.re/2017/03/10/dead-simple-encryption-with-sym.html
29
+
30
+ BASH COMPLETION
31
+ ===============
32
+ To enable bash command line completion and install highly useful
33
+ command line BASH wrapper 'symit', please run the following
34
+ command after installing the gem. It appends sym's shell completion
35
+ wrapper to the file specified in arguments to -B flag.
36
+
37
+ sym -B ~/.bash_profile
38
+ source ~/.bash_profile
39
+ # then:
40
+ sym --help
41
+ symit --help
42
+
43
+ Thank you for using Sym and happy encrypting :)
44
+
45
+ @kigster on Github,
46
+ @kig on Twitter.
47
+
48
+ EOF
50
49
  spec.add_dependency 'colored2', '~> 3'
51
50
  spec.add_dependency 'slop', '~> 4.3'
52
51
  spec.add_dependency 'activesupport'
53
- spec.add_dependency 'highline', '~> 1.7'
54
- spec.add_dependency 'coin', '~> 0.1.8'
55
- spec.add_dependency 'dalli', '~> 2.7'
52
+ spec.add_dependency 'highline'
53
+ spec.add_dependency 'dalli'
56
54
 
57
- spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0'
58
- spec.add_development_dependency 'simplecov'
59
- spec.add_development_dependency 'irbtools'
60
55
  spec.add_development_dependency 'aruba'
61
56
  spec.add_development_dependency 'bundler'
57
+ spec.add_development_dependency 'irbtools'
62
58
  spec.add_development_dependency 'rake'
59
+ spec.add_development_dependency 'relaxed-rubocop'
63
60
  spec.add_development_dependency 'rspec', '~> 3'
64
61
  spec.add_development_dependency 'rspec-its'
62
+ spec.add_development_dependency 'rubocop', '0.81.0'
63
+ spec.add_development_dependency 'simplecov'
64
+ spec.add_development_dependency 'codecov'
65
65
  spec.add_development_dependency 'yard'
66
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sym
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.5
4
+ version: 2.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konstantin Gredeskoul
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-13 00:00:00.000000000 Z
11
+ date: 2020-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2
@@ -56,60 +56,60 @@ dependencies:
56
56
  name: highline
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.7'
61
+ version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.7'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: coin
70
+ name: dalli
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.1.8
75
+ version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 0.1.8
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: dalli
84
+ name: aruba
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '2.7'
90
- type: :runtime
89
+ version: '0'
90
+ type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '2.7'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: codeclimate-test-reporter
98
+ name: bundler
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '1.0'
103
+ version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: '1.0'
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: simplecov
112
+ name: irbtools
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -123,7 +123,7 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: irbtools
126
+ name: rake
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
@@ -137,7 +137,7 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  - !ruby/object:Gem::Dependency
140
- name: aruba
140
+ name: relaxed-rubocop
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
@@ -151,21 +151,21 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
- name: bundler
154
+ name: rspec
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0'
159
+ version: '3'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: '3'
167
167
  - !ruby/object:Gem::Dependency
168
- name: rake
168
+ name: rspec-its
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - ">="
@@ -179,21 +179,35 @@ dependencies:
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
- name: rspec
182
+ name: rubocop
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - "~>"
185
+ - - '='
186
186
  - !ruby/object:Gem::Version
187
- version: '3'
187
+ version: 0.81.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - "~>"
192
+ - - '='
193
193
  - !ruby/object:Gem::Version
194
- version: '3'
194
+ version: 0.81.0
195
195
  - !ruby/object:Gem::Dependency
196
- name: rspec-its
196
+ name: simplecov
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: codecov
197
211
  requirement: !ruby/object:Gem::Requirement
198
212
  requirements:
199
213
  - - ">="
@@ -222,30 +236,33 @@ dependencies:
222
236
  version: '0'
223
237
  description: "Sym is a ruby library (gem) that offers both the command line interface
224
238
  (CLI) and a set of rich Ruby APIs, which make it rather trivial to add encryption
225
- and decryption of sensitive data to your development or deployment flow. As a layer
226
- of additional security, you can encrypt the private key itself with a password.
227
- \ Unlike many other existing encryption tools, Sym focuses on getting out of the
228
- way by offering its streamlined interface, hoping to make encryption of application
229
- secrets nearly completely transparent to the developers. For the data encryption
230
- Sym uses a symmetric 256-bit key with the AES-256-CBC cipher, same cipher as used
231
- by the US Government. For password-protecting the key Sym uses AES-128-CBC cipher.
232
- The resulting data is zlib-compressed and base64-encoded. The keys are also base64
233
- encoded for easy copying/pasting/etc.\n \nSym accomplishes encryption transparency
234
- by combining convenience features: 1) Sym can read the private key from multiple
235
- source types, such as: a pathname to a file, an environment variable name, a keychain
236
- entry, or CLI argument. You simply pass either of these to the -k flag — one flag
237
- that works for all source types. 2) By utilizing OS-X Keychain on a Mac, Sym offers
238
- truly secure way of storing the key on a local machine, much more secure then storing
239
- it on a file system, 3) By using a local password cache (activated with -c) via
240
- an in-memory provider such as memcached or drb, sym invocations take advantage of
241
- password cache, and only ask for a password once per a configurable time period,
242
- 4) By using SYM_ARGS environment variable, where common flags can be saved. This
243
- is activated with sym -A, 5) By reading the key from the default key source file
244
- ~/.sym.key which requires no flags at all, 6) By utilizing the --negate option to
245
- quickly encrypt a regular file, or decrypt an encrypted file with extension .enc
246
- 7) By implementing the -t (edit) mode, that opens an encrypted file in your $EDITOR,
247
- and replaces the encrypted version upon save & exit, optionally creating a backup.
248
- 8) By offering the Sym::MagicFile ruby API to easily read encrypted files into memory.\n"
239
+ and decryption of sensitive data to your development or deployment workflow.\n\nFor
240
+ additional security the private key itself can be encrypted with a user-generated
241
+ password. For decryption using the key the password can be input into STDIN, or
242
+ be defined by an ENV variable, or an OS-X Keychain Entry. \n\nUnlike many other
243
+ existing encryption tools, Sym focuses on getting out of your way by offering a
244
+ streamlined interface with password caching (if MemCached is installed and running
245
+ locally) in hopes to make encryption of application secrets nearly completely transparent
246
+ to the developers. \n\nSym uses symmetric 256-bit key encryption with the AES-256-CBC
247
+ cipher, same cipher as used by the US Government. \n\nFor password-protecting the
248
+ key Sym uses AES-128-CBC cipher. The resulting data is zlib-compressed and base64-encoded.
249
+ The keys are also base64 encoded for easy copying/pasting/etc.\n\nSym accomplishes
250
+ encryption transparency by combining several convenient features:\n \n 1. Sym can
251
+ read the private key from multiple source types, such as pathname, an environment
252
+ variable name, a keychain entry, or CLI argument. You simply pass either of these
253
+ to the -k flag one flag that works for all source types.\n \n 2. By utilizing
254
+ OS-X Keychain on a Mac, Sym offers truly secure way of storing the key on a local
255
+ machine, much more secure then storing it on a file system,\n \n 3. By using a
256
+ local password cache (activated with -c) via an in-memory provider such as memcached,
257
+ sym invocations take advantage of password cache, and only ask for a password once
258
+ per a configurable time period, \n\n 4. By using SYM_ARGS environment variable,
259
+ where common flags can be saved. This is activated with sym -A,\n \n 5. By reading
260
+ the key from the default key source file ~/.sym.key which requires no flags at all,\n
261
+ \n 6. By utilizing the --negate option to quickly encrypt a regular file, or decrypt
262
+ an encrypted file with extension .enc\n \n 7. By implementing the -t (edit) mode,
263
+ that opens an encrypted file in your $EDITOR, and replaces the encrypted version
264
+ upon save & exit, optionally creating a backup.\n \n 8. By offering the Sym::MagicFile
265
+ ruby API to easily read encrypted files into memory.\n\n"
249
266
  email:
250
267
  - kigster@gmail.com
251
268
  executables:
@@ -256,6 +273,7 @@ extra_rdoc_files: []
256
273
  files:
257
274
  - ".circleci/config.yml"
258
275
  - ".document"
276
+ - ".envrc"
259
277
  - ".gitignore"
260
278
  - ".rspec"
261
279
  - ".rubocop.yml"
@@ -264,13 +282,14 @@ files:
264
282
  - CHANGELOG.md
265
283
  - Gemfile
266
284
  - LICENSE
267
- - README.md
285
+ - README.adoc
268
286
  - Rakefile
269
287
  - SYM-CLI.md
270
288
  - bin/console
271
289
  - bin/setup
272
290
  - bin/sym.completion.bash
273
291
  - bin/sym.symit.bash
292
+ - codecov.yml
274
293
  - design/ascii-cinema.png
275
294
  - design/sym-class-dependency-future-refactor.png
276
295
  - design/sym-class-dependency.graffle
@@ -281,6 +300,7 @@ files:
281
300
  - design/sym-symit-help.png
282
301
  - exe/keychain
283
302
  - exe/sym
303
+ - lib/ruby_warnings.rb
284
304
  - lib/sym.rb
285
305
  - lib/sym/app.rb
286
306
  - lib/sym/app/args.rb
@@ -308,7 +328,6 @@ files:
308
328
  - lib/sym/app/output/stdout.rb
309
329
  - lib/sym/app/password/cache.rb
310
330
  - lib/sym/app/password/providers.rb
311
- - lib/sym/app/password/providers/drb_provider.rb
312
331
  - lib/sym/app/password/providers/memcached_provider.rb
313
332
  - lib/sym/app/private_key/base64_decoder.rb
314
333
  - lib/sym/app/private_key/decryptor.rb
@@ -350,16 +369,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
350
369
  requirements:
351
370
  - - ">="
352
371
  - !ruby/object:Gem::Version
353
- version: '2.2'
372
+ version: '2.3'
354
373
  required_rubygems_version: !ruby/object:Gem::Requirement
355
374
  requirements:
356
375
  - - ">="
357
376
  - !ruby/object:Gem::Version
358
377
  version: '0'
359
378
  requirements: []
360
- rubyforge_project:
361
- rubygems_version: 2.7.6
362
- signing_key:
379
+ rubygems_version: 3.1.4
380
+ signing_key:
363
381
  specification_version: 4
364
382
  summary: Dead-simple and easy to use encryption library on top of OpenSSL, offering
365
383
  rich Ruby API as well as feature-rich CLI able to generate a key, encrypt/decrypt