π§ Azure SQL Server Auditing is not enabled - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/azure/sql-database/server-auditing/prod.logic.yaml
- Located in: π Azure SQL Server Auditing is not enabled π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π Azure SQL Server | CA10__CaAzureSqlServer__c | 9 | 1 | 6 |
Usesβ
Test Results π’β
Generated at: 2025-04-24T23:45:48.436276620Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
π’ | test2 | βοΈ 199 | βοΈ extract('CA10__auditing__c') == 'Disabled' | βοΈ null |
π’ | test3 | βοΈ 299 | βοΈ extract('CA10__auditing__c') == 'Enabled' | βοΈ null |
π’ | test4 | βοΈ 101 | βοΈ CA10__auditing__c.delegatedTo(CA10__auditing__c).isEmpty() | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/sql-database/server-auditing/policy.yaml | FAF43B5189C2DD649FAC8B3BEE46AB9B |
Open | /ce/ca/azure/sql-database/server-auditing/prod.logic.yaml | EDBFBB2DAFF8B871B084FC01C6F1D92E |
Open | /ce/ca/azure/sql-database/server-auditing/test-data.json | 91EE3E0C8CE9A55D19FE187A761E680E |
Open | /types/CA10__CaAzureSqlServer__c/object.extracts.yaml | E77808BBEDF31D54E009EEA59AC5EF4B |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/azure/sql-database/server-auditing/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/sql-database/server-auditing/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/sql-database/server-auditing/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/sql-database/server-auditing/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/azure/sql-database/server-auditing/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAzureSqlServer__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10__CaAzureSqlServer__c/object.extracts.yaml"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "SQL Server auditing is disabled."
remediationMessage: "Consider enabling SQL Server auditing."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__auditing__c"
right:
TEXT: "Disabled"
- status: "COMPLIANT"
currentStateMessage: "SQL Server auditing is enabled."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__auditing__c"
right:
TEXT: "Enabled"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected value in the field."