Skip to main content

🧠 AWS API Gateway REST API Stage is not configured to use an SSL certificate for authentication - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• AWS API Gateway StageCA10__CaAwsApiGatewayStage__c313

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:44:20.745704888Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ not(['restApiStage'].contains(RecordType.DeveloperName))βœ”οΈ null
🟒test3βœ”οΈ 299βœ”οΈ extract('CA10__restApi__r.CA10__endpointType__c') == 'PRIVATE'βœ”οΈ null
🟒test4βœ”οΈ 399βœ”οΈ CA10__restApi__r.CA10A1__AWS_API_Gateway_Methods__r.hasNo(COMPLIANT)βœ”οΈ null
🟒test5βœ”οΈ 499βœ”οΈ isEmptyLookup('CA10__clientCertificate__r')βœ”οΈ null
🟒test6βœ”οΈ 499βœ”οΈ isEmptyLookup('CA10__clientCertificate__r')βœ”οΈ null
🟒test7βœ”οΈ 499βœ”οΈ isEmptyLookup('CA10__clientCertificate__r')βœ”οΈ null
🟒test8βœ”οΈ 599βœ”οΈ notEmptyLookup('CA10__clientCertificate__r')βœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/apigateway/rest-api-stage-ssl-certificate/policy.yaml9C33486220F93D978B807D552A64FE95
Open/ce/ca/aws/apigateway/rest-api-stage-ssl-certificate/prod.logic.yamlF55F8E3578AA1136D16F01215943B31D
Open/ce/ca/aws/apigateway/rest-api-stage-ssl-certificate/test-data.json6A90FE9B918330B473DDC7C73CDA2D15
Open/types/CA10A1__CaAwsApiGatewayMethod__c/object.extracts.yamlE28695D16341F6C70D3B2EE06BCEB425
Open/types/CA10__CaAwsApiGatewayRestApi__c/object.extracts.yaml746F09341E8149BAD88C53E274DB1DD5

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/apigateway/rest-api-stage-ssl-certificate/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/apigateway/rest-api-stage-ssl-certificate/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/apigateway/rest-api-stage-ssl-certificate/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/apigateway/rest-api-stage-ssl-certificate/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/apigateway/rest-api-stage-ssl-certificate/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsApiGatewayStage__c"
importExtracts:
- file: "/types/CA10__CaAwsApiGatewayRestApi__c/object.extracts.yaml"
testData:
- file: test-data.json
recordTypes:
- "restApiStage"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The Stage belongs to a private API endpoint."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__restApi__r.CA10__endpointType__c"
right:
TEXT: "PRIVATE"
- status: "INAPPLICABLE"
currentStateMessage: "The Stage doesn't have HTTP integrations."
check:
RELATED_LIST_HAS_NO:
status: "COMPLIANT"
relationshipName: "CA10__restApi__r.CA10A1__AWS_API_Gateway_Methods__r"
- status: "INCOMPLIANT"
currentStateMessage: "The Stage is not configured to use an SSL certificate."
remediationMessage: "Consider generating an SSL certificate for authentication."
check:
IS_EMPTY_LOOKUP: "CA10__clientCertificate__r"
- status: "COMPLIANT"
currentStateMessage: "The Stage is configured to use an SSL certificate."
check:
NOT_EMPTY_LOOKUP: "CA10__clientCertificate__r"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."
relatedLists:
- relationshipName: "CA10__restApi__r.CA10A1__AWS_API_Gateway_Methods__r"
importExtracts:
- file: "/types/CA10A1__CaAwsApiGatewayMethod__c/object.extracts.yaml"
conditions:
- status: "COMPLIANT"
currentStateMessage: "This is an HTTP integration."
check:
OR:
args:
- IS_EQUAL:
left:
EXTRACT: "CA10A1__integrationType__c"
right:
TEXT: "HTTP"
- IS_EQUAL:
left:
EXTRACT: "CA10A1__integrationType__c"
right:
TEXT: "HTTP_PROXY"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "This is not an HTTP integration."