π§ Azure Storage Account Private Endpoints are not used - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml
- Located in: π Azure Storage Account Private Endpoints are not used π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π Azure Storage Account | CA10__CaAzureStorageAccount__c | 23 | 1 | 13 |
Usesβ
Test Results π’β
Generated at: 2025-04-24T23:45:57.700900936Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
π’ | test2 | βοΈ 199 | βοΈ CA10Z1__Azure_Private_Endpoint_Connections__r.has(INCOMPLIANT) | βοΈ null |
π’ | test3 | βοΈ 199 | βοΈ CA10Z1__Azure_Private_Endpoint_Connections__r.has(INCOMPLIANT) | βοΈ null |
π’ | test4 | βοΈ 199 | βοΈ CA10Z1__Azure_Private_Endpoint_Connections__r.has(INCOMPLIANT) | βοΈ null |
π’ | test5 | βοΈ 199 | βοΈ CA10Z1__Azure_Private_Endpoint_Connections__r.has(INCOMPLIANT) | βοΈ null |
π’ | test6 | βοΈ 299 | βοΈ CA10Z1__Azure_Private_Endpoint_Connections__r.has(COMPLIANT) | βοΈ null |
π’ | test7 | βοΈ 400 | βοΈ otherwise | βοΈ null |
π’ | test8 | βοΈ 400 | βοΈ otherwise | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/storage/private-endpoints-used-to-access-storage/policy.yaml | 260D17C999A3F1D871568E551281F367 |
Open | /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml | 50F2D5445F1D7CCD01DB114BFF414C12 |
Open | /types/CA10Z1__CaAzurePrivateEndpointConnection__c/object.extracts.yaml | 5CD7A50D4A2794C12C5D70767988C700 |
Open | /ce/ca/azure/storage/private-endpoints-used-to-access-storage/test-data.json | 7E25941B11AA563CF4107711FEB1B650 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAzureStorageAccount__c"
testData:
- file: "test-data.json"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "A private endpoint is not used by the Storage Account."
remediationMessage: "Consider creating a private endpoint to limit the\
\ network traffic to approved sources."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10Z1__Azure_Private_Endpoint_Connections__r"
- status: "COMPLIANT"
currentStateMessage: "the Storage Account uses a private endpoint."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10Z1__Azure_Private_Endpoint_Connections__r"
- status: "UNDETERMINED"
currentStateMessage: "Unable to determine the private endpoint status."
check:
RELATED_LIST_HAS:
status: "UNDETERMINED"
relationshipName: "CA10Z1__Azure_Private_Endpoint_Connections__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "A private endpoint is not used by the Storage Account."
remediationMessage: "Consider creating a private endpoint to limit the\
\ network traffic to approved sources."
relatedLists:
- relationshipName: "CA10Z1__Azure_Private_Endpoint_Connections__r"
recordTypes:
- "privateEndpointOnStorageAccount"
importExtracts:
- file: "/types/CA10Z1__CaAzurePrivateEndpointConnection__c/object.extracts.yaml"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "A private endpoint does not exist."
remediationMessage: "Consider creating a private endpoint."
check:
IS_EMPTY_LOOKUP: "CA10Z1__privateEndpoint__r"
- status: "INCOMPLIANT"
currentStateMessage: "The private link service connection is not approved."
remediationMessage: "Resource owner rejected or removed the connection."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10Z1__serviceConnectionStatus__c"
right:
TEXT: "Approved"
- status: "COMPLIANT"
currentStateMessage: "The private link service connection is approved."
check:
IS_EQUAL:
left:
EXTRACT: "CA10Z1__serviceConnectionStatus__c"
right:
TEXT: "Approved"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected value in the field."