π AWS API Gateway REST API Stage is not configured to use an SSL certificate for authentication π’
- Contextual name: π REST API Stage is not configured to use an SSL certificate for authentication π’
- ID:
/ce/ca/aws/apigateway/rest-api-stage-ssl-certificate
- Located in: π AWS API Gateway
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Internal
dec-x-d9d39f21
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-d9d39f21 | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
API Gateway REST API stages should be configured with SSL certificates to ensure secure communication between API Gateway and backend systems. This configuration guarantees that requests originating from API Gateway are authenticated, allowing the backend systems to trust that the requests come from the API Gateway and not from unauthorized sources. SSL certificates are used to encrypt the communication between these components, adding a layer of security and ensuring integrity.
Rationaleβ
Configuring SSL certificates for API Gateway REST API stages addresses several important security concerns. It allows backend systems to authenticate the source of incoming requests, ensuring that only trusted entities are interacting with the system. This prevents potential man-in-the-middle attacks and unauthorized access, which could otherwise compromise the confidentiality and integrity of the data being transmitted.
Auditβ
This policy marks an API Gateway Stage as
INCOMPLIANT
if an SSL Certificate is not configured. This is identified when theClient Certificate
field is empty or the associated certificate has been deleted from the CMDB.... see more
Remediationβ
Remediationβ
Note: Some backend servers may not support SSL client authentication as API Gateway does, potentially resulting in an SSL certificate error.
From Command Lineβ
Generate a client certificateβ
aws apigateway generate-client-certificate --description "Client certificate for secure API communication"
This command returns
Client Certificate Id
andPEM-encoded public key
of the newly generated client certificate. Save the PEM to use for configuration of a backend HTTPS server.The client certificate generated by API Gateway is valid for 365 days. To prevent API downtime, ensure the certificate is rotated before it expires on an API Gateway Stage.
Configure an API to Use SSL Certificatesβ
To associate the generated client certificate with a specific API stage, update the stage settings:
aws apigateway update-stage \
--rest-api-id {{rest-api-id}} \
--stage-name {{stage-name}} \
--patch-operations op=replace,path=/clientCertificateId,value={{client-certificate-id}}Replace
{{rest-api-id}}
,{{stage-name}}
, and{{client-certificate-id}}
with the appropriate values.... see more