From 7f44352dd8f7b651cda49535c372bc0e9c249068 Mon Sep 17 00:00:00 2001 From: Tyler Cloke Date: Fri, 8 May 2020 14:27:05 -0700 Subject: [PATCH 1/2] Change compliance:*:export to list Signed-off-by: Tyler Cloke --- components/automate-gateway/gateway/services.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/automate-gateway/gateway/services.go b/components/automate-gateway/gateway/services.go index 68001d51ef1..e5681b3b533 100644 --- a/components/automate-gateway/gateway/services.go +++ b/components/automate-gateway/gateway/services.go @@ -559,7 +559,7 @@ func (s *Server) ReportExportHandler(w http.ResponseWriter, r *http.Request) { // request body. const ( resource = "compliance:reporting:reports" - action = "compliance:reports:export" + action = "compliance:reports:list" ) ctx, err := s.authRequest(r, resource, action) @@ -622,7 +622,7 @@ func writeContent(w http.ResponseWriter, stream reporting.ReportingService_Expor func (s *Server) NodeExportHandler(w http.ResponseWriter, r *http.Request) { const ( resource = "compliance:reporting:nodes:{id}" - action = "compliance:reportNodes:export" + action = "compliance:reportNodes:list" ) ctx, err := s.authRequest(r, resource, action) From d36879e95840d3213961744ccc07a26309b273be Mon Sep 17 00:00:00 2001 From: Tyler Cloke Date: Sat, 9 May 2020 11:34:32 -0700 Subject: [PATCH 2/2] Fix test Signed-off-by: Tyler Cloke --- .../controls/chef_managed_access.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inspec/a2-iam-no-legacy-integration/controls/chef_managed_access.rb b/inspec/a2-iam-no-legacy-integration/controls/chef_managed_access.rb index 3313a5e09b5..577f8a7e6d3 100644 --- a/inspec/a2-iam-no-legacy-integration/controls/chef_managed_access.rb +++ b/inspec/a2-iam-no-legacy-integration/controls/chef_managed_access.rb @@ -133,7 +133,8 @@ 'reporting/stats/trend', # ReadTrend 'reporting/stats/profiles', # ReadProfiles 'reporting/stats/failures', # ReadFailures - 'scanner/jobs/search' # List + 'scanner/jobs/search', # List + 'reporting/export' # ExportReport as json/csv ] }.each do |method, urls| urls.each do |url| @@ -166,7 +167,6 @@ ], 'POST': [ 'scanner/jobs', # Create job - 'reporting/export' # ExportReport as json/csv ] }.each do |method, urls| urls.each do |url|