foreman_openscap 8.0.1 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/app/lib/proxy_api/openscap.rb +11 -0
- data/app/models/concerns/foreman_openscap/data_stream_content.rb +1 -5
- data/app/services/foreman_openscap/client_config/ansible.rb +1 -10
- data/app/validators/foreman_openscap/data_stream_validator.rb +1 -1
- data/config/initializers/inflections.rb +0 -2
- data/config/routes.rb +0 -15
- data/db/migrate/20240313111822_drop_oval.rb +17 -0
- data/lib/foreman_openscap/data_migration.rb +7 -6
- data/lib/foreman_openscap/engine.rb +2 -56
- data/lib/foreman_openscap/version.rb +1 -1
- data/test/factories/compliance_host_factory.rb +0 -12
- data/test/test_plugin_helper.rb +0 -2
- data/test/unit/scap_content_test.rb +2 -3
- data/webpack/components/OpenscapRemediationWizard/ViewSelectedHostsLink.js +2 -2
- data/webpack/components/OpenscapRemediationWizard/steps/ReviewHosts.js +12 -2
- data/webpack/components/OpenscapRemediationWizard/steps/ReviewRemediation.js +7 -4
- data/webpack/global_index.js +0 -4
- metadata +7 -169
- data/app/controllers/api/v2/compliance/oval_contents_controller.rb +0 -72
- data/app/controllers/api/v2/compliance/oval_policies_controller.rb +0 -111
- data/app/controllers/api/v2/compliance/oval_reports_controller.rb +0 -47
- data/app/controllers/concerns/foreman/controller/parameters/oval_content.rb +0 -22
- data/app/controllers/concerns/foreman/controller/parameters/oval_policy.rb +0 -22
- data/app/graphql/mutations/oval_contents/delete.rb +0 -9
- data/app/graphql/mutations/oval_policies/create.rb +0 -33
- data/app/graphql/mutations/oval_policies/delete.rb +0 -9
- data/app/graphql/mutations/oval_policies/update.rb +0 -15
- data/app/graphql/types/cve.rb +0 -17
- data/app/graphql/types/oval_check.rb +0 -11
- data/app/graphql/types/oval_content.rb +0 -19
- data/app/graphql/types/oval_policy.rb +0 -24
- data/app/lib/proxy_api/available_proxy.rb +0 -44
- data/app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb +0 -38
- data/app/models/concerns/foreman_openscap/oval_facet_hostgroup_extensions.rb +0 -31
- data/app/models/foreman_openscap/cve.rb +0 -23
- data/app/models/foreman_openscap/host/oval_facet.rb +0 -14
- data/app/models/foreman_openscap/host_cve.rb +0 -7
- data/app/models/foreman_openscap/hostgroup/oval_facet.rb +0 -14
- data/app/models/foreman_openscap/hostgroup_oval_facet_oval_policy.rb +0 -6
- data/app/models/foreman_openscap/oval_content.rb +0 -28
- data/app/models/foreman_openscap/oval_facet_oval_policy.rb +0 -6
- data/app/models/foreman_openscap/oval_policy.rb +0 -54
- data/app/models/foreman_openscap/oval_status.rb +0 -45
- data/app/services/foreman_openscap/oval/check_collection.rb +0 -45
- data/app/services/foreman_openscap/oval/configure.rb +0 -83
- data/app/services/foreman_openscap/oval/cves.rb +0 -41
- data/app/services/foreman_openscap/oval/setup.rb +0 -93
- data/app/services/foreman_openscap/oval/setup_check.rb +0 -58
- data/app/services/foreman_openscap/oval/sync_oval_contents.rb +0 -42
- data/app/views/api/v2/compliance/oval_contents/base.json.rabl +0 -6
- data/app/views/api/v2/compliance/oval_contents/create.json.rabl +0 -3
- data/app/views/api/v2/compliance/oval_contents/destroy.json.rabl +0 -3
- data/app/views/api/v2/compliance/oval_contents/index.json.rabl +0 -3
- data/app/views/api/v2/compliance/oval_contents/show.json.rabl +0 -3
- data/app/views/api/v2/compliance/oval_contents/sync.json.rabl +0 -3
- data/app/views/api/v2/compliance/oval_contents/sync_result.json.rabl +0 -11
- data/app/views/api/v2/compliance/oval_contents/update.json.rabl +0 -3
- data/app/views/api/v2/compliance/oval_policies/create.json.rabl +0 -3
- data/app/views/api/v2/compliance/oval_policies/index.json.rabl +0 -3
- data/app/views/api/v2/compliance/oval_policies/main.json.rabl +0 -15
- data/app/views/api/v2/compliance/oval_policies/show.json.rabl +0 -3
- data/app/views/job_templates/run_oval_scans.erb +0 -24
- data/locale/cs_CZ/foreman_openscap.edit.po +0 -1863
- data/locale/cs_CZ/foreman_openscap.po.time_stamp +0 -0
- data/locale/de/foreman_openscap.edit.po +0 -1873
- data/locale/de/foreman_openscap.po.time_stamp +0 -0
- data/locale/en/foreman_openscap.edit.po +0 -1863
- data/locale/en/foreman_openscap.po.time_stamp +0 -0
- data/locale/en_GB/foreman_openscap.edit.po +0 -1863
- data/locale/en_GB/foreman_openscap.po.time_stamp +0 -0
- data/locale/es/foreman_openscap.edit.po +0 -1868
- data/locale/es/foreman_openscap.po.time_stamp +0 -0
- data/locale/fr/foreman_openscap.edit.po +0 -1874
- data/locale/fr/foreman_openscap.po.time_stamp +0 -0
- data/locale/gl/foreman_openscap.edit.po +0 -1863
- data/locale/gl/foreman_openscap.po.time_stamp +0 -0
- data/locale/it/foreman_openscap.edit.po +0 -1865
- data/locale/it/foreman_openscap.po.time_stamp +0 -0
- data/locale/ja/foreman_openscap.edit.po +0 -1869
- data/locale/ja/foreman_openscap.po.time_stamp +0 -0
- data/locale/ka/foreman_openscap.edit.po +0 -1863
- data/locale/ka/foreman_openscap.po.time_stamp +0 -0
- data/locale/ko/foreman_openscap.edit.po +0 -1863
- data/locale/ko/foreman_openscap.po.time_stamp +0 -0
- data/locale/pt_BR/foreman_openscap.edit.po +0 -1873
- data/locale/pt_BR/foreman_openscap.po.time_stamp +0 -0
- data/locale/ru/foreman_openscap.edit.po +0 -1867
- data/locale/ru/foreman_openscap.po.time_stamp +0 -0
- data/locale/sv_SE/foreman_openscap.edit.po +0 -1863
- data/locale/sv_SE/foreman_openscap.po.time_stamp +0 -0
- data/locale/zh_CN/foreman_openscap.edit.po +0 -1868
- data/locale/zh_CN/foreman_openscap.po.time_stamp +0 -0
- data/locale/zh_TW/foreman_openscap.edit.po +0 -1864
- data/locale/zh_TW/foreman_openscap.po.time_stamp +0 -0
- data/test/factories/oval_content_factory.rb +0 -7
- data/test/factories/oval_policy_factory.rb +0 -9
- data/test/fixtures/cve_fixtures.rb +0 -104
- data/test/functional/api/v2/compliance/oval_contents_controller_test.rb +0 -39
- data/test/functional/api/v2/compliance/oval_policies_controller_test.rb +0 -141
- data/test/functional/api/v2/compliance/oval_reports_controller_test.rb +0 -32
- data/test/graphql/mutations/oval_policies/delete_mutation_test.rb +0 -63
- data/test/graphql/queries/oval_content_query_test.rb +0 -29
- data/test/graphql/queries/oval_contents_query_test.rb +0 -35
- data/test/graphql/queries/oval_policies_query_test.rb +0 -35
- data/test/unit/oval_host_test.rb +0 -45
- data/test/unit/oval_policy_test.rb +0 -133
- data/test/unit/oval_status_test.rb +0 -47
- data/test/unit/services/oval/cves_test.rb +0 -81
- data/test/unit/services/oval/setup_check_test.rb +0 -37
- data/test/unit/services/oval/setup_test.rb +0 -87
- data/webpack/graphql/mutations/createOvalPolicy.gql +0 -22
- data/webpack/graphql/mutations/deleteOvalContent.gql +0 -9
- data/webpack/graphql/mutations/deleteOvalPolicy.gql +0 -9
- data/webpack/graphql/mutations/updateOvalPolicy.gql +0 -14
- data/webpack/graphql/queries/currentUserAttributes.gql +0 -11
- data/webpack/graphql/queries/cves.gql +0 -23
- data/webpack/graphql/queries/hostgroups.gql +0 -14
- data/webpack/graphql/queries/ovalContent.gql +0 -8
- data/webpack/graphql/queries/ovalContents.gql +0 -19
- data/webpack/graphql/queries/ovalPolicies.gql +0 -20
- data/webpack/graphql/queries/ovalPolicy.gql +0 -29
- data/webpack/helpers/pathsHelper.js +0 -29
- data/webpack/routes/OvalContents/OvalContentsIndex/OvalContentsIndex.js +0 -71
- data/webpack/routes/OvalContents/OvalContentsIndex/OvalContentsTable.js +0 -83
- data/webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsDestroy.fixtures.js +0 -105
- data/webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsDestroy.test.js +0 -124
- data/webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsIndex.fixtures.js +0 -127
- data/webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsIndex.test.js +0 -89
- data/webpack/routes/OvalContents/OvalContentsIndex/index.js +0 -13
- data/webpack/routes/OvalContents/OvalContentsNew/OvalContentsNew.js +0 -138
- data/webpack/routes/OvalContents/OvalContentsNew/OvalContentsNew.scss +0 -3
- data/webpack/routes/OvalContents/OvalContentsNew/OvalContentsNewHelper.js +0 -73
- data/webpack/routes/OvalContents/OvalContentsNew/__tests__/OvalContentsNew.test.js +0 -104
- data/webpack/routes/OvalContents/OvalContentsNew/index.js +0 -13
- data/webpack/routes/OvalContents/OvalContentsShow/OvalContentsShow.js +0 -62
- data/webpack/routes/OvalContents/OvalContentsShow/OvalContentsShow.test.js +0 -45
- data/webpack/routes/OvalContents/OvalContentsShow/OvalContentsShowHelper.js +0 -0
- data/webpack/routes/OvalContents/OvalContentsShow/index.js +0 -35
- data/webpack/routes/OvalPolicies/OvalPoliciesIndex/OvalPoliciesIndex.js +0 -62
- data/webpack/routes/OvalPolicies/OvalPoliciesIndex/OvalPoliciesTable.js +0 -74
- data/webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesDestroy.fixtures.js +0 -101
- data/webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesDestroy.test.js +0 -117
- data/webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesIndex.fixtures.js +0 -111
- data/webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesIndex.test.js +0 -81
- data/webpack/routes/OvalPolicies/OvalPoliciesIndex/index.js +0 -13
- data/webpack/routes/OvalPolicies/OvalPoliciesNew/HostgroupSelect.js +0 -135
- data/webpack/routes/OvalPolicies/OvalPoliciesNew/NewOvalPolicyForm.js +0 -119
- data/webpack/routes/OvalPolicies/OvalPoliciesNew/NewOvalPolicyFormHelpers.js +0 -107
- data/webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js +0 -32
- data/webpack/routes/OvalPolicies/OvalPoliciesNew/__tests__/OvalPoliciesNew.fixtures.js +0 -147
- data/webpack/routes/OvalPolicies/OvalPoliciesNew/__tests__/OvalPoliciesNew.test.js +0 -172
- data/webpack/routes/OvalPolicies/OvalPoliciesNew/index.js +0 -11
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/CvesTab.js +0 -49
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/CvesTable.js +0 -63
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/DetailsTab.js +0 -87
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/HostgroupsTab.js +0 -49
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/HostgroupsTable.js +0 -38
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/OvalPoliciesShow.js +0 -82
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/OvalPoliciesShowHelper.js +0 -117
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesEdit.fixtures.js +0 -48
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesEdit.test.js +0 -202
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesShow.fixtures.js +0 -124
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesShow.test.js +0 -172
- data/webpack/routes/OvalPolicies/OvalPoliciesShow/index.js +0 -39
- data/webpack/routes/routes.js +0 -49
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_openscap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 9.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- slukasik@redhat.com
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -61,9 +61,6 @@ files:
|
|
61
61
|
- app/assets/stylesheets/foreman_openscap/reports.css
|
62
62
|
- app/assets/stylesheets/foreman_openscap/scap_breakdown_chart.css
|
63
63
|
- app/controllers/api/v2/compliance/arf_reports_controller.rb
|
64
|
-
- app/controllers/api/v2/compliance/oval_contents_controller.rb
|
65
|
-
- app/controllers/api/v2/compliance/oval_policies_controller.rb
|
66
|
-
- app/controllers/api/v2/compliance/oval_reports_controller.rb
|
67
64
|
- app/controllers/api/v2/compliance/policies_controller.rb
|
68
65
|
- app/controllers/api/v2/compliance/scap_content_profiles_controller.rb
|
69
66
|
- app/controllers/api/v2/compliance/scap_contents_controller.rb
|
@@ -71,8 +68,6 @@ files:
|
|
71
68
|
- app/controllers/arf_reports_controller.rb
|
72
69
|
- app/controllers/compliance_dashboard_controller.rb
|
73
70
|
- app/controllers/compliance_hosts_controller.rb
|
74
|
-
- app/controllers/concerns/foreman/controller/parameters/oval_content.rb
|
75
|
-
- app/controllers/concerns/foreman/controller/parameters/oval_policy.rb
|
76
71
|
- app/controllers/concerns/foreman/controller/parameters/policy.rb
|
77
72
|
- app/controllers/concerns/foreman/controller/parameters/policy_api.rb
|
78
73
|
- app/controllers/concerns/foreman/controller/parameters/scap_content.rb
|
@@ -88,14 +83,6 @@ files:
|
|
88
83
|
- app/controllers/policy_dashboard_controller.rb
|
89
84
|
- app/controllers/scap_contents_controller.rb
|
90
85
|
- app/controllers/tailoring_files_controller.rb
|
91
|
-
- app/graphql/mutations/oval_contents/delete.rb
|
92
|
-
- app/graphql/mutations/oval_policies/create.rb
|
93
|
-
- app/graphql/mutations/oval_policies/delete.rb
|
94
|
-
- app/graphql/mutations/oval_policies/update.rb
|
95
|
-
- app/graphql/types/cve.rb
|
96
|
-
- app/graphql/types/oval_check.rb
|
97
|
-
- app/graphql/types/oval_content.rb
|
98
|
-
- app/graphql/types/oval_policy.rb
|
99
86
|
- app/helpers/arf_report_dashboard_helper.rb
|
100
87
|
- app/helpers/arf_reports_helper.rb
|
101
88
|
- app/helpers/compliance_dashboard_helper.rb
|
@@ -105,7 +92,6 @@ files:
|
|
105
92
|
- app/helpers/policies_helper.rb
|
106
93
|
- app/helpers/policy_dashboard_helper.rb
|
107
94
|
- app/helpers/tailoring_files_helper.rb
|
108
|
-
- app/lib/proxy_api/available_proxy.rb
|
109
95
|
- app/lib/proxy_api/migration.rb
|
110
96
|
- app/lib/proxy_api/openscap.rb
|
111
97
|
- app/mailers/foreman_openscap/policy_mailer.rb
|
@@ -117,8 +103,6 @@ files:
|
|
117
103
|
- app/models/concerns/foreman_openscap/log_extensions.rb
|
118
104
|
- app/models/concerns/foreman_openscap/openscap_proxy_core_extensions.rb
|
119
105
|
- app/models/concerns/foreman_openscap/openscap_proxy_extensions.rb
|
120
|
-
- app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb
|
121
|
-
- app/models/concerns/foreman_openscap/oval_facet_hostgroup_extensions.rb
|
122
106
|
- app/models/concerns/foreman_openscap/policy_common.rb
|
123
107
|
- app/models/concerns/foreman_openscap/scap_file_content.rb
|
124
108
|
- app/models/concerns/foreman_openscap/smart_proxy_extensions.rb
|
@@ -126,15 +110,6 @@ files:
|
|
126
110
|
- app/models/foreman_openscap/asset.rb
|
127
111
|
- app/models/foreman_openscap/asset_policy.rb
|
128
112
|
- app/models/foreman_openscap/compliance_status.rb
|
129
|
-
- app/models/foreman_openscap/cve.rb
|
130
|
-
- app/models/foreman_openscap/host/oval_facet.rb
|
131
|
-
- app/models/foreman_openscap/host_cve.rb
|
132
|
-
- app/models/foreman_openscap/hostgroup/oval_facet.rb
|
133
|
-
- app/models/foreman_openscap/hostgroup_oval_facet_oval_policy.rb
|
134
|
-
- app/models/foreman_openscap/oval_content.rb
|
135
|
-
- app/models/foreman_openscap/oval_facet_oval_policy.rb
|
136
|
-
- app/models/foreman_openscap/oval_policy.rb
|
137
|
-
- app/models/foreman_openscap/oval_status.rb
|
138
113
|
- app/models/foreman_openscap/policy.rb
|
139
114
|
- app/models/foreman_openscap/policy_arf_report.rb
|
140
115
|
- app/models/foreman_openscap/policy_revision.rb
|
@@ -154,12 +129,6 @@ files:
|
|
154
129
|
- app/services/foreman_openscap/lookup_key_overrides_common.rb
|
155
130
|
- app/services/foreman_openscap/openscap_proxy_assigned_version_check.rb
|
156
131
|
- app/services/foreman_openscap/openscap_proxy_version_check.rb
|
157
|
-
- app/services/foreman_openscap/oval/check_collection.rb
|
158
|
-
- app/services/foreman_openscap/oval/configure.rb
|
159
|
-
- app/services/foreman_openscap/oval/cves.rb
|
160
|
-
- app/services/foreman_openscap/oval/setup.rb
|
161
|
-
- app/services/foreman_openscap/oval/setup_check.rb
|
162
|
-
- app/services/foreman_openscap/oval/sync_oval_contents.rb
|
163
132
|
- app/services/foreman_openscap/policy_dashboard/data.rb
|
164
133
|
- app/services/foreman_openscap/report_dashboard/data.rb
|
165
134
|
- app/services/proxy_status/openscap_spool.rb
|
@@ -171,18 +140,6 @@ files:
|
|
171
140
|
- app/views/api/v2/compliance/arf_reports/show.json.rabl
|
172
141
|
- app/views/api/v2/compliance/common/_loc.json.rabl
|
173
142
|
- app/views/api/v2/compliance/common/_org.json.rabl
|
174
|
-
- app/views/api/v2/compliance/oval_contents/base.json.rabl
|
175
|
-
- app/views/api/v2/compliance/oval_contents/create.json.rabl
|
176
|
-
- app/views/api/v2/compliance/oval_contents/destroy.json.rabl
|
177
|
-
- app/views/api/v2/compliance/oval_contents/index.json.rabl
|
178
|
-
- app/views/api/v2/compliance/oval_contents/show.json.rabl
|
179
|
-
- app/views/api/v2/compliance/oval_contents/sync.json.rabl
|
180
|
-
- app/views/api/v2/compliance/oval_contents/sync_result.json.rabl
|
181
|
-
- app/views/api/v2/compliance/oval_contents/update.json.rabl
|
182
|
-
- app/views/api/v2/compliance/oval_policies/create.json.rabl
|
183
|
-
- app/views/api/v2/compliance/oval_policies/index.json.rabl
|
184
|
-
- app/views/api/v2/compliance/oval_policies/main.json.rabl
|
185
|
-
- app/views/api/v2/compliance/oval_policies/show.json.rabl
|
186
143
|
- app/views/api/v2/compliance/policies/base.json.rabl
|
187
144
|
- app/views/api/v2/compliance/policies/children.json.rabl
|
188
145
|
- app/views/api/v2/compliance/policies/create.json.rabl
|
@@ -227,7 +184,6 @@ files:
|
|
227
184
|
- app/views/job_templates/run_openscap_remediation_-_ansible_default.erb
|
228
185
|
- app/views/job_templates/run_openscap_remediation_-_script_default.erb
|
229
186
|
- app/views/job_templates/run_openscap_scans.erb
|
230
|
-
- app/views/job_templates/run_oval_scans.erb
|
231
187
|
- app/views/policies/_form.html.erb
|
232
188
|
- app/views/policies/_list.html.erb
|
233
189
|
- app/views/policies/_scap_content_results.html.erb
|
@@ -326,6 +282,7 @@ files:
|
|
326
282
|
- db/migrate/20210409095625_add_oval_policy_reference_to_cve.rb
|
327
283
|
- db/migrate/20210819143316_drop_unused_tables.rb
|
328
284
|
- db/migrate/20230912122310_add_fixes_to_message.rb
|
285
|
+
- db/migrate/20240313111822_drop_oval.rb
|
329
286
|
- db/migrate/20240426143215_remove_orphaned_asset_policies.rb
|
330
287
|
- db/seeds.d/75-job_templates.rb
|
331
288
|
- db/seeds.d/openscap_feature.rb
|
@@ -341,78 +298,44 @@ files:
|
|
341
298
|
- locale/Makefile
|
342
299
|
- locale/action_names.rb
|
343
300
|
- locale/cs_CZ/LC_MESSAGES/foreman_openscap.mo
|
344
|
-
- locale/cs_CZ/foreman_openscap.edit.po
|
345
301
|
- locale/cs_CZ/foreman_openscap.po
|
346
|
-
- locale/cs_CZ/foreman_openscap.po.time_stamp
|
347
302
|
- locale/de/LC_MESSAGES/foreman_openscap.mo
|
348
|
-
- locale/de/foreman_openscap.edit.po
|
349
303
|
- locale/de/foreman_openscap.po
|
350
|
-
- locale/de/foreman_openscap.po.time_stamp
|
351
304
|
- locale/en/LC_MESSAGES/foreman_openscap.mo
|
352
|
-
- locale/en/foreman_openscap.edit.po
|
353
305
|
- locale/en/foreman_openscap.po
|
354
|
-
- locale/en/foreman_openscap.po.time_stamp
|
355
306
|
- locale/en_GB/LC_MESSAGES/foreman_openscap.mo
|
356
|
-
- locale/en_GB/foreman_openscap.edit.po
|
357
307
|
- locale/en_GB/foreman_openscap.po
|
358
|
-
- locale/en_GB/foreman_openscap.po.time_stamp
|
359
308
|
- locale/es/LC_MESSAGES/foreman_openscap.mo
|
360
|
-
- locale/es/foreman_openscap.edit.po
|
361
309
|
- locale/es/foreman_openscap.po
|
362
|
-
- locale/es/foreman_openscap.po.time_stamp
|
363
310
|
- locale/foreman_openscap.pot
|
364
311
|
- locale/fr/LC_MESSAGES/foreman_openscap.mo
|
365
|
-
- locale/fr/foreman_openscap.edit.po
|
366
312
|
- locale/fr/foreman_openscap.po
|
367
|
-
- locale/fr/foreman_openscap.po.time_stamp
|
368
313
|
- locale/gl/LC_MESSAGES/foreman_openscap.mo
|
369
|
-
- locale/gl/foreman_openscap.edit.po
|
370
314
|
- locale/gl/foreman_openscap.po
|
371
|
-
- locale/gl/foreman_openscap.po.time_stamp
|
372
315
|
- locale/it/LC_MESSAGES/foreman_openscap.mo
|
373
|
-
- locale/it/foreman_openscap.edit.po
|
374
316
|
- locale/it/foreman_openscap.po
|
375
|
-
- locale/it/foreman_openscap.po.time_stamp
|
376
317
|
- locale/ja/LC_MESSAGES/foreman_openscap.mo
|
377
|
-
- locale/ja/foreman_openscap.edit.po
|
378
318
|
- locale/ja/foreman_openscap.po
|
379
|
-
- locale/ja/foreman_openscap.po.time_stamp
|
380
319
|
- locale/ka/LC_MESSAGES/foreman_openscap.mo
|
381
|
-
- locale/ka/foreman_openscap.edit.po
|
382
320
|
- locale/ka/foreman_openscap.po
|
383
|
-
- locale/ka/foreman_openscap.po.time_stamp
|
384
321
|
- locale/ko/LC_MESSAGES/foreman_openscap.mo
|
385
|
-
- locale/ko/foreman_openscap.edit.po
|
386
322
|
- locale/ko/foreman_openscap.po
|
387
|
-
- locale/ko/foreman_openscap.po.time_stamp
|
388
323
|
- locale/pt_BR/LC_MESSAGES/foreman_openscap.mo
|
389
|
-
- locale/pt_BR/foreman_openscap.edit.po
|
390
324
|
- locale/pt_BR/foreman_openscap.po
|
391
|
-
- locale/pt_BR/foreman_openscap.po.time_stamp
|
392
325
|
- locale/ru/LC_MESSAGES/foreman_openscap.mo
|
393
|
-
- locale/ru/foreman_openscap.edit.po
|
394
326
|
- locale/ru/foreman_openscap.po
|
395
|
-
- locale/ru/foreman_openscap.po.time_stamp
|
396
327
|
- locale/sv_SE/LC_MESSAGES/foreman_openscap.mo
|
397
|
-
- locale/sv_SE/foreman_openscap.edit.po
|
398
328
|
- locale/sv_SE/foreman_openscap.po
|
399
|
-
- locale/sv_SE/foreman_openscap.po.time_stamp
|
400
329
|
- locale/zanata.xml
|
401
330
|
- locale/zh_CN/LC_MESSAGES/foreman_openscap.mo
|
402
|
-
- locale/zh_CN/foreman_openscap.edit.po
|
403
331
|
- locale/zh_CN/foreman_openscap.po
|
404
|
-
- locale/zh_CN/foreman_openscap.po.time_stamp
|
405
332
|
- locale/zh_TW/LC_MESSAGES/foreman_openscap.mo
|
406
|
-
- locale/zh_TW/foreman_openscap.edit.po
|
407
333
|
- locale/zh_TW/foreman_openscap.po
|
408
|
-
- locale/zh_TW/foreman_openscap.po.time_stamp
|
409
334
|
- package.json
|
410
335
|
- test/factories/arf_report_factory.rb
|
411
336
|
- test/factories/asset_factory.rb
|
412
337
|
- test/factories/compliance_host_factory.rb
|
413
338
|
- test/factories/compliance_log_factory.rb
|
414
|
-
- test/factories/oval_content_factory.rb
|
415
|
-
- test/factories/oval_policy_factory.rb
|
416
339
|
- test/factories/policy_arf_report_factory.rb
|
417
340
|
- test/factories/policy_factory.rb
|
418
341
|
- test/factories/scap_content_related.rb
|
@@ -425,11 +348,7 @@ files:
|
|
425
348
|
- test/files/scap_contents/ssg-fedora-ds.xml
|
426
349
|
- test/files/tailoring_files/ssg-firefox-ds-tailoring-2.xml
|
427
350
|
- test/files/tailoring_files/ssg-firefox-ds-tailoring.xml
|
428
|
-
- test/fixtures/cve_fixtures.rb
|
429
351
|
- test/functional/api/v2/compliance/arf_reports_controller_test.rb
|
430
|
-
- test/functional/api/v2/compliance/oval_contents_controller_test.rb
|
431
|
-
- test/functional/api/v2/compliance/oval_policies_controller_test.rb
|
432
|
-
- test/functional/api/v2/compliance/oval_reports_controller_test.rb
|
433
352
|
- test/functional/api/v2/compliance/policies_controller_test.rb
|
434
353
|
- test/functional/api/v2/compliance/scap_content_profiles_controller_test.rb
|
435
354
|
- test/functional/api/v2/compliance/scap_contents_controller_test.rb
|
@@ -438,10 +357,6 @@ files:
|
|
438
357
|
- test/functional/arf_reports_controller_test.rb
|
439
358
|
- test/functional/openscap_proxies_controller_test.rb
|
440
359
|
- test/functional/tailoring_files_controller_test.rb
|
441
|
-
- test/graphql/mutations/oval_policies/delete_mutation_test.rb
|
442
|
-
- test/graphql/queries/oval_content_query_test.rb
|
443
|
-
- test/graphql/queries/oval_contents_query_test.rb
|
444
|
-
- test/graphql/queries/oval_policies_query_test.rb
|
445
360
|
- test/helpers/arf_report_dashboard_helper_test.rb
|
446
361
|
- test/helpers/policy_dashboard_helper_test.rb
|
447
362
|
- test/lib/foreman_openscap/bulk_upload_test.rb
|
@@ -454,18 +369,12 @@ files:
|
|
454
369
|
- test/unit/concerns/openscap_proxy_extenstions_test.rb
|
455
370
|
- test/unit/message_cleaner_test.rb
|
456
371
|
- test/unit/openscap_host_test.rb
|
457
|
-
- test/unit/oval_host_test.rb
|
458
|
-
- test/unit/oval_policy_test.rb
|
459
|
-
- test/unit/oval_status_test.rb
|
460
372
|
- test/unit/policy_mailer_test.rb
|
461
373
|
- test/unit/policy_test.rb
|
462
374
|
- test/unit/scap_content_test.rb
|
463
375
|
- test/unit/services/config_name_service_test.rb
|
464
376
|
- test/unit/services/hostgroup_overrider_test.rb
|
465
377
|
- test/unit/services/lookup_key_overrider_test.rb
|
466
|
-
- test/unit/services/oval/cves_test.rb
|
467
|
-
- test/unit/services/oval/setup_check_test.rb
|
468
|
-
- test/unit/services/oval/setup_test.rb
|
469
378
|
- test/unit/services/report_dashboard/data_test.rb
|
470
379
|
- test/unit/services/tailoring_files_proxy_check_test.rb
|
471
380
|
- test/unit/tailoring_file_test.rb
|
@@ -505,76 +414,21 @@ files:
|
|
505
414
|
- webpack/components/withDeleteModal.js
|
506
415
|
- webpack/components/withLoading.js
|
507
416
|
- webpack/global_index.js
|
508
|
-
- webpack/graphql/mutations/createOvalPolicy.gql
|
509
|
-
- webpack/graphql/mutations/deleteOvalContent.gql
|
510
|
-
- webpack/graphql/mutations/deleteOvalPolicy.gql
|
511
|
-
- webpack/graphql/mutations/updateOvalPolicy.gql
|
512
|
-
- webpack/graphql/queries/currentUserAttributes.gql
|
513
|
-
- webpack/graphql/queries/cves.gql
|
514
|
-
- webpack/graphql/queries/hostgroups.gql
|
515
|
-
- webpack/graphql/queries/ovalContent.gql
|
516
|
-
- webpack/graphql/queries/ovalContents.gql
|
517
|
-
- webpack/graphql/queries/ovalPolicies.gql
|
518
|
-
- webpack/graphql/queries/ovalPolicy.gql
|
519
417
|
- webpack/helpers/commonHelper.js
|
520
418
|
- webpack/helpers/formFieldsHelper.js
|
521
419
|
- webpack/helpers/globalIdHelper.js
|
522
420
|
- webpack/helpers/mutationHelper.js
|
523
421
|
- webpack/helpers/pageParamsHelper.js
|
524
|
-
- webpack/helpers/pathsHelper.js
|
525
422
|
- webpack/helpers/permissionsHelper.js
|
526
423
|
- webpack/helpers/tableHelper.js
|
527
424
|
- webpack/helpers/toastHelper.js
|
528
425
|
- webpack/index.js
|
529
|
-
- webpack/routes/OvalContents/OvalContentsIndex/OvalContentsIndex.js
|
530
|
-
- webpack/routes/OvalContents/OvalContentsIndex/OvalContentsTable.js
|
531
|
-
- webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsDestroy.fixtures.js
|
532
|
-
- webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsDestroy.test.js
|
533
|
-
- webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsIndex.fixtures.js
|
534
|
-
- webpack/routes/OvalContents/OvalContentsIndex/__tests__/OvalContentsIndex.test.js
|
535
|
-
- webpack/routes/OvalContents/OvalContentsIndex/index.js
|
536
|
-
- webpack/routes/OvalContents/OvalContentsNew/OvalContentsNew.js
|
537
|
-
- webpack/routes/OvalContents/OvalContentsNew/OvalContentsNew.scss
|
538
|
-
- webpack/routes/OvalContents/OvalContentsNew/OvalContentsNewHelper.js
|
539
|
-
- webpack/routes/OvalContents/OvalContentsNew/__tests__/OvalContentsNew.test.js
|
540
|
-
- webpack/routes/OvalContents/OvalContentsNew/index.js
|
541
|
-
- webpack/routes/OvalContents/OvalContentsShow/OvalContentsShow.js
|
542
|
-
- webpack/routes/OvalContents/OvalContentsShow/OvalContentsShow.test.js
|
543
|
-
- webpack/routes/OvalContents/OvalContentsShow/OvalContentsShowHelper.js
|
544
|
-
- webpack/routes/OvalContents/OvalContentsShow/index.js
|
545
|
-
- webpack/routes/OvalPolicies/OvalPoliciesIndex/OvalPoliciesIndex.js
|
546
|
-
- webpack/routes/OvalPolicies/OvalPoliciesIndex/OvalPoliciesTable.js
|
547
|
-
- webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesDestroy.fixtures.js
|
548
|
-
- webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesDestroy.test.js
|
549
|
-
- webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesIndex.fixtures.js
|
550
|
-
- webpack/routes/OvalPolicies/OvalPoliciesIndex/__tests__/OvalPoliciesIndex.test.js
|
551
|
-
- webpack/routes/OvalPolicies/OvalPoliciesIndex/index.js
|
552
|
-
- webpack/routes/OvalPolicies/OvalPoliciesNew/HostgroupSelect.js
|
553
|
-
- webpack/routes/OvalPolicies/OvalPoliciesNew/NewOvalPolicyForm.js
|
554
|
-
- webpack/routes/OvalPolicies/OvalPoliciesNew/NewOvalPolicyFormHelpers.js
|
555
|
-
- webpack/routes/OvalPolicies/OvalPoliciesNew/OvalPoliciesNew.js
|
556
|
-
- webpack/routes/OvalPolicies/OvalPoliciesNew/__tests__/OvalPoliciesNew.fixtures.js
|
557
|
-
- webpack/routes/OvalPolicies/OvalPoliciesNew/__tests__/OvalPoliciesNew.test.js
|
558
|
-
- webpack/routes/OvalPolicies/OvalPoliciesNew/index.js
|
559
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/CvesTab.js
|
560
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/CvesTable.js
|
561
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/DetailsTab.js
|
562
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/HostgroupsTab.js
|
563
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/HostgroupsTable.js
|
564
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/OvalPoliciesShow.js
|
565
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/OvalPoliciesShowHelper.js
|
566
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesEdit.fixtures.js
|
567
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesEdit.test.js
|
568
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesShow.fixtures.js
|
569
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/__tests__/OvalPoliciesShow.test.js
|
570
|
-
- webpack/routes/OvalPolicies/OvalPoliciesShow/index.js
|
571
|
-
- webpack/routes/routes.js
|
572
426
|
- webpack/testHelper.js
|
573
427
|
homepage: https://github.com/theforeman/foreman_openscap
|
574
428
|
licenses:
|
575
429
|
- GPL-3.0
|
576
430
|
metadata: {}
|
577
|
-
post_install_message:
|
431
|
+
post_install_message:
|
578
432
|
rdoc_options: []
|
579
433
|
require_paths:
|
580
434
|
- lib
|
@@ -589,8 +443,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
589
443
|
- !ruby/object:Gem::Version
|
590
444
|
version: '0'
|
591
445
|
requirements: []
|
592
|
-
rubygems_version: 3.
|
593
|
-
signing_key:
|
446
|
+
rubygems_version: 3.3.26
|
447
|
+
signing_key:
|
594
448
|
specification_version: 4
|
595
449
|
summary: Foreman plug-in for displaying OpenSCAP audit reports
|
596
450
|
test_files:
|
@@ -598,8 +452,6 @@ test_files:
|
|
598
452
|
- test/factories/asset_factory.rb
|
599
453
|
- test/factories/compliance_host_factory.rb
|
600
454
|
- test/factories/compliance_log_factory.rb
|
601
|
-
- test/factories/oval_content_factory.rb
|
602
|
-
- test/factories/oval_policy_factory.rb
|
603
455
|
- test/factories/policy_arf_report_factory.rb
|
604
456
|
- test/factories/policy_factory.rb
|
605
457
|
- test/factories/scap_content_related.rb
|
@@ -612,11 +464,7 @@ test_files:
|
|
612
464
|
- test/files/scap_contents/ssg-fedora-ds.xml
|
613
465
|
- test/files/tailoring_files/ssg-firefox-ds-tailoring-2.xml
|
614
466
|
- test/files/tailoring_files/ssg-firefox-ds-tailoring.xml
|
615
|
-
- test/fixtures/cve_fixtures.rb
|
616
467
|
- test/functional/api/v2/compliance/arf_reports_controller_test.rb
|
617
|
-
- test/functional/api/v2/compliance/oval_contents_controller_test.rb
|
618
|
-
- test/functional/api/v2/compliance/oval_policies_controller_test.rb
|
619
|
-
- test/functional/api/v2/compliance/oval_reports_controller_test.rb
|
620
468
|
- test/functional/api/v2/compliance/policies_controller_test.rb
|
621
469
|
- test/functional/api/v2/compliance/scap_content_profiles_controller_test.rb
|
622
470
|
- test/functional/api/v2/compliance/scap_contents_controller_test.rb
|
@@ -625,10 +473,6 @@ test_files:
|
|
625
473
|
- test/functional/arf_reports_controller_test.rb
|
626
474
|
- test/functional/openscap_proxies_controller_test.rb
|
627
475
|
- test/functional/tailoring_files_controller_test.rb
|
628
|
-
- test/graphql/mutations/oval_policies/delete_mutation_test.rb
|
629
|
-
- test/graphql/queries/oval_content_query_test.rb
|
630
|
-
- test/graphql/queries/oval_contents_query_test.rb
|
631
|
-
- test/graphql/queries/oval_policies_query_test.rb
|
632
476
|
- test/helpers/arf_report_dashboard_helper_test.rb
|
633
477
|
- test/helpers/policy_dashboard_helper_test.rb
|
634
478
|
- test/lib/foreman_openscap/bulk_upload_test.rb
|
@@ -641,18 +485,12 @@ test_files:
|
|
641
485
|
- test/unit/concerns/openscap_proxy_extenstions_test.rb
|
642
486
|
- test/unit/message_cleaner_test.rb
|
643
487
|
- test/unit/openscap_host_test.rb
|
644
|
-
- test/unit/oval_host_test.rb
|
645
|
-
- test/unit/oval_policy_test.rb
|
646
|
-
- test/unit/oval_status_test.rb
|
647
488
|
- test/unit/policy_mailer_test.rb
|
648
489
|
- test/unit/policy_test.rb
|
649
490
|
- test/unit/scap_content_test.rb
|
650
491
|
- test/unit/services/config_name_service_test.rb
|
651
492
|
- test/unit/services/hostgroup_overrider_test.rb
|
652
493
|
- test/unit/services/lookup_key_overrider_test.rb
|
653
|
-
- test/unit/services/oval/cves_test.rb
|
654
|
-
- test/unit/services/oval/setup_check_test.rb
|
655
|
-
- test/unit/services/oval/setup_test.rb
|
656
494
|
- test/unit/services/report_dashboard/data_test.rb
|
657
495
|
- test/unit/services/tailoring_files_proxy_check_test.rb
|
658
496
|
- test/unit/tailoring_file_test.rb
|
@@ -1,72 +0,0 @@
|
|
1
|
-
module Api::V2
|
2
|
-
module Compliance
|
3
|
-
class OvalContentsController < ::Api::V2::BaseController
|
4
|
-
include Foreman::Controller::Parameters::OvalContent
|
5
|
-
include ForemanOpenscap::Api::V2::ScapApiControllerExtensions
|
6
|
-
|
7
|
-
before_action :find_resource, :except => %w[index create sync]
|
8
|
-
skip_before_action :check_media_type, :only => %w[create update]
|
9
|
-
|
10
|
-
api :GET, '/compliance/oval_contents', N_('List OVAL contents')
|
11
|
-
param_group :search_and_pagination, ::Api::V2::BaseController
|
12
|
-
add_scoped_search_description_for(::ForemanOpenscap::OvalContent)
|
13
|
-
|
14
|
-
def index
|
15
|
-
@oval_contents = resource_scope_for_index(:permission => :view_oval_contents)
|
16
|
-
end
|
17
|
-
|
18
|
-
api :GET, '/compliance/oval_contents/:id', N_('Show an OVAL content')
|
19
|
-
param :id, :identifier, :required => true
|
20
|
-
|
21
|
-
def show
|
22
|
-
end
|
23
|
-
|
24
|
-
def_param_group :oval_content do
|
25
|
-
param :oval_content, Hash, :required => true, :action_aware => true do
|
26
|
-
param :name, String, :required => true, :desc => N_('OVAL content name')
|
27
|
-
param :scap_file, File, :desc => N_('XML containing OVAL content')
|
28
|
-
param :original_filename, String, :desc => N_('Original file name of the OVAL content file')
|
29
|
-
param :url, String, :desc => N_('URL of the OVAL content file')
|
30
|
-
param_group :taxonomies, ::Api::V2::BaseController
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
api :POST, '/compliance/oval_contents', N_('Create OVAL content')
|
35
|
-
param_group :oval_content, :as => :create
|
36
|
-
|
37
|
-
def create
|
38
|
-
@oval_content = ForemanOpenscap::OvalContent.new(oval_content_params)
|
39
|
-
process_response @oval_content.save
|
40
|
-
end
|
41
|
-
|
42
|
-
api :PUT, '/compliance/oval_contents/:id', N_('Update an OVAL content')
|
43
|
-
param :id, :identifier, :required => true
|
44
|
-
param_group :oval_content
|
45
|
-
|
46
|
-
def update
|
47
|
-
process_response @oval_content.update(oval_content_params)
|
48
|
-
end
|
49
|
-
|
50
|
-
api :DELETE, '/compliance/oval_contents/:id', N_('Deletes an OVAL content')
|
51
|
-
param :id, :identifier, :required => true
|
52
|
-
|
53
|
-
def destroy
|
54
|
-
process_response @oval_content.destroy
|
55
|
-
end
|
56
|
-
|
57
|
-
api :POST, '/compliance/oval_contents/sync', N_('Sync contents that have remote source URL')
|
58
|
-
def sync
|
59
|
-
@oval_contents = ForemanOpenscap::Oval::SyncOvalContents.new.sync_all
|
60
|
-
end
|
61
|
-
|
62
|
-
def action_permission
|
63
|
-
case params[:action]
|
64
|
-
when 'sync'
|
65
|
-
:update
|
66
|
-
else
|
67
|
-
super
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
@@ -1,111 +0,0 @@
|
|
1
|
-
module Api::V2
|
2
|
-
module Compliance
|
3
|
-
class OvalPoliciesController < ::Api::V2::BaseController
|
4
|
-
include Foreman::Controller::SmartProxyAuth
|
5
|
-
include ForemanOpenscap::Api::V2::ScapApiControllerExtensions
|
6
|
-
include Foreman::Controller::Parameters::OvalPolicy
|
7
|
-
|
8
|
-
add_smart_proxy_filters %i[oval_content], :features => 'Openscap'
|
9
|
-
|
10
|
-
before_action :find_resource, :except => %w[index create]
|
11
|
-
skip_after_action :log_response_body, :only => %i[oval_content]
|
12
|
-
|
13
|
-
api :GET, '/compliance/oval_policies', N_('List OVAL Policies')
|
14
|
-
param_group :search_and_pagination, ::Api::V2::BaseController
|
15
|
-
|
16
|
-
def index
|
17
|
-
@oval_policies = resource_scope_for_index(:permission => :view_oval_policies)
|
18
|
-
end
|
19
|
-
|
20
|
-
api :GET, '/compliance/oval_policies/:id', N_('Show an OVAL Policy')
|
21
|
-
param :id, :identifier, :required => true
|
22
|
-
|
23
|
-
def show
|
24
|
-
end
|
25
|
-
|
26
|
-
def_param_group :oval_policy do
|
27
|
-
param :oval_policy, Hash, :required => true, :action_aware => true do
|
28
|
-
param :name, String, :required => true, :desc => N_('OVAL Policy name')
|
29
|
-
param :oval_content_id, Integer, :required => true, :desc => N_('Policy OVAL content ID')
|
30
|
-
param :description, String, :desc => N_('OVAL Policy description')
|
31
|
-
param :period, String, :desc => N_('OVAL Policy schedule period (weekly, monthly, custom)')
|
32
|
-
param :weekday, String, :desc => N_('OVAL Policy schedule weekday (only if period == "weekly")')
|
33
|
-
param :day_of_month, Integer, :desc => N_('OVAL Policy schedule day of month (only if period == "monthly")')
|
34
|
-
param :cron_line, String, :desc => N_('OVAL Policy schedule cron line (only if period == "custom")')
|
35
|
-
param_group :taxonomies, ::Api::V2::BaseController
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
api :POST, '/compliance/oval_policies', N_('Create an OVAL Policy')
|
40
|
-
param_group :oval_policy, :as => :create
|
41
|
-
|
42
|
-
def create
|
43
|
-
@oval_policy = ForemanOpenscap::OvalPolicy.new(oval_policy_params)
|
44
|
-
process_response(@oval_policy.save)
|
45
|
-
end
|
46
|
-
|
47
|
-
api :PUT, '/compliance/oval_policies/:id', N_('Update an OVAL Policy')
|
48
|
-
param :id, :identifier, :required => true
|
49
|
-
param_group :oval_policy
|
50
|
-
|
51
|
-
def update
|
52
|
-
process_response(@oval_policy.update(oval_policy_params))
|
53
|
-
end
|
54
|
-
|
55
|
-
api :DELETE, '/compliance/oval_policies/:id', N_('Delete an OVAL Policy')
|
56
|
-
param :id, :identifier, :required => true
|
57
|
-
|
58
|
-
def destroy
|
59
|
-
process_response @oval_policy.destroy
|
60
|
-
end
|
61
|
-
|
62
|
-
api :POST, '/compliance/oval_policies/:id/assign_hostgroups', N_('Assign hostgroups to an OVAL Policy')
|
63
|
-
param :id, :identifier, :required => true
|
64
|
-
param :hostgroup_ids, Array, :desc => N_('Array of hostgroup IDs')
|
65
|
-
|
66
|
-
def assign_hostgroups
|
67
|
-
assign _('hostgroups'), params["hostgroup_ids"], ::Hostgroup
|
68
|
-
end
|
69
|
-
|
70
|
-
api :POST, '/compliance/oval_policies/:id/assign_hosts', N_('Assign hosts to an OVAL Policy')
|
71
|
-
param :id, :identifier, :required => true
|
72
|
-
param :host_ids, Array, :desc => N_('Array of host IDs')
|
73
|
-
|
74
|
-
def assign_hosts
|
75
|
-
assign _('hosts'), params["host_ids"], ::Host::Managed
|
76
|
-
end
|
77
|
-
|
78
|
-
api :GET, '/compliance/oval_policies/:id/oval_content', N_("Show a policy's OVAL content")
|
79
|
-
param :id, :identifier, :required => true
|
80
|
-
|
81
|
-
def oval_content
|
82
|
-
@oval_content = @oval_policy.oval_content
|
83
|
-
send_data @oval_content.scap_file,
|
84
|
-
:type => 'application/x-bzip2',
|
85
|
-
:filename => @oval_content.original_filename
|
86
|
-
end
|
87
|
-
|
88
|
-
def action_permission
|
89
|
-
case params[:action]
|
90
|
-
when 'assign_hostgroups', 'assign_hosts'
|
91
|
-
:edit
|
92
|
-
when 'oval_content'
|
93
|
-
:show
|
94
|
-
else
|
95
|
-
super
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
private
|
100
|
-
|
101
|
-
def assign(resource_plural, ids, model_class)
|
102
|
-
check_collection = ::ForemanOpenscap::Oval::Configure.new.assign(@oval_policy, ids, model_class)
|
103
|
-
if check_collection.all_passed?
|
104
|
-
render :json => { :message => (_("OVAL policy successfully configured with %s.") % resource_plural) }
|
105
|
-
else
|
106
|
-
render :json => { :results => check_collection.find_failed.map(&:to_h) }
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|
111
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
module Api
|
2
|
-
module V2
|
3
|
-
module Compliance
|
4
|
-
class OvalReportsController < ::Api::V2::BaseController
|
5
|
-
include Foreman::Controller::SmartProxyAuth
|
6
|
-
add_smart_proxy_filters :create, :features => 'Openscap'
|
7
|
-
|
8
|
-
skip_before_action :setup_has_many_params
|
9
|
-
before_action :find_resources_before_create, :only => [:create]
|
10
|
-
|
11
|
-
api :POST, "/compliance/oval_reports/:cname/:oval_policy_id/:date", N_("Upload an OVAL report - a list of CVEs for given host")
|
12
|
-
param :cname, :identifier, :required => true
|
13
|
-
param :oval_policy_id, :identifier, :required => true
|
14
|
-
param :date, :identifier, :required => true
|
15
|
-
|
16
|
-
def create
|
17
|
-
ForemanOpenscap::Oval::Cves.new.create(@host, params.to_unsafe_h)
|
18
|
-
if @host.errors.any?
|
19
|
-
upload_fail @host.errors.full_messages
|
20
|
-
else
|
21
|
-
@host.refresh_statuses([ForemanOpenscap::OvalStatus])
|
22
|
-
render :json => { :result => :ok }
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
def find_resources_before_create
|
29
|
-
@host = ForemanOpenscap::Helper.find_host_by_name_or_uuid params[:cname]
|
30
|
-
|
31
|
-
unless @host
|
32
|
-
upload_fail(_('Could not find host identified by: %s') % params[:cname])
|
33
|
-
return
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def upload_fail(msg)
|
38
|
-
logger.error msg
|
39
|
-
render :json => { :result => :fail, :errors => msg }, :status => :unprocessable_entity
|
40
|
-
end
|
41
|
-
|
42
|
-
def find_resource
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Foreman::Controller::Parameters::OvalContent
|
2
|
-
extend ActiveSupport::Concern
|
3
|
-
|
4
|
-
class_methods do
|
5
|
-
def oval_content_params_filter
|
6
|
-
Foreman::ParameterFilter.new(::ForemanOpenscap::OvalContent).tap do |filter|
|
7
|
-
filter.permit :original_filename, :scap_file, :name, :url, :location_ids => [], :organization_ids => []
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def oval_content_params
|
13
|
-
read_file_content self.class.oval_content_params_filter.filter_params(params, parameter_filter_context)
|
14
|
-
end
|
15
|
-
|
16
|
-
def read_file_content(params)
|
17
|
-
return params unless file = params[:scap_file]
|
18
|
-
content = file.read
|
19
|
-
filename = file.original_filename
|
20
|
-
params.merge(:scap_file => content, :original_filename => params[:original_filename] || filename)
|
21
|
-
end
|
22
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Foreman::Controller::Parameters::OvalPolicy
|
2
|
-
extend ActiveSupport::Concern
|
3
|
-
|
4
|
-
class_methods do
|
5
|
-
def filter_params_list
|
6
|
-
[:description, :name, :period,
|
7
|
-
:weekday, :day_of_month, :cron_line,
|
8
|
-
:oval_content_id,
|
9
|
-
:location_ids => [], :organization_ids => []]
|
10
|
-
end
|
11
|
-
|
12
|
-
def oval_policy_params_filter
|
13
|
-
Foreman::ParameterFilter.new(::ForemanOpenscap::OvalPolicy).tap do |filter|
|
14
|
-
filter.permit filter_params_list
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def oval_policy_params
|
20
|
-
self.class.oval_policy_params_filter.filter_params(params, parameter_filter_context)
|
21
|
-
end
|
22
|
-
end
|