s3-secure 0.2.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +16 -0
  4. data/LICENSE.txt +201 -22
  5. data/README.md +134 -16
  6. data/lib/s3_secure.rb +3 -2
  7. data/lib/s3_secure/access_logs.rb +30 -0
  8. data/lib/s3_secure/access_logs/base.rb +4 -0
  9. data/lib/s3_secure/access_logs/disable.rb +37 -0
  10. data/lib/s3_secure/access_logs/enable.rb +41 -0
  11. data/lib/s3_secure/access_logs/list.rb +25 -0
  12. data/lib/s3_secure/access_logs/show.rb +89 -0
  13. data/lib/s3_secure/aws_services.rb +1 -30
  14. data/lib/s3_secure/aws_services/s3.rb +54 -0
  15. data/lib/s3_secure/cli.rb +26 -0
  16. data/lib/s3_secure/command.rb +7 -0
  17. data/lib/s3_secure/encryption.rb +2 -0
  18. data/lib/s3_secure/encryption/disable.rb +4 -8
  19. data/lib/s3_secure/encryption/enable.rb +4 -8
  20. data/lib/s3_secure/encryption/list.rb +12 -16
  21. data/lib/s3_secure/encryption/show.rb +11 -6
  22. data/lib/s3_secure/help/batch.md +14 -0
  23. data/lib/s3_secure/help/encryption/disable.md +5 -0
  24. data/lib/s3_secure/help/encryption/enable.md +6 -0
  25. data/lib/s3_secure/help/encryption/list.md +5 -0
  26. data/lib/s3_secure/help/lifecycle/add.md +13 -0
  27. data/lib/s3_secure/help/lifecycle/list.md +22 -0
  28. data/lib/s3_secure/help/lifecycle/remove.md +5 -0
  29. data/lib/s3_secure/help/lifecycle/show.md +13 -0
  30. data/lib/s3_secure/help/policy/enforce_ssl.md +34 -0
  31. data/lib/s3_secure/help/policy/list.md +5 -0
  32. data/lib/s3_secure/help/policy/unforce_ssl.md +61 -0
  33. data/lib/s3_secure/help/summary.md +22 -0
  34. data/lib/s3_secure/lifecycle.rb +31 -0
  35. data/lib/s3_secure/lifecycle/add.rb +33 -0
  36. data/lib/s3_secure/lifecycle/base.rb +5 -0
  37. data/lib/s3_secure/lifecycle/builder.rb +47 -0
  38. data/lib/s3_secure/lifecycle/list.rb +24 -0
  39. data/lib/s3_secure/lifecycle/remove.rb +28 -0
  40. data/lib/s3_secure/lifecycle/show.rb +40 -0
  41. data/lib/s3_secure/policy.rb +2 -0
  42. data/lib/s3_secure/policy/document.rb +1 -1
  43. data/lib/s3_secure/policy/enforce.rb +3 -6
  44. data/lib/s3_secure/policy/list.rb +13 -17
  45. data/lib/s3_secure/policy/show.rb +8 -6
  46. data/lib/s3_secure/policy/unforce.rb +5 -8
  47. data/lib/s3_secure/remediate_all.rb +11 -0
  48. data/lib/s3_secure/summary.rb +13 -0
  49. data/lib/s3_secure/summary/item.rb +16 -0
  50. data/lib/s3_secure/summary/items.rb +65 -0
  51. data/lib/s3_secure/table.rb +18 -0
  52. data/lib/s3_secure/version.rb +1 -1
  53. data/lib/s3_secure/versioning.rb +29 -0
  54. data/lib/s3_secure/versioning/base.rb +4 -0
  55. data/lib/s3_secure/versioning/disable.rb +19 -0
  56. data/lib/s3_secure/versioning/enable.rb +19 -0
  57. data/lib/s3_secure/versioning/list.rb +24 -0
  58. data/lib/s3_secure/versioning/show.rb +27 -0
  59. data/s3-secure.gemspec +5 -2
  60. data/spec/lib/lifecycle/builder_spec.rb +85 -0
  61. metadata +71 -6
  62. data/Gemfile.lock +0 -89
  63. data/lib/s3_secure/help/hello.md +0 -5
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3-secure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-23 00:00:00.000000000 Z
11
+ date: 2020-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: cli-format
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: memoist
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,6 +80,20 @@ dependencies:
66
80
  - - ">="
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: text-table
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: thor
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -176,7 +204,6 @@ files:
176
204
  - ".rspec"
177
205
  - CHANGELOG.md
178
206
  - Gemfile
179
- - Gemfile.lock
180
207
  - Guardfile
181
208
  - LICENSE.txt
182
209
  - README.md
@@ -185,8 +212,15 @@ files:
185
212
  - lib/s3-secure.rb
186
213
  - lib/s3_secure.rb
187
214
  - lib/s3_secure/abstract_base.rb
215
+ - lib/s3_secure/access_logs.rb
216
+ - lib/s3_secure/access_logs/base.rb
217
+ - lib/s3_secure/access_logs/disable.rb
218
+ - lib/s3_secure/access_logs/enable.rb
219
+ - lib/s3_secure/access_logs/list.rb
220
+ - lib/s3_secure/access_logs/show.rb
188
221
  - lib/s3_secure/autoloader.rb
189
222
  - lib/s3_secure/aws_services.rb
223
+ - lib/s3_secure/aws_services/s3.rb
190
224
  - lib/s3_secure/batch.rb
191
225
  - lib/s3_secure/cli.rb
192
226
  - lib/s3_secure/command.rb
@@ -200,9 +234,27 @@ files:
200
234
  - lib/s3_secure/encryption/list.rb
201
235
  - lib/s3_secure/encryption/show.rb
202
236
  - lib/s3_secure/help.rb
237
+ - lib/s3_secure/help/batch.md
203
238
  - lib/s3_secure/help/completion.md
204
239
  - lib/s3_secure/help/completion_script.md
205
- - lib/s3_secure/help/hello.md
240
+ - lib/s3_secure/help/encryption/disable.md
241
+ - lib/s3_secure/help/encryption/enable.md
242
+ - lib/s3_secure/help/encryption/list.md
243
+ - lib/s3_secure/help/lifecycle/add.md
244
+ - lib/s3_secure/help/lifecycle/list.md
245
+ - lib/s3_secure/help/lifecycle/remove.md
246
+ - lib/s3_secure/help/lifecycle/show.md
247
+ - lib/s3_secure/help/policy/enforce_ssl.md
248
+ - lib/s3_secure/help/policy/list.md
249
+ - lib/s3_secure/help/policy/unforce_ssl.md
250
+ - lib/s3_secure/help/summary.md
251
+ - lib/s3_secure/lifecycle.rb
252
+ - lib/s3_secure/lifecycle/add.rb
253
+ - lib/s3_secure/lifecycle/base.rb
254
+ - lib/s3_secure/lifecycle/builder.rb
255
+ - lib/s3_secure/lifecycle/list.rb
256
+ - lib/s3_secure/lifecycle/remove.rb
257
+ - lib/s3_secure/lifecycle/show.rb
206
258
  - lib/s3_secure/policy.rb
207
259
  - lib/s3_secure/policy/base.rb
208
260
  - lib/s3_secure/policy/checker.rb
@@ -214,16 +266,28 @@ files:
214
266
  - lib/s3_secure/policy/list.rb
215
267
  - lib/s3_secure/policy/show.rb
216
268
  - lib/s3_secure/policy/unforce.rb
269
+ - lib/s3_secure/remediate_all.rb
270
+ - lib/s3_secure/summary.rb
271
+ - lib/s3_secure/summary/item.rb
272
+ - lib/s3_secure/summary/items.rb
273
+ - lib/s3_secure/table.rb
217
274
  - lib/s3_secure/version.rb
275
+ - lib/s3_secure/versioning.rb
276
+ - lib/s3_secure/versioning/base.rb
277
+ - lib/s3_secure/versioning/disable.rb
278
+ - lib/s3_secure/versioning/enable.rb
279
+ - lib/s3_secure/versioning/list.rb
280
+ - lib/s3_secure/versioning/show.rb
218
281
  - s3-secure.gemspec
219
282
  - spec/lib/cli_spec.rb
283
+ - spec/lib/lifecycle/builder_spec.rb
220
284
  - spec/lib/policy/checker_spec.rb
221
285
  - spec/lib/policy/document/force_ssl_remove_spec.rb
222
286
  - spec/lib/policy/document_spec.rb
223
287
  - spec/spec_helper.rb
224
288
  homepage: https://github.com/tongueroo/s3-secure
225
289
  licenses:
226
- - MIT
290
+ - Apache2.0
227
291
  metadata: {}
228
292
  post_install_message:
229
293
  rdoc_options: []
@@ -240,12 +304,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
304
  - !ruby/object:Gem::Version
241
305
  version: '0'
242
306
  requirements: []
243
- rubygems_version: 3.0.6
307
+ rubygems_version: 3.1.2
244
308
  signing_key:
245
309
  specification_version: 4
246
310
  summary: S3 Bucket security hardening tool
247
311
  test_files:
248
312
  - spec/lib/cli_spec.rb
313
+ - spec/lib/lifecycle/builder_spec.rb
249
314
  - spec/lib/policy/checker_spec.rb
250
315
  - spec/lib/policy/document/force_ssl_remove_spec.rb
251
316
  - spec/lib/policy/document_spec.rb
@@ -1,89 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- s3-secure (0.1.0)
5
- activesupport
6
- aws-sdk-s3
7
- memoist
8
- rainbow
9
- thor
10
- zeitwerk
11
-
12
- GEM
13
- remote: https://rubygems.org/
14
- specs:
15
- activesupport (6.0.1)
16
- concurrent-ruby (~> 1.0, >= 1.0.2)
17
- i18n (>= 0.7, < 2)
18
- minitest (~> 5.1)
19
- tzinfo (~> 1.1)
20
- zeitwerk (~> 2.2)
21
- aws-eventstream (1.0.3)
22
- aws-partitions (1.240.0)
23
- aws-sdk-core (3.78.0)
24
- aws-eventstream (~> 1.0, >= 1.0.2)
25
- aws-partitions (~> 1, >= 1.239.0)
26
- aws-sigv4 (~> 1.1)
27
- jmespath (~> 1.0)
28
- aws-sdk-kms (1.25.0)
29
- aws-sdk-core (~> 3, >= 3.71.0)
30
- aws-sigv4 (~> 1.1)
31
- aws-sdk-s3 (1.56.0)
32
- aws-sdk-core (~> 3, >= 3.77.0)
33
- aws-sdk-kms (~> 1)
34
- aws-sigv4 (~> 1.1)
35
- aws-sigv4 (1.1.0)
36
- aws-eventstream (~> 1.0, >= 1.0.2)
37
- byebug (11.0.1)
38
- cli_markdown (0.1.0)
39
- codeclimate-test-reporter (1.0.9)
40
- simplecov (<= 0.13)
41
- concurrent-ruby (1.1.5)
42
- diff-lcs (1.3)
43
- docile (1.1.5)
44
- i18n (1.7.0)
45
- concurrent-ruby (~> 1.0)
46
- jmespath (1.4.0)
47
- json (2.2.0)
48
- memoist (0.16.1)
49
- minitest (5.13.0)
50
- rainbow (3.0.0)
51
- rake (13.0.1)
52
- rspec (3.9.0)
53
- rspec-core (~> 3.9.0)
54
- rspec-expectations (~> 3.9.0)
55
- rspec-mocks (~> 3.9.0)
56
- rspec-core (3.9.0)
57
- rspec-support (~> 3.9.0)
58
- rspec-expectations (3.9.0)
59
- diff-lcs (>= 1.2.0, < 2.0)
60
- rspec-support (~> 3.9.0)
61
- rspec-mocks (3.9.0)
62
- diff-lcs (>= 1.2.0, < 2.0)
63
- rspec-support (~> 3.9.0)
64
- rspec-support (3.9.0)
65
- simplecov (0.13.0)
66
- docile (~> 1.1.0)
67
- json (>= 1.8, < 3)
68
- simplecov-html (~> 0.10.0)
69
- simplecov-html (0.10.2)
70
- thor (0.20.3)
71
- thread_safe (0.3.6)
72
- tzinfo (1.2.5)
73
- thread_safe (~> 0.1)
74
- zeitwerk (2.2.1)
75
-
76
- PLATFORMS
77
- ruby
78
-
79
- DEPENDENCIES
80
- bundler
81
- byebug
82
- cli_markdown
83
- codeclimate-test-reporter
84
- rake
85
- rspec
86
- s3-secure!
87
-
88
- BUNDLED WITH
89
- 2.0.2
@@ -1,5 +0,0 @@
1
- ## Examples
2
-
3
- s3-secure hello
4
- s3-secure hello NAME
5
- s3-secure hello NAME --from me