foreman_openscap 0.6.3 → 0.6.4

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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/app/assets/javascripts/foreman_openscap/openscap_proxy.js +7 -0
  4. data/app/assets/javascripts/foreman_openscap/policy_edit.js +15 -0
  5. data/app/controllers/api/v2/compliance/arf_reports_controller.rb +2 -2
  6. data/app/controllers/api/v2/compliance/policies_controller.rb +16 -4
  7. data/app/controllers/api/v2/compliance/scap_contents_controller.rb +2 -2
  8. data/app/controllers/api/v2/compliance/tailoring_files_controller.rb +92 -0
  9. data/app/controllers/concerns/foreman/controller/parameters/policy_api.rb +2 -2
  10. data/app/controllers/concerns/foreman/controller/parameters/tailoring_file.rb +15 -0
  11. data/app/controllers/openscap_proxies_controller.rb +31 -0
  12. data/app/controllers/policies_controller.rb +14 -15
  13. data/app/controllers/scap_contents_controller.rb +0 -10
  14. data/app/controllers/tailoring_files_controller.rb +75 -0
  15. data/app/helpers/compliance_dashboard_helper.rb +2 -2
  16. data/app/helpers/policies_helper.rb +29 -1
  17. data/app/helpers/tailoring_files_helper.rb +5 -0
  18. data/app/lib/proxy_api/openscap.rb +18 -2
  19. data/app/models/concerns/foreman_openscap/data_stream_content.rb +43 -0
  20. data/app/models/concerns/foreman_openscap/host_extensions.rb +1 -1
  21. data/app/models/concerns/foreman_openscap/hostgroup_extensions.rb +8 -0
  22. data/app/models/foreman_openscap/policy.rb +28 -3
  23. data/app/models/foreman_openscap/scap_content.rb +4 -72
  24. data/app/models/foreman_openscap/scap_content_profile.rb +2 -0
  25. data/app/models/foreman_openscap/tailoring_file.rb +19 -0
  26. data/app/services/foreman_openscap/openscap_proxy_version_check.rb +63 -0
  27. data/app/validators/foreman_openscap/data_stream_validator.rb +44 -0
  28. data/app/views/api/v2/compliance/policies/base.json.rabl +2 -1
  29. data/app/views/api/v2/compliance/tailoring_files/base.json.rabl +6 -0
  30. data/app/views/api/v2/compliance/tailoring_files/index.json.rabl +3 -0
  31. data/app/views/api/v2/compliance/tailoring_files/main.json.rabl +5 -0
  32. data/app/views/api/v2/compliance/tailoring_files/show.json.rabl +7 -0
  33. data/app/views/arf_reports/_list.html.erb +3 -2
  34. data/app/views/dashboard/_compliance_host_reports_widget.html.erb +3 -3
  35. data/app/views/policies/_form.html.erb +9 -0
  36. data/app/views/policies/_list.html.erb +16 -4
  37. data/app/views/policies/_tailoring_file_selected.html.erb +3 -0
  38. data/app/views/policies/steps/_scap_content_form.html.erb +8 -0
  39. data/app/views/policies/welcome.html.erb +12 -13
  40. data/app/views/scap_contents/_list.html.erb +1 -1
  41. data/app/views/scap_contents/welcome.html.erb +14 -13
  42. data/app/views/smart_proxies/_openscap_spool.html.erb +9 -0
  43. data/app/views/smart_proxies/plugins/_openscap.html.erb +12 -0
  44. data/app/views/tailoring_files/_form.html.erb +25 -0
  45. data/app/views/tailoring_files/_list.html.erb +29 -0
  46. data/app/views/tailoring_files/edit.html.erb +3 -0
  47. data/app/views/tailoring_files/index.html.erb +3 -0
  48. data/app/views/tailoring_files/new.html.erb +3 -0
  49. data/app/views/tailoring_files/welcome.html.erb +21 -0
  50. data/config/routes.rb +22 -0
  51. data/db/migrate/20161109155255_create_tailoring_files.rb +23 -0
  52. data/db/migrate/20161223153249_add_permissions_to_arf_report.rb +11 -0
  53. data/lib/foreman_openscap/engine.rb +30 -5
  54. data/lib/foreman_openscap/version.rb +1 -1
  55. data/test/factories/policy_factory.rb +2 -0
  56. data/test/factories/scap_content_related.rb +7 -0
  57. data/test/files/tailoring_files/ssg-firefox-ds-tailoring-2.xml +23 -0
  58. data/test/files/tailoring_files/ssg-firefox-ds-tailoring.xml +31 -0
  59. data/test/functional/api/v2/compliance/policies_controller_test.rb +35 -8
  60. data/test/functional/api/v2/compliance/scap_contents_controller_test.rb +1 -1
  61. data/test/functional/api/v2/compliance/tailoring_files_controller_test.rb +63 -0
  62. data/test/functional/openscap_proxies_controller_test.rb +14 -0
  63. data/test/functional/tailoring_files_controller_test.rb +38 -0
  64. data/test/test_plugin_helper.rb +18 -24
  65. data/test/unit/openscap_host_test.rb +11 -1
  66. data/test/unit/policy_test.rb +26 -0
  67. data/test/unit/services/tailoring_files_proxy_check_test.rb +27 -0
  68. data/test/unit/tailoring_file_test.rb +26 -0
  69. metadata +59 -20
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_openscap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Šimon Lukašík"
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-10-19 00:00:00.000000000 Z
14
+ date: 2017-02-21 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: deface
@@ -38,6 +38,7 @@ files:
38
38
  - README.md
39
39
  - app/assets/javascripts/foreman_openscap/arf_reports.js
40
40
  - app/assets/javascripts/foreman_openscap/load_report.js
41
+ - app/assets/javascripts/foreman_openscap/openscap_proxy.js
41
42
  - app/assets/javascripts/foreman_openscap/period_selector.js
42
43
  - app/assets/javascripts/foreman_openscap/policy_edit.js
43
44
  - app/assets/javascripts/foreman_openscap/reports.js
@@ -47,17 +48,21 @@ files:
47
48
  - app/controllers/api/v2/compliance/arf_reports_controller.rb
48
49
  - app/controllers/api/v2/compliance/policies_controller.rb
49
50
  - app/controllers/api/v2/compliance/scap_contents_controller.rb
51
+ - app/controllers/api/v2/compliance/tailoring_files_controller.rb
50
52
  - app/controllers/arf_reports_controller.rb
51
53
  - app/controllers/compliance_dashboard_controller.rb
52
54
  - app/controllers/compliance_hosts_controller.rb
53
55
  - app/controllers/concerns/foreman/controller/parameters/policy.rb
54
56
  - app/controllers/concerns/foreman/controller/parameters/policy_api.rb
55
57
  - app/controllers/concerns/foreman/controller/parameters/scap_content.rb
58
+ - app/controllers/concerns/foreman/controller/parameters/tailoring_file.rb
56
59
  - app/controllers/concerns/foreman_openscap/hostgroups_controller_extensions.rb
57
60
  - app/controllers/concerns/foreman_openscap/hosts_controller_extensions.rb
61
+ - app/controllers/openscap_proxies_controller.rb
58
62
  - app/controllers/policies_controller.rb
59
63
  - app/controllers/policy_dashboard_controller.rb
60
64
  - app/controllers/scap_contents_controller.rb
65
+ - app/controllers/tailoring_files_controller.rb
61
66
  - app/helpers/arf_report_dashboard_helper.rb
62
67
  - app/helpers/arf_reports_helper.rb
63
68
  - app/helpers/compliance_dashboard_helper.rb
@@ -66,11 +71,13 @@ files:
66
71
  - app/helpers/concerns/foreman_openscap/lookup_keys_helper_extensions.rb
67
72
  - app/helpers/policies_helper.rb
68
73
  - app/helpers/policy_dashboard_helper.rb
74
+ - app/helpers/tailoring_files_helper.rb
69
75
  - app/lib/proxy_api/available_proxy.rb
70
76
  - app/lib/proxy_api/migration.rb
71
77
  - app/lib/proxy_api/openscap.rb
72
78
  - app/mailers/foreman_openscap/policy_mailer.rb
73
79
  - app/models/concerns/foreman_openscap/compliance_status_scoped_search.rb
80
+ - app/models/concerns/foreman_openscap/data_stream_content.rb
74
81
  - app/models/concerns/foreman_openscap/host_extensions.rb
75
82
  - app/models/concerns/foreman_openscap/hostgroup_extensions.rb
76
83
  - app/models/concerns/foreman_openscap/log_extensions.rb
@@ -86,13 +93,16 @@ files:
86
93
  - app/models/foreman_openscap/policy_revision.rb
87
94
  - app/models/foreman_openscap/scap_content.rb
88
95
  - app/models/foreman_openscap/scap_content_profile.rb
96
+ - app/models/foreman_openscap/tailoring_file.rb
89
97
  - app/overrides/hostgroups/form/select_openscap_proxy.rb
90
98
  - app/overrides/hosts/form/select_openscap_proxy.rb
91
99
  - app/overrides/hosts/overview/host_compliance_status.rb
92
100
  - app/services/foreman_openscap/arf_report_status_calculator.rb
93
101
  - app/services/foreman_openscap/host_report_dashboard/data.rb
102
+ - app/services/foreman_openscap/openscap_proxy_version_check.rb
94
103
  - app/services/foreman_openscap/policy_dashboard/data.rb
95
104
  - app/services/foreman_openscap/report_dashboard/data.rb
105
+ - app/validators/foreman_openscap/data_stream_validator.rb
96
106
  - app/views/api/v2/compliance/arf_reports/base.json.rabl
97
107
  - app/views/api/v2/compliance/arf_reports/index.json.rabl
98
108
  - app/views/api/v2/compliance/arf_reports/main.json.rabl
@@ -108,6 +118,10 @@ files:
108
118
  - app/views/api/v2/compliance/scap_contents/index.json.rabl
109
119
  - app/views/api/v2/compliance/scap_contents/main.json.rabl
110
120
  - app/views/api/v2/compliance/scap_contents/show.json.rabl
121
+ - app/views/api/v2/compliance/tailoring_files/base.json.rabl
122
+ - app/views/api/v2/compliance/tailoring_files/index.json.rabl
123
+ - app/views/api/v2/compliance/tailoring_files/main.json.rabl
124
+ - app/views/api/v2/compliance/tailoring_files/show.json.rabl
111
125
  - app/views/arf_reports/_detailed_message.html.erb
112
126
  - app/views/arf_reports/_list.html.erb
113
127
  - app/views/arf_reports/_metrics.html.erb
@@ -129,6 +143,7 @@ files:
129
143
  - app/views/policies/_form.html.erb
130
144
  - app/views/policies/_list.html.erb
131
145
  - app/views/policies/_scap_content_results.html.erb
146
+ - app/views/policies/_tailoring_file_selected.html.erb
132
147
  - app/views/policies/create.html.erb
133
148
  - app/views/policies/disassociate_multiple_hosts.html.erb
134
149
  - app/views/policies/edit.html.erb
@@ -154,6 +169,14 @@ files:
154
169
  - app/views/scap_contents/index.html.erb
155
170
  - app/views/scap_contents/new.html.erb
156
171
  - app/views/scap_contents/welcome.html.erb
172
+ - app/views/smart_proxies/_openscap_spool.html.erb
173
+ - app/views/smart_proxies/plugins/_openscap.html.erb
174
+ - app/views/tailoring_files/_form.html.erb
175
+ - app/views/tailoring_files/_list.html.erb
176
+ - app/views/tailoring_files/edit.html.erb
177
+ - app/views/tailoring_files/index.html.erb
178
+ - app/views/tailoring_files/new.html.erb
179
+ - app/views/tailoring_files/welcome.html.erb
157
180
  - config/routes.rb
158
181
  - db/migrate/20141013172051_create_scaptimony_policies.rb
159
182
  - db/migrate/20141014105333_create_scaptimony_assets.rb
@@ -192,6 +215,8 @@ files:
192
215
  - db/migrate/20151120090851_add_openscap_proxy_to_host_and_hostgroup.rb
193
216
  - db/migrate/20160830113437_remove_deleted_policy.rb
194
217
  - db/migrate/20160925213031_change_scap_widget_names.rb
218
+ - db/migrate/20161109155255_create_tailoring_files.rb
219
+ - db/migrate/20161223153249_add_permissions_to_arf_report.rb
195
220
  - db/seeds.d/openscap_feature.rb
196
221
  - db/seeds.d/openscap_policy_notification.rb
197
222
  - lib/foreman_openscap.rb
@@ -239,10 +264,15 @@ files:
239
264
  - test/factories/scap_content_related.rb
240
265
  - test/files/arf_report/arf_report.bz2
241
266
  - test/files/scap_contents/ssg-fedora-ds.xml
267
+ - test/files/tailoring_files/ssg-firefox-ds-tailoring-2.xml
268
+ - test/files/tailoring_files/ssg-firefox-ds-tailoring.xml
242
269
  - test/functional/api/v2/compliance/arf_reports_controller_test.rb
243
270
  - test/functional/api/v2/compliance/policies_controller_test.rb
244
271
  - test/functional/api/v2/compliance/scap_contents_controller_test.rb
272
+ - test/functional/api/v2/compliance/tailoring_files_controller_test.rb
245
273
  - test/functional/arf_reports_controller_test.rb
274
+ - test/functional/openscap_proxies_controller_test.rb
275
+ - test/functional/tailoring_files_controller_test.rb
246
276
  - test/lib/foreman_openscap/bulk_upload_test.rb
247
277
  - test/test_plugin_helper.rb
248
278
  - test/unit/arf_report_status_calculator_test.rb
@@ -254,6 +284,8 @@ files:
254
284
  - test/unit/policy_test.rb
255
285
  - test/unit/scap_content_test.rb
256
286
  - test/unit/services/report_dashboard/data_test.rb
287
+ - test/unit/services/tailoring_files_proxy_check_test.rb
288
+ - test/unit/tailoring_file_test.rb
257
289
  homepage: https://github.com/OpenSCAP/foreman_openscap
258
290
  licenses:
259
291
  - GPL-3.0
@@ -274,32 +306,39 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
306
  version: '0'
275
307
  requirements: []
276
308
  rubyforge_project:
277
- rubygems_version: 2.4.6
309
+ rubygems_version: 2.4.5
278
310
  signing_key:
279
311
  specification_version: 4
280
312
  summary: Foreman plug-in for displaying OpenSCAP audit reports
281
313
  test_files:
282
- - test/functional/api/v2/compliance/policies_controller_test.rb
283
- - test/functional/api/v2/compliance/scap_contents_controller_test.rb
284
- - test/functional/api/v2/compliance/arf_reports_controller_test.rb
314
+ - test/lib/foreman_openscap/bulk_upload_test.rb
315
+ - test/unit/scap_content_test.rb
316
+ - test/unit/concerns/openscap_proxy_extenstions_test.rb
317
+ - test/unit/openscap_host_test.rb
318
+ - test/unit/tailoring_file_test.rb
319
+ - test/unit/policy_test.rb
320
+ - test/unit/compliance_status_test.rb
321
+ - test/unit/arf_report_status_calculator_test.rb
322
+ - test/unit/policy_mailer_test.rb
323
+ - test/unit/services/tailoring_files_proxy_check_test.rb
324
+ - test/unit/services/report_dashboard/data_test.rb
325
+ - test/unit/arf_report_test.rb
326
+ - test/test_plugin_helper.rb
285
327
  - test/functional/arf_reports_controller_test.rb
328
+ - test/functional/api/v2/compliance/arf_reports_controller_test.rb
329
+ - test/functional/api/v2/compliance/scap_contents_controller_test.rb
330
+ - test/functional/api/v2/compliance/policies_controller_test.rb
331
+ - test/functional/api/v2/compliance/tailoring_files_controller_test.rb
332
+ - test/functional/openscap_proxies_controller_test.rb
333
+ - test/functional/tailoring_files_controller_test.rb
286
334
  - test/factories/asset_factory.rb
287
- - test/factories/compliance_host_factory.rb
288
- - test/factories/scap_content_related.rb
289
335
  - test/factories/compliance_log_factory.rb
290
336
  - test/factories/arf_report_factory.rb
337
+ - test/factories/scap_content_related.rb
338
+ - test/factories/compliance_host_factory.rb
291
339
  - test/factories/policy_arf_report_factory.rb
292
340
  - test/factories/policy_factory.rb
293
- - test/files/arf_report/arf_report.bz2
294
341
  - test/files/scap_contents/ssg-fedora-ds.xml
295
- - test/lib/foreman_openscap/bulk_upload_test.rb
296
- - test/test_plugin_helper.rb
297
- - test/unit/arf_report_status_calculator_test.rb
298
- - test/unit/compliance_status_test.rb
299
- - test/unit/arf_report_test.rb
300
- - test/unit/policy_mailer_test.rb
301
- - test/unit/openscap_host_test.rb
302
- - test/unit/scap_content_test.rb
303
- - test/unit/concerns/openscap_proxy_extenstions_test.rb
304
- - test/unit/services/report_dashboard/data_test.rb
305
- - test/unit/policy_test.rb
342
+ - test/files/tailoring_files/ssg-firefox-ds-tailoring-2.xml
343
+ - test/files/tailoring_files/ssg-firefox-ds-tailoring.xml
344
+ - test/files/arf_report/arf_report.bz2