Root-level security is not applied by API Gateway
Make inherited security explicit without changing operation overrides.
See this finding in a synthetic example
AWS REST ignores root security. Preview one explicit copy for GET /pets; POST /pets keeps its public override. Import and authorization still need separate AWS testing.
Diagnose the inherited security sample →
Loads a built-in example and runs local checks. Any available repair still needs your selection and preview review.
Match the finding
These titles and messages come from this local checker. They are not AWS service error quotes.
Root security is ignored by API GatewayInherited security is not explicit
Cause and scope
OpenAPI operations can inherit root security. API Gateway REST import does not apply that root-level definition. This checker offers one guarded repair: exact copies into directly declared operations that omit security.
What to do
Review the proposed copies and retain the root definition. Explicit operation security is preserved, including an empty array and anonymous alternatives. Import into a non-production environment and test authorization.
- Resolve every blocking finding first.
- Select the security-copy repair, review every affected operation, then download the reviewed output.
- Test authenticated and unauthenticated requests against the imported API.
Operation fragment: copy inherited requirements, preserve public overrides
security:
- ApiKey: []
paths:
/pets:
get:
security:
- ApiKey: []
responses:
'200':
description: OK
post:
security: []
responses:
'201':
description: CreatedAssume ApiKey is an existing, valid security scheme. GET receives the unchanged root array; POST already declares public access and must stay unchanged. If the root array contains {}, preserve that anonymous alternative too.
Avoid a misleading fix
Do not overwrite existing security, remove anonymous alternatives, or convert authentication types. Copying requirements does not provision an AWS authorizer.
Check your complete file locally
Choose one OpenAPI 3.0 JSON or YAML file, diagnose the findings, and review any eligible security-copy preview before downloading. No file upload or account is needed.
Why valid OpenAPI fails AWS API Gateway import explains how this finding fits the larger troubleshooting process.
Compare the requirements before and after
Use the local workbench to distinguish a declaration-only security copy from newly anonymous access or changed requirements. Referenced Path Items and callbacks stay explicitly outside complete coverage.
Edit a small reproduction
Edit this example and compare the YAML →
Synthetic fixture, JSON edits, and local selected checks only. Security copies require an explicit click; nothing is sent to AWS.
Related findings
Sources and scope
Scope: this local checker, API Gateway REST APIs, and OpenAPI 3.0. Guidance reviewed 4 October 2026. A passing check does not guarantee import or runtime behavior.