--- policy: /ce/ca/aws/eks/cluster-logging logic: /ce/ca/aws/eks/cluster-logging/prod.logic.yaml executionTime: 2026-02-10T22:32:50.781327825Z generationMs: 52 executionMs: 773 rows: - id: test1 match: true status: expected: DISAPPEARED actual: DISAPPEARED conditionIndex: expected: 99 actual: 99 conditionText: expected: isDisappeared(CA10A1__disappearanceTime__c) actual: isDisappeared(CA10A1__disappearanceTime__c) runtimeError: {} - id: test2 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 199 actual: 199 conditionText: expected: "extract('caSetFrom_logging__c').contains('api: Disabled')" actual: "extract('caSetFrom_logging__c').contains('api: Disabled')" runtimeError: {} - id: test3 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 299 actual: 299 conditionText: expected: "extract('caSetFrom_logging__c').contains('audit: Disabled')" actual: "extract('caSetFrom_logging__c').contains('audit: Disabled')" runtimeError: {} - id: test4 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 399 actual: 399 conditionText: expected: "extract('caSetFrom_logging__c').contains('authenticator: Disabled')" actual: "extract('caSetFrom_logging__c').contains('authenticator: Disabled')" runtimeError: {} - id: test5 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 499 actual: 499 conditionText: expected: "extract('caSetFrom_logging__c').contains('controllerManager: Disabled')" actual: "extract('caSetFrom_logging__c').contains('controllerManager: Disabled')" runtimeError: {} - id: test6 match: true status: expected: INCOMPLIANT actual: INCOMPLIANT conditionIndex: expected: 599 actual: 599 conditionText: expected: "extract('caSetFrom_logging__c').contains('scheduler: Disabled')" actual: "extract('caSetFrom_logging__c').contains('scheduler: Disabled')" runtimeError: {} - id: test7 match: true status: expected: COMPLIANT actual: COMPLIANT conditionIndex: expected: 600 actual: 600 conditionText: expected: otherwise actual: otherwise runtimeError: {} usedFiles: - path: /ce/ca/aws/eks/cluster-logging/policy.yaml md5Hash: 4FC2B7A8EC8252FFEB65335B69028EEC content: "names:\n full: \"AWS EKS Cluster Logging is not enabled for all control\ \ plane logs types\"\n contextual: \"Cluster Logging is not enabled for all\ \ control plane logs types\"\ndescription: >\n Ensure that EKS cluster control\ \ plane logs are enabled and configured to capture \n API, audit, authenticator,\ \ controller manager, and scheduler activity.\ncategories:\n - \"RELIABILITY\"\ \ntype: \"COMPLIANCE_POLICY\"\nframeworkMappings:\n - \"/frameworks/cloudaware/logging-and-monitoring/logging-and-monitoring-configuration\"\ \n - \"/frameworks/aws-fsbp-v1.0.0/eks/08\"\nsimilarPolicies:\n internal:\n\ \ - \"dec-x-8ccccedc\"" - path: /ce/ca/aws/eks/cluster-logging/prod.logic.yaml md5Hash: 19B33F88B2C6EDF6710D460AA6CDD4D0 content: "inputType: \"CA10A1__CaAwsEksCluster__c\"\nimportExtracts:\n - file:\ \ \"/types/CA10A1__CaAwsEksCluster__c/object.extracts.yaml\"\ntestData:\n -\ \ file: \"test-data.json\"\nconditions:\n - status: \"INCOMPLIANT\"\n currentStateMessage:\ \ \"EKS cluster control plane logging is not configured for API server logs.\"\ \n remediationMessage: \"Enable API server logs in EKS control plane logging.\"\ \n check:\n CONTAINS:\n arg: \n EXTRACT: \"caSetFrom_logging__c\"\ \n search:\n TEXT: \"api: Disabled\"\n - status: \"INCOMPLIANT\"\ \n currentStateMessage: \"EKS cluster control plane logging is not configured\ \ for audit logs.\"\n remediationMessage: \"Enable audit logs in EKS control\ \ plane logging.\"\n check:\n CONTAINS:\n arg: \n EXTRACT:\ \ \"caSetFrom_logging__c\"\n search:\n TEXT: \"audit: Disabled\"\ \n - status: \"INCOMPLIANT\"\n currentStateMessage: \"EKS cluster control\ \ plane logging is not configured for authenticator logs.\"\n remediationMessage:\ \ \"Enable authenticator logs in EKS control plane logging.\"\n check:\n\ \ CONTAINS:\n arg: \n EXTRACT: \"caSetFrom_logging__c\"\ \n search:\n TEXT: \"authenticator: Disabled\"\n - status:\ \ \"INCOMPLIANT\"\n currentStateMessage: \"EKS cluster control plane logging\ \ is not configured for controller manager logs.\"\n remediationMessage:\ \ \"Enable controller manager logs in EKS control plane logging.\"\n check:\n\ \ CONTAINS:\n arg: \n EXTRACT: \"caSetFrom_logging__c\"\ \n search:\n TEXT: \"controllerManager: Disabled\"\n - status:\ \ \"INCOMPLIANT\"\n currentStateMessage: \"EKS cluster control plane logging\ \ is not configured for scheduler logs.\"\n remediationMessage: \"Enable\ \ scheduler logs in EKS control plane logging.\"\n check:\n CONTAINS:\n\ \ arg: \n EXTRACT: \"caSetFrom_logging__c\"\n search:\n\ \ TEXT: \"scheduler: Disabled\"\notherwise:\n status: \"COMPLIANT\"\ \ \n currentStateMessage: \"EKS cluster logging is configured for all control\ \ plane log types.\"\n" - path: /ce/ca/aws/eks/cluster-logging/test-data.json md5Hash: 05CF73D0216996E3643DA58E71C06213 content: |- [ { "expectedResult": { "status": "DISAPPEARED", "conditionIndex": "99", "conditionText": "isDisappeared(CA10A1__disappearanceTime__c)", "runtimeError": null }, "context": { "snapshotTime": "2025-05-22T08:12:49Z" }, "Id": "test1", "CA10A1__disappearanceTime__c": "2025-05-22T08:12:49Z", "CA10A1__logging__c": "api: Disabled\naudit: Disabled\nauthenticator: Disabled\ncontrollerManager: Disabled\nscheduler: Disabled" }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "199", "conditionText": "extract('caSetFrom_logging__c').contains('api: Disabled')", "runtimeError": null }, "context": { "snapshotTime": "2025-05-22T08:12:49Z" }, "Id": "test2", "CA10A1__disappearanceTime__c": null, "CA10A1__logging__c": "api: Disabled\naudit: Disabled\nauthenticator: Disabled\ncontrollerManager: Disabled\nscheduler: Disabled" }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "299", "conditionText": "extract('caSetFrom_logging__c').contains('audit: Disabled')", "runtimeError": null }, "context": { "snapshotTime": "2025-05-22T08:12:49Z" }, "Id": "test3", "CA10A1__disappearanceTime__c": null, "CA10A1__logging__c": "api: Enabled\naudit: Disabled\nauthenticator: Disabled\ncontrollerManager: Disabled\nscheduler: Disabled" }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "399", "conditionText": "extract('caSetFrom_logging__c').contains('authenticator: Disabled')", "runtimeError": null }, "context": { "snapshotTime": "2025-05-22T08:12:49Z" }, "Id": "test4", "CA10A1__disappearanceTime__c": null, "CA10A1__logging__c": "api: Enabled\naudit: Enabled\nauthenticator: Disabled\ncontrollerManager: Disabled\nscheduler: Disabled" }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "499", "conditionText": "extract('caSetFrom_logging__c').contains('controllerManager: Disabled')", "runtimeError": null }, "context": { "snapshotTime": "2025-05-22T08:12:49Z" }, "Id": "test5", "CA10A1__disappearanceTime__c": null, "CA10A1__logging__c": "api: Enabled\naudit: Enabled\nauthenticator: Enabled\ncontrollerManager: Disabled\nscheduler: Disabled" }, { "expectedResult": { "status": "INCOMPLIANT", "conditionIndex": "599", "conditionText": "extract('caSetFrom_logging__c').contains('scheduler: Disabled')", "runtimeError": null }, "context": { "snapshotTime": "2025-05-22T08:12:49Z" }, "Id": "test6", "CA10A1__disappearanceTime__c": null, "CA10A1__logging__c": "api: Enabled\naudit: Enabled\nauthenticator: Enabled\ncontrollerManager: Enabled\nscheduler: Disabled" }, { "expectedResult": { "status": "COMPLIANT", "conditionIndex": "600", "conditionText": "otherwise", "runtimeError": null }, "context": { "snapshotTime": "2025-05-22T08:12:49Z" }, "Id": "test7", "CA10A1__disappearanceTime__c": null, "CA10A1__logging__c": "api: Enabled\naudit: Enabled\nauthenticator: Enabled\ncontrollerManager: Enabled\nscheduler: Enabled" } ] - path: /types/CA10A1__CaAwsEksCluster__c/object.extracts.yaml md5Hash: 40E423BD15F099D7D2B8AE19BF4D325E content: "---\nextracts:\n#Values: Enabled | Disabled. Not Nullable.\n - name:\ \ CA10A1__endpointPublicAccess__c\n value: \n FIELD:\n path:\ \ CA10A1__endpointPublicAccess__c\n undeterminedIf:\n noAccessDelegate:\n\ \ path: CA10A1__endpointPublicAccess__c\n currentStateMessage:\ \ \"Endpoint Public Access cannot be empty. Possible permission issues with\ \ eks:DescribeCluster.\"\n#LONG_TEXT_AREA with IP addresses divided by \\n.\ \ Nullable\n - name: CA10A1__publicAccessCidrs__c\n value: \n FIELD:\n\ \ path: CA10A1__publicAccessCidrs__c\n#Values: array of strings\n \ \ # api: Enabled\\n\n # audit: Enabled\\n\n # authenticator: Enabled\\\ n\n # controllerManager: Enabled\\n\n # scheduler: Enabled\\n\n -\ \ name: CA10A1__logging__c\n value: \n FIELD:\n path: CA10A1__logging__c\n\ \ undeterminedIf:\n noAccessDelegate:\n path: CA10A1__logging__c\n\ \ currentStateMessage: \"Cluster Logging cannot be empty. Possible\ \ permission issues with eks:DescribeCluster.\"\n - name: caSetFrom_logging__c\n\ \ value:\n SET_FROM:\n separator: \"\\n\"\n arg:\n \ \ EXTRACT: \"CA10A1__logging__c\"" script: |- CREATE TEMP FUNCTION mock_ExpectedResult() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "Id" : "test1", "expectedResult" : { "status" : "DISAPPEARED", "conditionIndex" : "99", "conditionText" : "isDisappeared(CA10A1__disappearanceTime__c)", "runtimeError" : null } }, { "Id" : "test2", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "199", "conditionText" : "extract('caSetFrom_logging__c').contains('api: Disabled')", "runtimeError" : null } }, { "Id" : "test3", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "299", "conditionText" : "extract('caSetFrom_logging__c').contains('audit: Disabled')", "runtimeError" : null } }, { "Id" : "test4", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "399", "conditionText" : "extract('caSetFrom_logging__c').contains('authenticator: Disabled')", "runtimeError" : null } }, { "Id" : "test5", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "499", "conditionText" : "extract('caSetFrom_logging__c').contains('controllerManager: Disabled')", "runtimeError" : null } }, { "Id" : "test6", "expectedResult" : { "status" : "INCOMPLIANT", "conditionIndex" : "599", "conditionText" : "extract('caSetFrom_logging__c').contains('scheduler: Disabled')", "runtimeError" : null } }, { "Id" : "test7", "expectedResult" : { "status" : "COMPLIANT", "conditionIndex" : "600", "conditionText" : "otherwise", "runtimeError" : null } } ]; """; CREATE TEMP FUNCTION mock_CA10A1__CaAwsEksCluster__c() RETURNS ARRAY >> DETERMINISTIC LANGUAGE js AS r""" return [ { "context" : { "snapshotTime" : new Date("2025-05-22T08:12:49Z") }, "CA10A1__disappearanceTime__c" : new Date("2025-05-22T08:12:49Z"), "CA10A1__logging__c" : "api: Disabled\naudit: Disabled\nauthenticator: Disabled\ncontrollerManager: Disabled\nscheduler: Disabled", "Id" : "test1" }, { "context" : { "snapshotTime" : new Date("2025-05-22T08:12:49Z") }, "CA10A1__logging__c" : "api: Disabled\naudit: Disabled\nauthenticator: Disabled\ncontrollerManager: Disabled\nscheduler: Disabled", "Id" : "test2" }, { "context" : { "snapshotTime" : new Date("2025-05-22T08:12:49Z") }, "CA10A1__logging__c" : "api: Enabled\naudit: Disabled\nauthenticator: Disabled\ncontrollerManager: Disabled\nscheduler: Disabled", "Id" : "test3" }, { "context" : { "snapshotTime" : new Date("2025-05-22T08:12:49Z") }, "CA10A1__logging__c" : "api: Enabled\naudit: Enabled\nauthenticator: Disabled\ncontrollerManager: Disabled\nscheduler: Disabled", "Id" : "test4" }, { "context" : { "snapshotTime" : new Date("2025-05-22T08:12:49Z") }, "CA10A1__logging__c" : "api: Enabled\naudit: Enabled\nauthenticator: Enabled\ncontrollerManager: Disabled\nscheduler: Disabled", "Id" : "test5" }, { "context" : { "snapshotTime" : new Date("2025-05-22T08:12:49Z") }, "CA10A1__logging__c" : "api: Enabled\naudit: Enabled\nauthenticator: Enabled\ncontrollerManager: Enabled\nscheduler: Disabled", "Id" : "test6" }, { "context" : { "snapshotTime" : new Date("2025-05-22T08:12:49Z") }, "CA10A1__logging__c" : "api: Enabled\naudit: Enabled\nauthenticator: Enabled\ncontrollerManager: Enabled\nscheduler: Enabled", "Id" : "test7" } ]; """; CREATE TEMP FUNCTION process_CA10A1__CaAwsEksCluster__c( obj STRUCT< CA10A1__disappearanceTime__c TIMESTAMP, CA10A1__logging__c STRING, Id STRING >, snapshotTime TIMESTAMP ) RETURNS STRUCT DETERMINISTIC LANGUAGE js AS r""" var BytesLib = new function () { this.normalize = function(arg) { return arg == null ? '' : arg; }; this.isEmpty = function(arg) { return this.normalize(arg) == ''; }; this.isNotEmpty = function(arg) { return this.normalize(arg) != ''; }; this.equal = function(left, right) { return this.normalize(left) == this.normalize(right); }; this.notEqual = function(left, right) { return this.normalize(left) != this.normalize(right); }; this.startsWith = function(arg, substring) { return this.normalize(arg).startsWith(this.normalize(substring)); }; this.endsWith = function(arg, substring) { return this.normalize(arg).endsWith(this.normalize(substring)); }; this.contains = function(arg, substring) { return this.normalize(arg).includes(this.normalize(substring)); }; this.containsAll = function(arg, substrings) { if (substrings == null || substrings.length === 0) return false; let normalizedArg = this.normalize(arg); return substrings.every(sub => normalizedArg.includes(this.normalize(sub))); }; this.containsAny = function(arg, substrings) { if (substrings == null || substrings.length === 0) return false; let normalizedArg = this.normalize(arg); return substrings.some(sub => normalizedArg.includes(this.normalize(sub))); }; }(); var CollectionLib = new function () { this.parse = function(arg, separator, skipEmpty, skipDuplicates, sort, normalize) { if (arg == null) return []; let parts = arg.split(separator); return this.fromArray(parts, skipEmpty, skipDuplicates, sort, normalize); }; this.fromArray = function(arr, skipEmpty, skipDuplicates, sort, normalize) { if (arr == null) return []; let result = []; let seen = new Set(); arr.forEach(el => { let normalized = normalize ? TextLib.normalize(el) : BytesLib.normalize(el); if (!skipEmpty || (normalize ? TextLib.isNotEmpty(el) : BytesLib.isNotEmpty(el))) { if (!skipDuplicates || !seen.has(normalized)) { if (skipDuplicates) seen.add(normalized); result.push(normalized); } } }); if (sort) result.sort(); return result; }; this.equal = function(left, right) { left = left == null ? [] : left; right = right == null ? [] : right; if (left.length !== right.length) return false; for (let i = 0; i < left.length; i++) { if (left[i] !== right[i]) return false; } return true; }; this.notEqual = function(left, right) { return !this.equal(left, right); }; this.size = function(collection) { return collection == null ? 0 : collection.length; }; this.startsWith = function(collection, search, normalize) { if (collection == null || collection.length === 0) return false; let normalizedSearch = normalize ? TextLib.normalize(search) : BytesLib.normalize(search); return collection[0] === normalizedSearch; }; this.endsWith = function(collection, search, normalize) { if (collection == null || collection.length === 0) return false; let normalizedSearch = normalize ? TextLib.normalize(search) : BytesLib.normalize(search); return collection[collection.length - 1] === normalizedSearch; }; this.contains = function(collection, search, normalize) { if (collection == null || collection.length === 0) return false; return collection.includes(normalize ? TextLib.normalize(search) : BytesLib.normalize(search)); }; this.containsAll = function(collection, searchArray, normalize) { if (collection == null || collection.length === 0 || searchArray == null || searchArray.length === 0) return false; return searchArray.every(search => collection.includes(normalize ? TextLib.normalize(search) : BytesLib.normalize(search))); }; this.containsAny = function(collection, searchArray, normalize) { if (collection == null || collection.length === 0 || searchArray == null || searchArray.length === 0) return false; return searchArray.some(search => collection.includes(normalize ? TextLib.normalize(search) : BytesLib.normalize(search))); }; }(); var TextLib = new function () { this.normalize = function(arg) { return arg == null ? '' : arg.replace(/\s+/g, ' ').trim().toLowerCase(); }; this.isEmpty = function(arg) { return this.normalize(arg) == ''; }; this.isNotEmpty = function(arg) { return this.normalize(arg) != ''; }; this.equal = function(left, right) { return this.normalize(left) == this.normalize(right); }; this.notEqual = function(left, right) { return this.normalize(left) != this.normalize(right); }; this.startsWith = function(arg, substring) { return this.normalize(arg).startsWith(this.normalize(substring)); }; this.endsWith = function(arg, substring) { return this.normalize(arg).endsWith(this.normalize(substring)); }; this.contains = function(arg, substring) { return this.normalize(arg).includes(this.normalize(substring)); }; this.containsAll = function(arg, substrings) { if (substrings == null || substrings.length === 0) return false; let normalizedArg = this.normalize(arg); return substrings.every(sub => normalizedArg.includes(this.normalize(sub))); }; this.containsAny = function(arg, substrings) { if (substrings == null || substrings.length === 0) return false; let normalizedArg = this.normalize(arg); return substrings.some(sub => normalizedArg.includes(this.normalize(sub))); }; }(); var references1 = []; // condition[0], conditionIndex:[0..99] references1.push('Deleted From AWS [CA10A1__disappearanceTime__c]: ' + obj.CA10A1__disappearanceTime__c); if (obj.CA10A1__disappearanceTime__c != null) { return {status: 'DISAPPEARED', conditionIndex: 99, conditionText: "isDisappeared(CA10A1__disappearanceTime__c)", currentStateMessage: "Object is deleted in the source", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; } // condition[1], conditionIndex:[100..199] function fieldChecked6() { if (TextLib.isEmpty(obj.CA10A1__logging__c)) { throw new Error("UNDETERMINED condition:101", {cause: {status: 'UNDETERMINED', conditionIndex: 101, conditionText: "CA10A1__logging__c.delegatedTo(CA10A1__logging__c).isEmpty()", currentStateMessage: "Cluster Logging cannot be empty. Possible permission issues with eks:DescribeCluster.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}}); } return obj.CA10A1__logging__c; } function extract5() { if (!this.out) { this.out = fieldChecked6(); } return this.out; }; function extract3() { if (!this.out) { this.out = CollectionLib.parse(extract5.call(extract5), '\n', true, true, true, true); } return this.out; }; references1.push('Logging [obj.CA10A1__logging__c]: ' + obj.CA10A1__logging__c); try { if (CollectionLib.contains(extract3.call(extract3), 'api: Disabled', true)) { return {status: 'INCOMPLIANT', conditionIndex: 199, conditionText: "extract('caSetFrom_logging__c').contains('api: Disabled')", currentStateMessage: "EKS cluster control plane logging is not configured for API server logs.", currentStateReferences: references1.join('\n'), remediation: "Enable API server logs in EKS control plane logging.", runtimeError: null}; } } catch (err) { if (err.cause && err.cause.status) { return err.cause; } else { throw err; } } // condition[2], conditionIndex:[200..299] function fieldChecked12() { if (TextLib.isEmpty(obj.CA10A1__logging__c)) { throw new Error("UNDETERMINED condition:201", {cause: {status: 'UNDETERMINED', conditionIndex: 201, conditionText: "CA10A1__logging__c.delegatedTo(CA10A1__logging__c).isEmpty()", currentStateMessage: "Cluster Logging cannot be empty. Possible permission issues with eks:DescribeCluster.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}}); } return obj.CA10A1__logging__c; } function extract11() { if (!this.out) { this.out = fieldChecked12(); } return this.out; }; function extract9() { if (!this.out) { this.out = CollectionLib.parse(extract11.call(extract11), '\n', true, true, true, true); } return this.out; }; try { if (CollectionLib.contains(extract9.call(extract9), 'audit: Disabled', true)) { return {status: 'INCOMPLIANT', conditionIndex: 299, conditionText: "extract('caSetFrom_logging__c').contains('audit: Disabled')", currentStateMessage: "EKS cluster control plane logging is not configured for audit logs.", currentStateReferences: references1.join('\n'), remediation: "Enable audit logs in EKS control plane logging.", runtimeError: null}; } } catch (err) { if (err.cause && err.cause.status) { return err.cause; } else { throw err; } } // condition[3], conditionIndex:[300..399] function fieldChecked18() { if (TextLib.isEmpty(obj.CA10A1__logging__c)) { throw new Error("UNDETERMINED condition:301", {cause: {status: 'UNDETERMINED', conditionIndex: 301, conditionText: "CA10A1__logging__c.delegatedTo(CA10A1__logging__c).isEmpty()", currentStateMessage: "Cluster Logging cannot be empty. Possible permission issues with eks:DescribeCluster.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}}); } return obj.CA10A1__logging__c; } function extract17() { if (!this.out) { this.out = fieldChecked18(); } return this.out; }; function extract15() { if (!this.out) { this.out = CollectionLib.parse(extract17.call(extract17), '\n', true, true, true, true); } return this.out; }; try { if (CollectionLib.contains(extract15.call(extract15), 'authenticator: Disabled', true)) { return {status: 'INCOMPLIANT', conditionIndex: 399, conditionText: "extract('caSetFrom_logging__c').contains('authenticator: Disabled')", currentStateMessage: "EKS cluster control plane logging is not configured for authenticator logs.", currentStateReferences: references1.join('\n'), remediation: "Enable authenticator logs in EKS control plane logging.", runtimeError: null}; } } catch (err) { if (err.cause && err.cause.status) { return err.cause; } else { throw err; } } // condition[4], conditionIndex:[400..499] function fieldChecked24() { if (TextLib.isEmpty(obj.CA10A1__logging__c)) { throw new Error("UNDETERMINED condition:401", {cause: {status: 'UNDETERMINED', conditionIndex: 401, conditionText: "CA10A1__logging__c.delegatedTo(CA10A1__logging__c).isEmpty()", currentStateMessage: "Cluster Logging cannot be empty. Possible permission issues with eks:DescribeCluster.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}}); } return obj.CA10A1__logging__c; } function extract23() { if (!this.out) { this.out = fieldChecked24(); } return this.out; }; function extract21() { if (!this.out) { this.out = CollectionLib.parse(extract23.call(extract23), '\n', true, true, true, true); } return this.out; }; try { if (CollectionLib.contains(extract21.call(extract21), 'controllerManager: Disabled', true)) { return {status: 'INCOMPLIANT', conditionIndex: 499, conditionText: "extract('caSetFrom_logging__c').contains('controllerManager: Disabled')", currentStateMessage: "EKS cluster control plane logging is not configured for controller manager logs.", currentStateReferences: references1.join('\n'), remediation: "Enable controller manager logs in EKS control plane logging.", runtimeError: null}; } } catch (err) { if (err.cause && err.cause.status) { return err.cause; } else { throw err; } } // condition[5], conditionIndex:[500..599] function fieldChecked30() { if (TextLib.isEmpty(obj.CA10A1__logging__c)) { throw new Error("UNDETERMINED condition:501", {cause: {status: 'UNDETERMINED', conditionIndex: 501, conditionText: "CA10A1__logging__c.delegatedTo(CA10A1__logging__c).isEmpty()", currentStateMessage: "Cluster Logging cannot be empty. Possible permission issues with eks:DescribeCluster.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}}); } return obj.CA10A1__logging__c; } function extract29() { if (!this.out) { this.out = fieldChecked30(); } return this.out; }; function extract27() { if (!this.out) { this.out = CollectionLib.parse(extract29.call(extract29), '\n', true, true, true, true); } return this.out; }; try { if (CollectionLib.contains(extract27.call(extract27), 'scheduler: Disabled', true)) { return {status: 'INCOMPLIANT', conditionIndex: 599, conditionText: "extract('caSetFrom_logging__c').contains('scheduler: Disabled')", currentStateMessage: "EKS cluster control plane logging is not configured for scheduler logs.", currentStateReferences: references1.join('\n'), remediation: "Enable scheduler logs in EKS control plane logging.", runtimeError: null}; } } catch (err) { if (err.cause && err.cause.status) { return err.cause; } else { throw err; } } return {status: 'COMPLIANT', conditionIndex: 600, conditionText: "otherwise", currentStateMessage: "EKS cluster logging is configured for all control plane log types.", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null}; """; SELECT expectedResult.Id as Id, IF ( IFNULL(expectedResult.expectedResult.status, '') = IFNULL(sObject.result.status, '') AND IFNULL(expectedResult.expectedResult.conditionIndex, -1) = IFNULL(sObject.result.conditionIndex, -1) AND IFNULL(expectedResult.expectedResult.conditionText, '') = IFNULL(sObject.result.conditionText, '') AND IFNULL(expectedResult.expectedResult.runtimeError, '') = IFNULL(sObject.result.runtimeError, ''), "MATCH", "FAIL" ) as match, expectedResult.expectedResult.status as expectedStatus, sObject.result.status as actualStatus, expectedResult.expectedResult.conditionIndex as expectedConditionIndex, sObject.result.conditionIndex as actualConditionIndex, expectedResult.expectedResult.conditionText as expectedConditionText, sObject.result.conditionText as actualConditionText, expectedResult.expectedResult.runtimeError as expectedRuntimeError, sObject.result.runtimeError as actualRuntimeError FROM UNNEST(mock_ExpectedResult()) expectedResult LEFT JOIN ( SELECT sObject.CA10A1__disappearanceTime__c AS CA10A1__disappearanceTime__c, sObject.CA10A1__logging__c AS CA10A1__logging__c, sObject.Id AS Id, process_CA10A1__CaAwsEksCluster__c( STRUCT( sObject.CA10A1__disappearanceTime__c AS CA10A1__disappearanceTime__c, sObject.CA10A1__logging__c AS CA10A1__logging__c, sObject.Id AS Id ), sObject.context.snapshotTime ) as result FROM UNNEST(mock_CA10A1__CaAwsEksCluster__c()) AS sObject ) sObject ON sObject.Id = expectedResult.Id;