Control: API Gateway stages should have authorizers configured
Description
Ensure API Gateway stages have authorizers configured.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.apigateway_rest_api_authorizers_configured
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.apigateway_rest_api_authorizers_configured --share
SQL
This control uses a named query:
select p.name as resource, case when jsonb_array_length(a.provider_arns) > 0 then 'ok' else 'alarm' end as status, case when jsonb_array_length(a.provider_arns) > 0 then p.name || ' authorizers configured.' else p.name || ' authorizers not configured.' end as reason , p.region, p.account_idfrom aws_api_gateway_rest_api as p left join aws_api_gateway_authorizer as a on p.api_id = a.rest_api_id;