π§ Azure Key Vault Soft Delete and Purge Protection functions are not enabled - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/azure/key-vault/soft-delete-and-purge-protection/prod.logic.yaml
- Located in: π Azure Key Vault Soft Delete and Purge Protection functions are not enabled π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π Azure Key Vault | CA10__CaAzureKeyVault__c | 3 | 1 | 8 |
Usesβ
Test Results π’β
Generated at: 2025-04-24T23:45:28.444411080Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
π’ | test2 | βοΈ 199 | βοΈ extract('CA10__softDelete__c') == 'Disabled' | βοΈ null |
π’ | test3 | βοΈ 299 | βοΈ extract('CA10__purgeProtection__c') != 'Enabled' | βοΈ null |
π’ | test4 | βοΈ 399 | βοΈ extract('CA10__purgeProtection__c') == 'Enabled' && extract('CA10__softDelete__c') == 'Enabled' | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/key-vault/soft-delete-and-purge-protection/policy.yaml | 116BE035C201EA3629BEA61BC50A7305 |
Open | /ce/ca/azure/key-vault/soft-delete-and-purge-protection/prod.logic.yaml | 9A06E6BB38871CF56693C5F40E3AE4D3 |
Open | /ce/ca/azure/key-vault/soft-delete-and-purge-protection/test-data.json | 9CD8B266A0A3A9974D607D6182786FD7 |
Open | /types/CA10__CaAzureKeyVault__c/object.extracts.yaml | 6C8158AF4E8A90E532020A68611A20C7 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/azure/key-vault/soft-delete-and-purge-protection/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/key-vault/soft-delete-and-purge-protection/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/key-vault/soft-delete-and-purge-protection/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/key-vault/soft-delete-and-purge-protection/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/azure/key-vault/soft-delete-and-purge-protection/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAzureKeyVault__c"
importExtracts:
- file: "/types/CA10__CaAzureKeyVault__c/object.extracts.yaml"
testData:
- file: "test-data.json"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "The Soft Delete is disabled. The Purge Protection is effective only if Soft Delete is also enabled."
remediationMessage: "Consider enabling Soft Delete and Purge Protection functions."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__softDelete__c"
right:
TEXT: "Disabled"
- status: "INCOMPLIANT"
currentStateMessage: "The Purge Protection is disabled."
remediationMessage: "Consider enabling Purge Protection function."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__purgeProtection__c"
right:
TEXT: "Enabled"
- status: "COMPLIANT"
currentStateMessage: "The Soft Delete and Purge Protection functions are enabled."
check:
AND:
args:
- IS_EQUAL:
left:
EXTRACT: "CA10__purgeProtection__c"
right:
TEXT: "Enabled"
- IS_EQUAL:
left:
EXTRACT: "CA10__softDelete__c"
right:
TEXT: "Enabled"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."