chef-vault 3.3.0 → 4.1.11

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.
Files changed (71) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +32 -6
  3. data/bin/chef-vault +5 -5
  4. data/chef-vault.gemspec +7 -26
  5. data/lib/chef/knife/mixin/helper.rb +29 -1
  6. data/lib/chef/knife/vault_admins.rb +5 -1
  7. data/lib/chef/knife/vault_base.rb +23 -13
  8. data/lib/chef/knife/vault_create.rb +26 -23
  9. data/lib/chef/knife/vault_delete.rb +4 -2
  10. data/lib/chef/knife/vault_download.rb +2 -2
  11. data/lib/chef/knife/vault_edit.rb +4 -4
  12. data/lib/chef/knife/vault_isvault.rb +4 -4
  13. data/lib/chef/knife/vault_itemtype.rb +4 -4
  14. data/lib/chef/knife/vault_list.rb +5 -5
  15. data/lib/chef/knife/vault_refresh.rb +7 -7
  16. data/lib/chef/knife/vault_remove.rb +19 -16
  17. data/lib/chef/knife/vault_rotate_all_keys.rb +5 -4
  18. data/lib/chef/knife/vault_rotate_keys.rb +3 -3
  19. data/lib/chef/knife/vault_show.rb +8 -10
  20. data/lib/chef/knife/vault_update.rb +38 -24
  21. data/lib/chef-vault/actor.rb +9 -7
  22. data/lib/chef-vault/chef_api.rb +4 -4
  23. data/lib/chef-vault/exceptions.rb +3 -0
  24. data/lib/chef-vault/item.rb +57 -21
  25. data/lib/chef-vault/item_keys.rb +35 -9
  26. data/lib/chef-vault/mixins.rb +2 -2
  27. data/lib/chef-vault/version.rb +1 -1
  28. data/lib/chef-vault.rb +8 -8
  29. metadata +8 -135
  30. data/.github/CODEOWNERS +0 -2
  31. data/.gitignore +0 -33
  32. data/.rspec +0 -2
  33. data/.rubocop.yml +0 -6
  34. data/.simplecov +0 -6
  35. data/.travis.yml +0 -19
  36. data/Changelog.md +0 -134
  37. data/DEMO.md +0 -60
  38. data/KNIFE_EXAMPLES.md +0 -256
  39. data/README.md +0 -333
  40. data/Rakefile +0 -50
  41. data/THEORY.md +0 -363
  42. data/UPGRADE.md +0 -55
  43. data/appveyor.yml +0 -32
  44. data/features/clean.feature +0 -23
  45. data/features/clean_on_refresh.feature +0 -27
  46. data/features/clean_unknown_clients.feature +0 -45
  47. data/features/detect_and_warn_v1_vault.feature +0 -14
  48. data/features/isvault.feature +0 -29
  49. data/features/itemtype.feature +0 -24
  50. data/features/step_definitions/chef-databag.rb +0 -9
  51. data/features/step_definitions/chef-repo.rb +0 -72
  52. data/features/step_definitions/chef-vault.rb +0 -151
  53. data/features/step_definitions/chef_databagitem.rb +0 -9
  54. data/features/support/env.rb +0 -14
  55. data/features/vault_create.feature +0 -63
  56. data/features/vault_list.feature +0 -31
  57. data/features/vault_show.feature +0 -45
  58. data/features/vault_show_vaultname.feature +0 -21
  59. data/features/vault_update.feature +0 -18
  60. data/features/verify_id_matches.feature +0 -10
  61. data/features/wrong_private_key.feature +0 -13
  62. data/hooks/pre-commit +0 -43
  63. data/spec/chef-vault/actor_spec.rb +0 -247
  64. data/spec/chef-vault/certificate_spec.rb +0 -37
  65. data/spec/chef-vault/chef_api_spec.rb +0 -39
  66. data/spec/chef-vault/item_keys_spec.rb +0 -263
  67. data/spec/chef-vault/item_spec.rb +0 -360
  68. data/spec/chef-vault/user_spec.rb +0 -36
  69. data/spec/chef-vault_spec.rb +0 -65
  70. data/spec/spec_helper.rb +0 -91
  71. data/tasks/github_changelog_generator.rb +0 -30
metadata CHANGED
@@ -1,100 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-vault
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 4.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom May
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-29 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rake
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '11.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '11.0'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '3.4'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '3.4'
41
- - !ruby/object:Gem::Dependency
42
- name: aruba
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.6'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '0.6'
55
- - !ruby/object:Gem::Dependency
56
- name: simplecov
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0.9'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '0.9'
69
- - !ruby/object:Gem::Dependency
70
- name: simplecov-console
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.2'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.2'
83
- - !ruby/object:Gem::Dependency
84
- name: chef
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- description: Data encryption support for Chef using data bags
11
+ date: 2023-02-14 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Data encryption support for Chef Infra using data bags
98
14
  email:
99
15
  - thom@chef.io
100
16
  executables:
@@ -102,43 +18,10 @@ executables:
102
18
  extensions: []
103
19
  extra_rdoc_files: []
104
20
  files:
105
- - ".github/CODEOWNERS"
106
- - ".gitignore"
107
- - ".rspec"
108
- - ".rubocop.yml"
109
- - ".simplecov"
110
- - ".travis.yml"
111
- - Changelog.md
112
- - DEMO.md
113
21
  - Gemfile
114
- - KNIFE_EXAMPLES.md
115
22
  - LICENSE
116
- - README.md
117
- - Rakefile
118
- - THEORY.md
119
- - UPGRADE.md
120
- - appveyor.yml
121
23
  - bin/chef-vault
122
24
  - chef-vault.gemspec
123
- - features/clean.feature
124
- - features/clean_on_refresh.feature
125
- - features/clean_unknown_clients.feature
126
- - features/detect_and_warn_v1_vault.feature
127
- - features/isvault.feature
128
- - features/itemtype.feature
129
- - features/step_definitions/chef-databag.rb
130
- - features/step_definitions/chef-repo.rb
131
- - features/step_definitions/chef-vault.rb
132
- - features/step_definitions/chef_databagitem.rb
133
- - features/support/env.rb
134
- - features/vault_create.feature
135
- - features/vault_list.feature
136
- - features/vault_show.feature
137
- - features/vault_show_vaultname.feature
138
- - features/vault_update.feature
139
- - features/verify_id_matches.feature
140
- - features/wrong_private_key.feature
141
- - hooks/pre-commit
142
25
  - lib/chef-vault.rb
143
26
  - lib/chef-vault/actor.rb
144
27
  - lib/chef-vault/certificate.rb
@@ -166,18 +49,9 @@ files:
166
49
  - lib/chef/knife/vault_rotate_keys.rb
167
50
  - lib/chef/knife/vault_show.rb
168
51
  - lib/chef/knife/vault_update.rb
169
- - spec/chef-vault/actor_spec.rb
170
- - spec/chef-vault/certificate_spec.rb
171
- - spec/chef-vault/chef_api_spec.rb
172
- - spec/chef-vault/item_keys_spec.rb
173
- - spec/chef-vault/item_spec.rb
174
- - spec/chef-vault/user_spec.rb
175
- - spec/chef-vault_spec.rb
176
- - spec/spec_helper.rb
177
- - tasks/github_changelog_generator.rb
178
52
  homepage: https://github.com/chef/chef-vault
179
53
  licenses:
180
- - Apache License, v2.0
54
+ - Apache-2.0
181
55
  metadata: {}
182
56
  post_install_message:
183
57
  rdoc_options: []
@@ -187,16 +61,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
61
  requirements:
188
62
  - - ">="
189
63
  - !ruby/object:Gem::Version
190
- version: 2.2.0
64
+ version: '2.6'
191
65
  required_rubygems_version: !ruby/object:Gem::Requirement
192
66
  requirements:
193
67
  - - ">="
194
68
  - !ruby/object:Gem::Version
195
69
  version: '0'
196
70
  requirements: []
197
- rubyforge_project:
198
- rubygems_version: 2.6.11
71
+ rubygems_version: 3.1.4
199
72
  signing_key:
200
73
  specification_version: 4
201
- summary: Data encryption support for Chef using data bags
74
+ summary: Data encryption support for Chef Infra using data bags
202
75
  test_files: []
data/.github/CODEOWNERS DELETED
@@ -1,2 +0,0 @@
1
- * @chef/chef-vault-maintainers
2
-
data/.gitignore DELETED
@@ -1,33 +0,0 @@
1
- " from https://github.com/github/gitignore/blob/master/Ruby.gitignore
2
- *.gem
3
- *.rbc
4
- /.config
5
- /coverage/
6
- /InstalledFiles
7
- /pkg/
8
- /spec/reports/
9
- /test/tmp/
10
- /test/version_tmp/
11
- /tmp/
12
-
13
- ## Documentation cache and generated files:
14
- /.yardoc/
15
- /_yardoc/
16
- /doc/
17
- /rdoc/
18
-
19
- ## Environment normalisation:
20
- /.bundle/
21
- /lib/bundler/man/
22
- /binstubs/
23
-
24
- # for a library or gem, you might want to ignore these files since the code is
25
- # intended to run in multiple environments; otherwise, check them in:
26
- Gemfile.lock
27
- .ruby-version
28
- .ruby-gemset
29
-
30
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
31
- .rvmrc
32
-
33
- .chef
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,6 +0,0 @@
1
- AllCops:
2
- Exclude:
3
- - "spec/data/**/*"
4
- - "vendor/**/*"
5
- - "pkg/**/*"
6
- - "tmp/**/*"
data/.simplecov DELETED
@@ -1,6 +0,0 @@
1
- require 'simplecov-console'
2
- SimpleCov.formatters = [
3
- SimpleCov::Formatter::HTMLFormatter,
4
- SimpleCov::Formatter::Console
5
- ]
6
- SimpleCov.start
data/.travis.yml DELETED
@@ -1,19 +0,0 @@
1
- language: ruby
2
- branches:
3
- only:
4
- - master
5
- rvm:
6
- - 2.2.5
7
- - 2.3.1
8
- - 2.4.1
9
- install: bundle install --binstubs --without changelog
10
- before_install: gem install bundler
11
- env: TRAVIS_BUILD=true
12
- deploy:
13
- provider: rubygems
14
- api_key:
15
- secure: NNbOEQWaX+67bsMd1A/BB5lxd2dDzx+4uYsKxSvhVvx34UixKoLRmPhGJr0WapndsXdnG+crPpx3gpseOfJ3u42uNHQI9ASsgOOgmEiJKcW/MO/IQReRI998+XH2A4QLfLQ4JIWjpl8KNZCJSCp7w1LnDV6imy7FSM0mWS+3Lzk=
16
- gem: chef-vault
17
- on:
18
- repo: chef/chef-vault
19
- branch: master
data/Changelog.md DELETED
@@ -1,134 +0,0 @@
1
- # Change Log
2
-
3
- ## [v3.2.0](https://github.com/chef/chef-vault/tree/v3.2.0) (2017-07-13)
4
- [Full Changelog](https://github.com/chef/chef-vault/compare/v3.1.0...v3.2.0)
5
-
6
- **Closed issues:**
7
-
8
- - offline network installation of the chef-vault gem [\#279](https://github.com/chef/chef-vault/issues/279)
9
-
10
- ## [v3.1.0](https://github.com/chef/chef-vault/tree/v3.1.0) (2017-07-04)
11
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.9.2...v3.1.0)
12
-
13
- ## [v2.9.2](https://github.com/chef/chef-vault/tree/v2.9.2) (2017-06-21)
14
- [Full Changelog](https://github.com/chef/chef-vault/compare/v3.0.3...v2.9.2)
15
-
16
- **Implemented enhancements:**
17
-
18
- - Assume all nodes matching the search query are valid nodes [\#272](https://github.com/chef/chef-vault/pull/272) ([kamaradclimber](https://github.com/kamaradclimber))
19
- - Avoid re-encrypting key for all existing clients [\#269](https://github.com/chef/chef-vault/pull/269) ([kamaradclimber](https://github.com/kamaradclimber))
20
-
21
- **Fixed bugs:**
22
-
23
- - Fix fatal error during create [\#281](https://github.com/chef/chef-vault/pull/281) ([neclimdul](https://github.com/neclimdul))
24
- - Avoid sparse key read for non sparse secrets [\#280](https://github.com/chef/chef-vault/pull/280) ([kamaradclimber](https://github.com/kamaradclimber))
25
- - Make sure sparse mode is used on secrets where it is explicit [\#271](https://github.com/chef/chef-vault/pull/271) ([kamaradclimber](https://github.com/kamaradclimber))
26
-
27
- ## [v3.0.3](https://github.com/chef/chef-vault/tree/v3.0.3) (2017-05-03)
28
- [Full Changelog](https://github.com/chef/chef-vault/compare/v3.0.2...v3.0.3)
29
-
30
- **Fixed bugs:**
31
-
32
- - Reduce the search response limit from 100k to 10k [\#275](https://github.com/chef/chef-vault/pull/275) ([btm](https://github.com/btm))
33
- - Replace edit\_data\(\) with edit\_hash\(\) in vault\_edit.rb [\#274](https://github.com/chef/chef-vault/pull/274) ([tmaczukin](https://github.com/tmaczukin))
34
-
35
- ## [v3.0.2](https://github.com/chef/chef-vault/tree/v3.0.2) (2017-04-20)
36
- [Full Changelog](https://github.com/chef/chef-vault/compare/v3.0.1...v3.0.2)
37
-
38
- ## [v3.0.1](https://github.com/chef/chef-vault/tree/v3.0.1) (2017-04-11)
39
- [Full Changelog](https://github.com/chef/chef-vault/compare/v3.0.0...v3.0.1)
40
-
41
- **Fixed bugs:**
42
-
43
- - Change the chef dependency to development only [\#266](https://github.com/chef/chef-vault/pull/266) ([thommay](https://github.com/thommay))
44
-
45
- ## [v3.0.0](https://github.com/chef/chef-vault/tree/v3.0.0) (2017-04-10)
46
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.9.1...v3.0.0)
47
-
48
- **Implemented enhancements:**
49
-
50
- - Vault creation, list, and destruction in sparse mode [\#252](https://github.com/chef/chef-vault/pull/252) ([rveznaver](https://github.com/rveznaver))
51
-
52
- ## [v2.9.1](https://github.com/chef/chef-vault/tree/v2.9.1) (2017-01-19)
53
- [Full Changelog](https://github.com/chef/chef-vault/compare/v3.0.0.rc2...v2.9.1)
54
-
55
- ## [v3.0.0.rc2](https://github.com/chef/chef-vault/tree/v3.0.0.rc2) (2016-12-05)
56
- [Full Changelog](https://github.com/chef/chef-vault/compare/v3.0.0.rc1...v3.0.0.rc2)
57
-
58
- **Implemented enhancements:**
59
-
60
- - Add feature to save each key in different data bag item [\#246](https://github.com/chef/chef-vault/pull/246) ([rveznaver](https://github.com/rveznaver))
61
- - Enable testing with Chef Zero [\#244](https://github.com/chef/chef-vault/pull/244) ([rveznaver](https://github.com/rveznaver))
62
- - Minimize the number of searches [\#243](https://github.com/chef/chef-vault/pull/243) ([thommay](https://github.com/thommay))
63
- - Optimise queries when finding nodes [\#240](https://github.com/chef/chef-vault/pull/240) ([thommay](https://github.com/thommay))
64
-
65
- **Fixed bugs:**
66
-
67
- - Use solo\_legacy\_mode fully [\#242](https://github.com/chef/chef-vault/pull/242) ([thommay](https://github.com/thommay))
68
- - Use legacy solo mode [\#241](https://github.com/chef/chef-vault/pull/241) ([thommay](https://github.com/thommay))
69
-
70
- ## [v3.0.0.rc1](https://github.com/chef/chef-vault/tree/v3.0.0.rc1) (2016-10-21)
71
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.9.0...v3.0.0.rc1)
72
-
73
- **Implemented enhancements:**
74
-
75
- - Removed deprecated knife commands [\#236](https://github.com/chef/chef-vault/pull/236) ([thommay](https://github.com/thommay))
76
- - rename ChefKey to Actor [\#234](https://github.com/chef/chef-vault/pull/234) ([thommay](https://github.com/thommay))
77
- - Move to using a logger for all user output [\#232](https://github.com/chef/chef-vault/pull/232) ([thommay](https://github.com/thommay))
78
- - Add support for clients [\#227](https://github.com/chef/chef-vault/pull/227) ([svanharmelen](https://github.com/svanharmelen))
79
-
80
- ## [v2.9.0](https://github.com/chef/chef-vault/tree/v2.9.0) (2016-04-08)
81
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.8.0...v2.9.0)
82
-
83
- **Implemented enhancements:**
84
-
85
- - Feature - knife vault update - update item\_keys only when no value is provided [\#202](https://github.com/chef/chef-vault/pull/202) ([xakraz](https://github.com/xakraz))
86
-
87
- **Fixed bugs:**
88
-
89
- - knife vault refresh always updates the data bag item [\#193](https://github.com/chef/chef-vault/issues/193)
90
- - Correct vault creation in solo mode [\#206](https://github.com/chef/chef-vault/pull/206) ([kamaradclimber](https://github.com/kamaradclimber))
91
- - Only save keys on refresh operation [\#194](https://github.com/chef/chef-vault/pull/194) ([kamaradclimber](https://github.com/kamaradclimber))
92
-
93
- ## [v2.8.0](https://github.com/chef/chef-vault/tree/v2.8.0) (2016-02-09)
94
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.8.0.rc1...v2.8.0)
95
-
96
- ## [v2.8.0.rc1](https://github.com/chef/chef-vault/tree/v2.8.0.rc1) (2016-01-29)
97
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.7.1...v2.8.0.rc1)
98
-
99
- ## [v2.7.1](https://github.com/chef/chef-vault/tree/v2.7.1) (2016-01-25)
100
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.7.0...v2.7.1)
101
-
102
- ## [v2.7.0](https://github.com/chef/chef-vault/tree/v2.7.0) (2016-01-25)
103
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.6.1...v2.7.0)
104
-
105
- ## [v2.6.1](https://github.com/chef/chef-vault/tree/v2.6.1) (2015-05-28)
106
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.6.0...v2.6.1)
107
-
108
- ## [v2.6.0](https://github.com/chef/chef-vault/tree/v2.6.0) (2015-05-13)
109
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.5.0...v2.6.0)
110
-
111
- ## [v2.5.0](https://github.com/chef/chef-vault/tree/v2.5.0) (2015-02-09)
112
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.4.0...v2.5.0)
113
-
114
- ## [v2.4.0](https://github.com/chef/chef-vault/tree/v2.4.0) (2014-12-03)
115
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.3.0...v2.4.0)
116
-
117
- ## [v2.3.0](https://github.com/chef/chef-vault/tree/v2.3.0) (2014-10-22)
118
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.2.4...v2.3.0)
119
-
120
- ## [v2.2.4](https://github.com/chef/chef-vault/tree/v2.2.4) (2014-07-17)
121
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.2.3...v2.2.4)
122
-
123
- ## [v2.2.3](https://github.com/chef/chef-vault/tree/v2.2.3) (2014-06-24)
124
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.2.2...v2.2.3)
125
-
126
- ## [v2.2.2](https://github.com/chef/chef-vault/tree/v2.2.2) (2014-06-03)
127
- [Full Changelog](https://github.com/chef/chef-vault/compare/v2.2.1...v2.2.2)
128
-
129
- ## [v2.2.1](https://github.com/chef/chef-vault/tree/v2.2.1) (2014-02-26)
130
- [Full Changelog](https://github.com/chef/chef-vault/compare/e7d75c65441989ce915a30fc28782748c8a1ed1e...v2.2.1)
131
-
132
-
133
-
134
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/DEMO.md DELETED
@@ -1,60 +0,0 @@
1
- # A Short Demo of the Magic of Chef-Vault
2
-
3
- ##Set up the magic show from a shell on your own workstation
4
-
5
- ###Put the bunny in the hat
6
-
7
- echo "bunny" > tophat
8
-
9
- ###Put the hat in the magic show
10
-
11
- export assistant=aug24 #Change this to your chef id
12
- export role=magician #Change this to the role you need to pass the secret to
13
-
14
- knife vault create magicshow hat \ #Create a hat object in a data bag called magicshow
15
- --mode client \ #Talk to the chef server rather than local
16
- --file tophat \ #Use the hat (file) we put the bunny in
17
- --search "role:${role}" \ #Encrypted for all *current* nodes with the magician role
18
- --admins "${assistant}" #Encrypted for the assistant
19
-
20
- ###Check the magic show is on the chef server
21
-
22
- knife data bag list
23
- knife vault list
24
-
25
- ###Check the hat is there (and that nobody can see what's in it)
26
-
27
- knife data bag show magicshow hat
28
-
29
- ###Check you can see what's in it
30
-
31
- knife vault show magicshow hat file-content --mode client
32
-
33
- ##'Hop' on to a node with a role of 'magician'
34
-
35
- ###Install required software
36
-
37
- sudo apt-get install ruby-dev --yes
38
- sudo gem install chef-vault --no-ri --no-rdoc
39
-
40
- ###Get the bunny back out of the hat!
41
-
42
- sudo chef-shell --client <<EOF
43
- require 'chef-vault'
44
- puts ChefVault::Item.load('magicshow', 'hat')['file-content']
45
- EOF
46
-
47
- If you are on a node which is not a magician, an exception will be thrown,
48
- and the node cannot see what is in the hat.
49
-
50
- #Finally, do a disappearing act.
51
-
52
- ###Make the hat disappear...
53
-
54
- knife vault delete magicshow hat --mode client
55
-
56
- ###Make the entire magic show disappear...
57
-
58
- knife data bag delete magicshow
59
-
60
- ###Thank you!