From 8dbd0befe84f4e6427cfc4e66e2e967bc676fd94 Mon Sep 17 00:00:00 2001 From: Bruce Weygandt Date: Tue, 17 Nov 2026 13:48:45 -0700 Subject: [PATCH 1/2] validators: add Azure Velero, flexible server backup, endpoint availability and AKS node OS validators --- ...aks_node_os_auto_upgrade_all_clusters.yaml | 33 +++++++++++++++++++ ...ure_aks_node_os_upgrade_channel_known.yaml | 21 ++++++++++++ ...ndpoint_availability_endpoints_tested.yaml | 21 ++++++++++++ ...endpoint_availability_lb_metrics_read.yaml | 21 ++++++++++++ ..._endpoint_availability_lbs_all_judged.yaml | 21 ++++++++++++ ...point_availability_lbs_fully_measured.yaml | 21 ++++++++++++ ...endpoint_availability_lbs_meet_target.yaml | 21 ++++++++++++ ...re_endpoint_availability_results_read.yaml | 21 ++++++++++++ ...zure_endpoint_availability_target_set.yaml | 17 ++++++++++ ...ndpoint_availability_tests_all_judged.yaml | 21 ++++++++++++ ..._availability_tests_check_application.yaml | 33 +++++++++++++++++++ ...int_availability_tests_fully_measured.yaml | 21 ++++++++++++ ...dpoint_availability_tests_meet_target.yaml | 21 ++++++++++++ ...endpoint_availability_tests_reporting.yaml | 21 ++++++++++++ ...erver_backups_automatic_within_window.yaml | 33 +++++++++++++++++++ ...flexible_server_backups_geo_redundant.yaml | 33 +++++++++++++++++++ ...le_server_backups_restore_dates_known.yaml | 21 ++++++++++++ ...ible_server_backups_restore_exercised.yaml | 21 ++++++++++++ ...e_server_backups_restore_lookback_set.yaml | 21 ++++++++++++ ..._server_backups_retention_as_required.yaml | 21 ++++++++++++ ...exible_server_backups_retention_known.yaml | 21 ++++++++++++ ...flexible_server_backups_retention_set.yaml | 21 ++++++++++++ ..._flexible_server_backups_servers_read.yaml | 33 +++++++++++++++++++ .../azure_velero_backup_locations_read.yaml | 33 +++++++++++++++++++ .../azure_velero_backup_records_readable.yaml | 21 ++++++++++++ ..._velero_backup_storage_geo_replicated.yaml | 33 +++++++++++++++++++ ..._velero_clean_restore_within_interval.yaml | 17 ++++++++++ ...elero_expected_schedules_have_backups.yaml | 21 ++++++++++++ .../azure_velero_expected_schedules_set.yaml | 21 ++++++++++++ .../azure_velero_expired_backups_removed.yaml | 21 ++++++++++++ ...azure_velero_no_missed_scheduled_runs.yaml | 21 ++++++++++++ .../azure_velero_no_schedule_exceeds_rpo.yaml | 21 ++++++++++++ ...e_velero_no_unresolved_failed_backups.yaml | 21 ++++++++++++ ...ro_no_unresolved_incomplete_snapshots.yaml | 21 ++++++++++++ ...e_velero_no_unresolved_restore_errors.yaml | 21 ++++++++++++ .../azure_velero_restore_dates_known.yaml | 21 ++++++++++++ ...azure_velero_restore_results_readable.yaml | 21 ++++++++++++ ...zure_velero_restore_test_interval_set.yaml | 21 ++++++++++++ .../_cases/azure_velero_restores_read.yaml | 17 ++++++++++ validators/_cases/azure_velero_rpo_set.yaml | 21 ++++++++++++ ...elero_schedules_succeed_within_window.yaml | 33 +++++++++++++++++++ .../_cases/set_EVD-AZURE-AKS-CONFIG.yaml | 9 +++++ .../set_EVD-AZURE-ENDPOINT-AVAILABILITY.yaml | 17 ++++++++++ ...set_EVD-AZURE-FLEXIBLE-SERVER-BACKUPS.yaml | 17 ++++++++++ .../_cases/set_EVD-AZURE-VELERO-BACKUPS.yaml | 17 ++++++++++ ...aks_node_os_auto_upgrade_all_clusters.yaml | 24 ++++++++++++++ ...ure_aks_node_os_upgrade_channel_known.yaml | 21 ++++++++++++ ...ndpoint_availability_endpoints_tested.yaml | 18 ++++++++++ ...endpoint_availability_lb_metrics_read.yaml | 20 +++++++++++ ..._endpoint_availability_lbs_all_judged.yaml | 20 +++++++++++ ...point_availability_lbs_fully_measured.yaml | 21 ++++++++++++ ...endpoint_availability_lbs_meet_target.yaml | 22 +++++++++++++ ...re_endpoint_availability_results_read.yaml | 21 ++++++++++++ ...zure_endpoint_availability_target_set.yaml | 18 ++++++++++ ...ndpoint_availability_tests_all_judged.yaml | 20 +++++++++++ ..._availability_tests_check_application.yaml | 22 +++++++++++++ ...int_availability_tests_fully_measured.yaml | 22 +++++++++++++ ...dpoint_availability_tests_meet_target.yaml | 21 ++++++++++++ ...endpoint_availability_tests_reporting.yaml | 21 ++++++++++++ ...erver_backups_automatic_within_window.yaml | 21 ++++++++++++ ...flexible_server_backups_geo_redundant.yaml | 21 ++++++++++++ ...le_server_backups_restore_dates_known.yaml | 21 ++++++++++++ ...ible_server_backups_restore_exercised.yaml | 20 +++++++++++ ...e_server_backups_restore_lookback_set.yaml | 18 ++++++++++ ..._server_backups_retention_as_required.yaml | 19 +++++++++++ ...exible_server_backups_retention_known.yaml | 20 +++++++++++ ...flexible_server_backups_retention_set.yaml | 18 ++++++++++ ..._flexible_server_backups_servers_read.yaml | 21 ++++++++++++ .../azure_velero_backup_locations_read.yaml | 21 ++++++++++++ .../azure_velero_backup_records_readable.yaml | 21 ++++++++++++ ..._velero_backup_storage_geo_replicated.yaml | 24 ++++++++++++++ ..._velero_clean_restore_within_interval.yaml | 21 ++++++++++++ ...elero_expected_schedules_have_backups.yaml | 20 +++++++++++ .../azure_velero_expected_schedules_set.yaml | 19 +++++++++++ .../azure_velero_expired_backups_removed.yaml | 22 +++++++++++++ ...azure_velero_no_missed_scheduled_runs.yaml | 21 ++++++++++++ .../azure_velero_no_schedule_exceeds_rpo.yaml | 18 ++++++++++ ...e_velero_no_unresolved_failed_backups.yaml | 22 +++++++++++++ ...ro_no_unresolved_incomplete_snapshots.yaml | 23 +++++++++++++ ...e_velero_no_unresolved_restore_errors.yaml | 24 ++++++++++++++ .../azure_velero_restore_dates_known.yaml | 20 +++++++++++ ...azure_velero_restore_results_readable.yaml | 21 ++++++++++++ ...zure_velero_restore_test_interval_set.yaml | 18 ++++++++++ .../azure/azure_velero_restores_read.yaml | 18 ++++++++++ validators/azure/azure_velero_rpo_set.yaml | 18 ++++++++++ ...elero_schedules_succeed_within_window.yaml | 24 ++++++++++++++ validators/common/collection_succeeded.yaml | 3 ++ 87 files changed, 1853 insertions(+) create mode 100644 validators/_cases/azure_aks_node_os_auto_upgrade_all_clusters.yaml create mode 100644 validators/_cases/azure_aks_node_os_upgrade_channel_known.yaml create mode 100644 validators/_cases/azure_endpoint_availability_endpoints_tested.yaml create mode 100644 validators/_cases/azure_endpoint_availability_lb_metrics_read.yaml create mode 100644 validators/_cases/azure_endpoint_availability_lbs_all_judged.yaml create mode 100644 validators/_cases/azure_endpoint_availability_lbs_fully_measured.yaml create mode 100644 validators/_cases/azure_endpoint_availability_lbs_meet_target.yaml create mode 100644 validators/_cases/azure_endpoint_availability_results_read.yaml create mode 100644 validators/_cases/azure_endpoint_availability_target_set.yaml create mode 100644 validators/_cases/azure_endpoint_availability_tests_all_judged.yaml create mode 100644 validators/_cases/azure_endpoint_availability_tests_check_application.yaml create mode 100644 validators/_cases/azure_endpoint_availability_tests_fully_measured.yaml create mode 100644 validators/_cases/azure_endpoint_availability_tests_meet_target.yaml create mode 100644 validators/_cases/azure_endpoint_availability_tests_reporting.yaml create mode 100644 validators/_cases/azure_flexible_server_backups_automatic_within_window.yaml create mode 100644 validators/_cases/azure_flexible_server_backups_geo_redundant.yaml create mode 100644 validators/_cases/azure_flexible_server_backups_restore_dates_known.yaml create mode 100644 validators/_cases/azure_flexible_server_backups_restore_exercised.yaml create mode 100644 validators/_cases/azure_flexible_server_backups_restore_lookback_set.yaml create mode 100644 validators/_cases/azure_flexible_server_backups_retention_as_required.yaml create mode 100644 validators/_cases/azure_flexible_server_backups_retention_known.yaml create mode 100644 validators/_cases/azure_flexible_server_backups_retention_set.yaml create mode 100644 validators/_cases/azure_flexible_server_backups_servers_read.yaml create mode 100644 validators/_cases/azure_velero_backup_locations_read.yaml create mode 100644 validators/_cases/azure_velero_backup_records_readable.yaml create mode 100644 validators/_cases/azure_velero_backup_storage_geo_replicated.yaml create mode 100644 validators/_cases/azure_velero_clean_restore_within_interval.yaml create mode 100644 validators/_cases/azure_velero_expected_schedules_have_backups.yaml create mode 100644 validators/_cases/azure_velero_expected_schedules_set.yaml create mode 100644 validators/_cases/azure_velero_expired_backups_removed.yaml create mode 100644 validators/_cases/azure_velero_no_missed_scheduled_runs.yaml create mode 100644 validators/_cases/azure_velero_no_schedule_exceeds_rpo.yaml create mode 100644 validators/_cases/azure_velero_no_unresolved_failed_backups.yaml create mode 100644 validators/_cases/azure_velero_no_unresolved_incomplete_snapshots.yaml create mode 100644 validators/_cases/azure_velero_no_unresolved_restore_errors.yaml create mode 100644 validators/_cases/azure_velero_restore_dates_known.yaml create mode 100644 validators/_cases/azure_velero_restore_results_readable.yaml create mode 100644 validators/_cases/azure_velero_restore_test_interval_set.yaml create mode 100644 validators/_cases/azure_velero_restores_read.yaml create mode 100644 validators/_cases/azure_velero_rpo_set.yaml create mode 100644 validators/_cases/azure_velero_schedules_succeed_within_window.yaml create mode 100644 validators/_cases/set_EVD-AZURE-AKS-CONFIG.yaml create mode 100644 validators/_cases/set_EVD-AZURE-ENDPOINT-AVAILABILITY.yaml create mode 100644 validators/_cases/set_EVD-AZURE-FLEXIBLE-SERVER-BACKUPS.yaml create mode 100644 validators/_cases/set_EVD-AZURE-VELERO-BACKUPS.yaml create mode 100644 validators/azure/azure_aks_node_os_auto_upgrade_all_clusters.yaml create mode 100644 validators/azure/azure_aks_node_os_upgrade_channel_known.yaml create mode 100644 validators/azure/azure_endpoint_availability_endpoints_tested.yaml create mode 100644 validators/azure/azure_endpoint_availability_lb_metrics_read.yaml create mode 100644 validators/azure/azure_endpoint_availability_lbs_all_judged.yaml create mode 100644 validators/azure/azure_endpoint_availability_lbs_fully_measured.yaml create mode 100644 validators/azure/azure_endpoint_availability_lbs_meet_target.yaml create mode 100644 validators/azure/azure_endpoint_availability_results_read.yaml create mode 100644 validators/azure/azure_endpoint_availability_target_set.yaml create mode 100644 validators/azure/azure_endpoint_availability_tests_all_judged.yaml create mode 100644 validators/azure/azure_endpoint_availability_tests_check_application.yaml create mode 100644 validators/azure/azure_endpoint_availability_tests_fully_measured.yaml create mode 100644 validators/azure/azure_endpoint_availability_tests_meet_target.yaml create mode 100644 validators/azure/azure_endpoint_availability_tests_reporting.yaml create mode 100644 validators/azure/azure_flexible_server_backups_automatic_within_window.yaml create mode 100644 validators/azure/azure_flexible_server_backups_geo_redundant.yaml create mode 100644 validators/azure/azure_flexible_server_backups_restore_dates_known.yaml create mode 100644 validators/azure/azure_flexible_server_backups_restore_exercised.yaml create mode 100644 validators/azure/azure_flexible_server_backups_restore_lookback_set.yaml create mode 100644 validators/azure/azure_flexible_server_backups_retention_as_required.yaml create mode 100644 validators/azure/azure_flexible_server_backups_retention_known.yaml create mode 100644 validators/azure/azure_flexible_server_backups_retention_set.yaml create mode 100644 validators/azure/azure_flexible_server_backups_servers_read.yaml create mode 100644 validators/azure/azure_velero_backup_locations_read.yaml create mode 100644 validators/azure/azure_velero_backup_records_readable.yaml create mode 100644 validators/azure/azure_velero_backup_storage_geo_replicated.yaml create mode 100644 validators/azure/azure_velero_clean_restore_within_interval.yaml create mode 100644 validators/azure/azure_velero_expected_schedules_have_backups.yaml create mode 100644 validators/azure/azure_velero_expected_schedules_set.yaml create mode 100644 validators/azure/azure_velero_expired_backups_removed.yaml create mode 100644 validators/azure/azure_velero_no_missed_scheduled_runs.yaml create mode 100644 validators/azure/azure_velero_no_schedule_exceeds_rpo.yaml create mode 100644 validators/azure/azure_velero_no_unresolved_failed_backups.yaml create mode 100644 validators/azure/azure_velero_no_unresolved_incomplete_snapshots.yaml create mode 100644 validators/azure/azure_velero_no_unresolved_restore_errors.yaml create mode 100644 validators/azure/azure_velero_restore_dates_known.yaml create mode 100644 validators/azure/azure_velero_restore_results_readable.yaml create mode 100644 validators/azure/azure_velero_restore_test_interval_set.yaml create mode 100644 validators/azure/azure_velero_restores_read.yaml create mode 100644 validators/azure/azure_velero_rpo_set.yaml create mode 100644 validators/azure/azure_velero_schedules_succeed_within_window.yaml diff --git a/validators/_cases/azure_aks_node_os_auto_upgrade_all_clusters.yaml b/validators/_cases/azure_aks_node_os_auto_upgrade_all_clusters.yaml new file mode 100644 index 00000000..9d32365a --- /dev/null +++ b/validators/_cases/azure_aks_node_os_auto_upgrade_all_clusters.yaml @@ -0,0 +1,33 @@ +validator: azure_aks_node_os_auto_upgrade_all_clusters +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 2, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters": 2}}}' + + - name: all_covered_at_ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 20, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters": 20}}}' + + - name: one_not_covered + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 2, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters": 3}}}' + + - name: one_not_covered_at_ten_times_scale + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 19, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters": 20}}}' + + - name: empty_population + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 0, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters": 0}}}' + + - name: node_os_auto_upgrade_clusters_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": null, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters": 2}}}' + + - name: total_clusters_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 2, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters_renamed": 2}}}' + + - name: node_os_auto_upgrade_clusters_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters_renamed": 2, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters": 2}}}' diff --git a/validators/_cases/azure_aks_node_os_upgrade_channel_known.yaml b/validators/_cases/azure_aks_node_os_upgrade_channel_known.yaml new file mode 100644 index 00000000..29d51293 --- /dev/null +++ b/validators/_cases/azure_aks_node_os_upgrade_channel_known.yaml @@ -0,0 +1,21 @@ +validator: azure_aks_node_os_upgrade_channel_known +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 2, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters": 2}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 2, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 1, "total_agent_pools": 3, "total_clusters": 2}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 2, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 10, "total_agent_pools": 3, "total_clusters": 2}}}' + + - name: node_os_upgrade_channel_unknown_clusters_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 2, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": null, "total_agent_pools": 3, "total_clusters": 2}}}' + + - name: node_os_upgrade_channel_unknown_clusters_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 2, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters_renamed": 0, "total_agent_pools": 3, "total_clusters": 2}}}' diff --git a/validators/_cases/azure_endpoint_availability_endpoints_tested.yaml b/validators/_cases/azure_endpoint_availability_endpoints_tested.yaml new file mode 100644 index 00000000..815a8383 --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_endpoints_tested.yaml @@ -0,0 +1,21 @@ +validator: azure_endpoint_availability_endpoints_tested +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 30, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: not_configured_reads_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": null, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: zero + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 0, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: endpoints_tested_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested_renamed": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_lb_metrics_read.yaml b/validators/_cases/azure_endpoint_availability_lb_metrics_read.yaml new file mode 100644 index 00000000..7c6790bc --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_lb_metrics_read.yaml @@ -0,0 +1,21 @@ +validator: azure_endpoint_availability_lb_metrics_read +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 1, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 10, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: load_balancers_metrics_unread_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": null, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: load_balancers_metrics_unread_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread_renamed": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_lbs_all_judged.yaml b/validators/_cases/azure_endpoint_availability_lbs_all_judged.yaml new file mode 100644 index 00000000..8a77a5e3 --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_lbs_all_judged.yaml @@ -0,0 +1,21 @@ +validator: azure_endpoint_availability_lbs_all_judged +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: not_configured_reads_null + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": null, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 1, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 10, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: load_balancers_not_judged_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged_renamed": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_lbs_fully_measured.yaml b/validators/_cases/azure_endpoint_availability_lbs_fully_measured.yaml new file mode 100644 index 00000000..12adda4e --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_lbs_fully_measured.yaml @@ -0,0 +1,21 @@ +validator: azure_endpoint_availability_lbs_fully_measured +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 1, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 10, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: load_balancers_with_missing_measurements_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": null, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: load_balancers_with_missing_measurements_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements_renamed": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_lbs_meet_target.yaml b/validators/_cases/azure_endpoint_availability_lbs_meet_target.yaml new file mode 100644 index 00000000..0ce79233 --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_lbs_meet_target.yaml @@ -0,0 +1,21 @@ +validator: azure_endpoint_availability_lbs_meet_target +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: not_configured_reads_null + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": null, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 1, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 10, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: load_balancers_below_target_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target_renamed": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_results_read.yaml b/validators/_cases/azure_endpoint_availability_results_read.yaml new file mode 100644 index 00000000..dbaadc46 --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_results_read.yaml @@ -0,0 +1,21 @@ +validator: azure_endpoint_availability_results_read +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 1, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 10, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_results_unread_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": null, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_results_unread_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread_renamed": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_target_set.yaml b/validators/_cases/azure_endpoint_availability_target_set.yaml new file mode 100644 index 00000000..fee4ea94 --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_target_set.yaml @@ -0,0 +1,17 @@ +validator: azure_endpoint_availability_target_set +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: whole_number + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: not_configured_reads_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": null, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_target_percentage_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage_renamed": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_tests_all_judged.yaml b/validators/_cases/azure_endpoint_availability_tests_all_judged.yaml new file mode 100644 index 00000000..fc32ef0c --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_tests_all_judged.yaml @@ -0,0 +1,21 @@ +validator: azure_endpoint_availability_tests_all_judged +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: not_configured_reads_null + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": null, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 1, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 10, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_not_judged_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged_renamed": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_tests_check_application.yaml b/validators/_cases/azure_endpoint_availability_tests_check_application.yaml new file mode 100644 index 00000000..97a4d3a2 --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_tests_check_application.yaml @@ -0,0 +1,33 @@ +validator: azure_endpoint_availability_tests_check_application +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: all_covered_at_ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 20, "availability_tests_enabled": 20, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_not_covered + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 2, "availability_tests_enabled": 3, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_not_covered_at_ten_times_scale + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 19, "availability_tests_enabled": 20, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: empty_population + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 0, "availability_tests_enabled": 0, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_checking_application_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": null, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_enabled_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled_renamed": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_checking_application_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application_renamed": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_tests_fully_measured.yaml b/validators/_cases/azure_endpoint_availability_tests_fully_measured.yaml new file mode 100644 index 00000000..b8cf5d14 --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_tests_fully_measured.yaml @@ -0,0 +1,21 @@ +validator: azure_endpoint_availability_tests_fully_measured +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 1, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 10, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_with_missing_measurements_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": null, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_with_missing_measurements_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements_renamed": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_tests_meet_target.yaml b/validators/_cases/azure_endpoint_availability_tests_meet_target.yaml new file mode 100644 index 00000000..7e468f15 --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_tests_meet_target.yaml @@ -0,0 +1,21 @@ +validator: azure_endpoint_availability_tests_meet_target +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: not_configured_reads_null + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": null, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 1, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 10, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_below_target_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target_latest_hour": 0, "availability_tests_below_target_renamed": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_tests_reporting.yaml b/validators/_cases/azure_endpoint_availability_tests_reporting.yaml new file mode 100644 index 00000000..43cf294e --- /dev/null +++ b/validators/_cases/azure_endpoint_availability_tests_reporting.yaml @@ -0,0 +1,21 @@ +validator: azure_endpoint_availability_tests_reporting +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 1, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 10, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_without_data_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": null, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: availability_tests_without_data_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data_renamed": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_flexible_server_backups_automatic_within_window.yaml b/validators/_cases/azure_flexible_server_backups_automatic_within_window.yaml new file mode 100644 index 00000000..dcd1270f --- /dev/null +++ b/validators/_cases/azure_flexible_server_backups_automatic_within_window.yaml @@ -0,0 +1,33 @@ +validator: azure_flexible_server_backups_automatic_within_window +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: all_covered_at_ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 20, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 20, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: one_not_covered + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 3, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: one_not_covered_at_ten_times_scale + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 20, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 19, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: empty_population + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 0, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 0, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: servers_with_automatic_backup_within_window_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": null, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: backup_servers_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers_read": 2, "backup_servers_renamed": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: servers_with_automatic_backup_within_window_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window_renamed": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_flexible_server_backups_geo_redundant.yaml b/validators/_cases/azure_flexible_server_backups_geo_redundant.yaml new file mode 100644 index 00000000..a6fb2e19 --- /dev/null +++ b/validators/_cases/azure_flexible_server_backups_geo_redundant.yaml @@ -0,0 +1,33 @@ +validator: azure_flexible_server_backups_geo_redundant +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: all_covered_at_ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 20, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 20, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: one_not_covered + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 3, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: one_not_covered_at_ten_times_scale + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 20, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 19, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: empty_population + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 0, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 0, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: servers_geo_redundant_backup_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": null, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: backup_servers_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers_read": 2, "backup_servers_renamed": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: servers_geo_redundant_backup_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup_renamed": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_flexible_server_backups_restore_dates_known.yaml b/validators/_cases/azure_flexible_server_backups_restore_dates_known.yaml new file mode 100644 index 00000000..27c4b1b1 --- /dev/null +++ b/validators/_cases/azure_flexible_server_backups_restore_dates_known.yaml @@ -0,0 +1,21 @@ +validator: azure_flexible_server_backups_restore_dates_known +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 1, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 10, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: restored_servers_date_unknown_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": null, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: restored_servers_date_unknown_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown_renamed": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_flexible_server_backups_restore_exercised.yaml b/validators/_cases/azure_flexible_server_backups_restore_exercised.yaml new file mode 100644 index 00000000..879fa4c9 --- /dev/null +++ b/validators/_cases/azure_flexible_server_backups_restore_exercised.yaml @@ -0,0 +1,21 @@ +validator: azure_flexible_server_backups_restore_exercised +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: ten_restored + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 10, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: not_configured_reads_null + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": null, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: none_within_lookback + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 0, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: restored_servers_within_lookback_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback_renamed": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_flexible_server_backups_restore_lookback_set.yaml b/validators/_cases/azure_flexible_server_backups_restore_lookback_set.yaml new file mode 100644 index 00000000..69becafc --- /dev/null +++ b/validators/_cases/azure_flexible_server_backups_restore_lookback_set.yaml @@ -0,0 +1,21 @@ +validator: azure_flexible_server_backups_restore_lookback_set +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 30, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: not_configured_reads_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": null, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: zero + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 0, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: restore_lookback_days_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days_renamed": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_flexible_server_backups_retention_as_required.yaml b/validators/_cases/azure_flexible_server_backups_retention_as_required.yaml new file mode 100644 index 00000000..8cdb5f0f --- /dev/null +++ b/validators/_cases/azure_flexible_server_backups_retention_as_required.yaml @@ -0,0 +1,21 @@ +validator: azure_flexible_server_backups_retention_as_required +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: not_configured_reads_null + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": null, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 1, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 10, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: servers_retention_below_required_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required_renamed": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_flexible_server_backups_retention_known.yaml b/validators/_cases/azure_flexible_server_backups_retention_known.yaml new file mode 100644 index 00000000..ad79b7d4 --- /dev/null +++ b/validators/_cases/azure_flexible_server_backups_retention_known.yaml @@ -0,0 +1,21 @@ +validator: azure_flexible_server_backups_retention_known +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 1, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 10, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: servers_retention_unknown_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": null, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: servers_retention_unknown_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown_renamed": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_flexible_server_backups_retention_set.yaml b/validators/_cases/azure_flexible_server_backups_retention_set.yaml new file mode 100644 index 00000000..a2cd66ae --- /dev/null +++ b/validators/_cases/azure_flexible_server_backups_retention_set.yaml @@ -0,0 +1,21 @@ +validator: azure_flexible_server_backups_retention_set +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 30, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: not_configured_reads_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": null, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: zero + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: required_retention_days_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days_renamed": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_flexible_server_backups_servers_read.yaml b/validators/_cases/azure_flexible_server_backups_servers_read.yaml new file mode 100644 index 00000000..ffb50977 --- /dev/null +++ b/validators/_cases/azure_flexible_server_backups_servers_read.yaml @@ -0,0 +1,33 @@ +validator: azure_flexible_server_backups_servers_read +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: all_covered_at_ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 20, "backup_servers_read": 20, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: one_not_covered + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 3, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: one_not_covered_at_ten_times_scale + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 20, "backup_servers_read": 19, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: empty_population + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 0, "backup_servers_read": 0, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: backup_servers_read_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": null, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: backup_servers_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers_read": 2, "backup_servers_renamed": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: backup_servers_read_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read_renamed": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_velero_backup_locations_read.yaml b/validators/_cases/azure_velero_backup_locations_read.yaml new file mode 100644 index 00000000..b9ca9b1f --- /dev/null +++ b/validators/_cases/azure_velero_backup_locations_read.yaml @@ -0,0 +1,33 @@ +validator: azure_velero_backup_locations_read +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: all_covered_at_ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 20, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 20, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_not_covered + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 3, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 2, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_not_covered_at_ten_times_scale + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 20, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 19, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: empty_population + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 0, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 0, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backup_locations_read_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": null, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backup_locations_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backup_locations_renamed": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backup_locations_read_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read_renamed": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_backup_records_readable.yaml b/validators/_cases/azure_velero_backup_records_readable.yaml new file mode 100644 index 00000000..99d345f0 --- /dev/null +++ b/validators/_cases/azure_velero_backup_records_readable.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_backup_records_readable +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 1, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 10, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backups_metadata_unreadable_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": null, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backups_metadata_unreadable_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable_renamed": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_backup_storage_geo_replicated.yaml b/validators/_cases/azure_velero_backup_storage_geo_replicated.yaml new file mode 100644 index 00000000..780e863a --- /dev/null +++ b/validators/_cases/azure_velero_backup_storage_geo_replicated.yaml @@ -0,0 +1,33 @@ +validator: azure_velero_backup_storage_geo_replicated +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: all_covered_at_ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 20, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 20, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_not_covered + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 3, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 2, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_not_covered_at_ten_times_scale + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 20, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 19, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: empty_population + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 0, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 0, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backup_locations_geo_replicated_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": null, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backup_locations_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backup_locations_renamed": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backup_locations_geo_replicated_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated_renamed": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_clean_restore_within_interval.yaml b/validators/_cases/azure_velero_clean_restore_within_interval.yaml new file mode 100644 index 00000000..8c7be641 --- /dev/null +++ b/validators/_cases/azure_velero_clean_restore_within_interval.yaml @@ -0,0 +1,17 @@ +validator: azure_velero_clean_restore_within_interval +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: not_configured_reads_null + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": null, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: too_old + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": false, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: clean_restore_within_interval_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval_renamed": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_expected_schedules_have_backups.yaml b/validators/_cases/azure_velero_expected_schedules_have_backups.yaml new file mode 100644 index 00000000..d69662b9 --- /dev/null +++ b/validators/_cases/azure_velero_expected_schedules_have_backups.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_expected_schedules_have_backups +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: not_configured_reads_null + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": null, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 1, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 10, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: expected_schedules_without_backups_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups_names": [], "expected_schedules_without_backups_renamed": 0, "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_expected_schedules_set.yaml b/validators/_cases/azure_velero_expected_schedules_set.yaml new file mode 100644 index 00000000..ac218ec5 --- /dev/null +++ b/validators/_cases/azure_velero_expected_schedules_set.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_expected_schedules_set +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 30, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: not_configured_reads_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": null, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: zero + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 0, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: expected_schedules_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules_renamed": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_expired_backups_removed.yaml b/validators/_cases/azure_velero_expired_backups_removed.yaml new file mode 100644 index 00000000..a55e533d --- /dev/null +++ b/validators/_cases/azure_velero_expired_backups_removed.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_expired_backups_removed +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 1, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 10, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: expired_backups_not_deleted_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": null, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: expired_backups_not_deleted_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted_renamed": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_no_missed_scheduled_runs.yaml b/validators/_cases/azure_velero_no_missed_scheduled_runs.yaml new file mode 100644 index 00000000..3b60883b --- /dev/null +++ b/validators/_cases/azure_velero_no_missed_scheduled_runs.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_no_missed_scheduled_runs +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: not_configured_reads_null + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": null, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 1, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 10, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: missed_scheduled_runs_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs_renamed": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_no_schedule_exceeds_rpo.yaml b/validators/_cases/azure_velero_no_schedule_exceeds_rpo.yaml new file mode 100644 index 00000000..8cda014b --- /dev/null +++ b/validators/_cases/azure_velero_no_schedule_exceeds_rpo.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_no_schedule_exceeds_rpo +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: not_configured_reads_null + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": null, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 1, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 10, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: schedules_exceeding_rpo_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo_renamed": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_no_unresolved_failed_backups.yaml b/validators/_cases/azure_velero_no_unresolved_failed_backups.yaml new file mode 100644 index 00000000..fbd637eb --- /dev/null +++ b/validators/_cases/azure_velero_no_unresolved_failed_backups.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_no_unresolved_failed_backups +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 1, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 10, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backups_failed_unresolved_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": null, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backups_failed_unresolved_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved_renamed": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_no_unresolved_incomplete_snapshots.yaml b/validators/_cases/azure_velero_no_unresolved_incomplete_snapshots.yaml new file mode 100644 index 00000000..5b17cee3 --- /dev/null +++ b/validators/_cases/azure_velero_no_unresolved_incomplete_snapshots.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_no_unresolved_incomplete_snapshots +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 1, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 10, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backups_volume_snapshots_incomplete_unresolved_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": null, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: backups_volume_snapshots_incomplete_unresolved_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved_renamed": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_no_unresolved_restore_errors.yaml b/validators/_cases/azure_velero_no_unresolved_restore_errors.yaml new file mode 100644 index 00000000..a293b502 --- /dev/null +++ b/validators/_cases/azure_velero_no_unresolved_restore_errors.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_no_unresolved_restore_errors +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 1, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 10, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: restores_with_errors_unresolved_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": null, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: restores_with_errors_unresolved_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved_renamed": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_restore_dates_known.yaml b/validators/_cases/azure_velero_restore_dates_known.yaml new file mode 100644 index 00000000..887be808 --- /dev/null +++ b/validators/_cases/azure_velero_restore_dates_known.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_restore_dates_known +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 1, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 10, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: restores_date_unknown_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": null, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: restores_date_unknown_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown_renamed": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_restore_results_readable.yaml b/validators/_cases/azure_velero_restore_results_readable.yaml new file mode 100644 index 00000000..de217ff3 --- /dev/null +++ b/validators/_cases/azure_velero_restore_results_readable.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_restore_results_readable +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 1, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_found + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 10, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: restores_results_missing_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": null, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: restores_results_missing_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing_renamed": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_restore_test_interval_set.yaml b/validators/_cases/azure_velero_restore_test_interval_set.yaml new file mode 100644 index 00000000..6290c2d6 --- /dev/null +++ b/validators/_cases/azure_velero_restore_test_interval_set.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_restore_test_interval_set +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: not_configured_reads_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": null, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: zero + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 0, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: restore_test_interval_days_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days_renamed": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_restores_read.yaml b/validators/_cases/azure_velero_restores_read.yaml new file mode 100644 index 00000000..0af8abd8 --- /dev/null +++ b/validators/_cases/azure_velero_restores_read.yaml @@ -0,0 +1,17 @@ +validator: azure_velero_restores_read +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: none_recorded + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 0, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: unread_reads_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": null, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: restores_total_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total_renamed": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_rpo_set.yaml b/validators/_cases/azure_velero_rpo_set.yaml new file mode 100644 index 00000000..25c6dca2 --- /dev/null +++ b/validators/_cases/azure_velero_rpo_set.yaml @@ -0,0 +1,21 @@ +validator: azure_velero_rpo_set +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 30, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: not_configured_reads_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": null, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: zero + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 0, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: rpo_hours_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours_renamed": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_schedules_succeed_within_window.yaml b/validators/_cases/azure_velero_schedules_succeed_within_window.yaml new file mode 100644 index 00000000..bdd17b03 --- /dev/null +++ b/validators/_cases/azure_velero_schedules_succeed_within_window.yaml @@ -0,0 +1,33 @@ +validator: azure_velero_schedules_succeed_within_window +cases: + - name: compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: all_covered_at_ten_times_scale + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 20, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 20, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_not_covered + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 3, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 2, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_not_covered_at_ten_times_scale + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 20, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 19, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: empty_population + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 0, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 0, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: schedules_with_success_within_window_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": null, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: schedules_observed_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed_renamed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: schedules_with_success_within_window_renamed + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window_renamed": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/set_EVD-AZURE-AKS-CONFIG.yaml b/validators/_cases/set_EVD-AZURE-AKS-CONFIG.yaml new file mode 100644 index 00000000..bb9801fe --- /dev/null +++ b/validators/_cases/set_EVD-AZURE-AKS-CONFIG.yaml @@ -0,0 +1,9 @@ +evidence_set: EVD-AZURE-AKS-CONFIG +cases: + - name: all_configured_and_compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 2, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters": 2}}}' + + - name: one_check_failing + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"auto_upgrade_clusters": 2, "autoscaling_agent_pools": 2, "kubernetes_versions": ["1.30"], "node_os_auto_upgrade_clusters": 1, "node_os_unmanaged_clusters": 0, "node_os_upgrade_channel_unknown_clusters": 0, "total_agent_pools": 3, "total_clusters": 2}}}' diff --git a/validators/_cases/set_EVD-AZURE-ENDPOINT-AVAILABILITY.yaml b/validators/_cases/set_EVD-AZURE-ENDPOINT-AVAILABILITY.yaml new file mode 100644 index 00000000..d07aedee --- /dev/null +++ b/validators/_cases/set_EVD-AZURE-ENDPOINT-AVAILABILITY.yaml @@ -0,0 +1,17 @@ +evidence_set: EVD-AZURE-ENDPOINT-AVAILABILITY +cases: + - name: all_configured_and_compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: one_check_failing + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 1, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: undecided_values_not_set + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": null, "availability_tests_below_target": null, "availability_tests_below_target_latest_hour": null, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": null, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": null, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": null, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + + - name: collection_failed + expect: FAIL + artifact: '{"metadata": {"exit_code": 1, "status": "error"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/set_EVD-AZURE-FLEXIBLE-SERVER-BACKUPS.yaml b/validators/_cases/set_EVD-AZURE-FLEXIBLE-SERVER-BACKUPS.yaml new file mode 100644 index 00000000..4543fc1a --- /dev/null +++ b/validators/_cases/set_EVD-AZURE-FLEXIBLE-SERVER-BACKUPS.yaml @@ -0,0 +1,17 @@ +evidence_set: EVD-AZURE-FLEXIBLE-SERVER-BACKUPS +cases: + - name: all_configured_and_compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: one_check_failing + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 1, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: undecided_values_not_set + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": null, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": null, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": null, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": null, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + + - name: collection_failed + expect: FAIL + artifact: '{"metadata": {"exit_code": 1, "status": "error"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/set_EVD-AZURE-VELERO-BACKUPS.yaml b/validators/_cases/set_EVD-AZURE-VELERO-BACKUPS.yaml new file mode 100644 index 00000000..db4063c1 --- /dev/null +++ b/validators/_cases/set_EVD-AZURE-VELERO-BACKUPS.yaml @@ -0,0 +1,17 @@ +evidence_set: EVD-AZURE-VELERO-BACKUPS +cases: + - name: all_configured_and_compliant + expect: PASS + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: one_check_failing + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 2, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 1, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: undecided_values_not_set + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": null, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": null, "expected_schedules_without_backups": null, "expected_schedules_without_backups_names": null, "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": null, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": null, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": null, "schedules_exceeding_rpo": null, "schedules_observed": 1, "schedules_with_missed_runs": null, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + + - name: collection_failed + expect: FAIL + artifact: '{"metadata": {"exit_code": 1, "status": "error"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/azure/azure_aks_node_os_auto_upgrade_all_clusters.yaml b/validators/azure/azure_aks_node_os_auto_upgrade_all_clusters.yaml new file mode 100644 index 00000000..3f1759a7 --- /dev/null +++ b/validators/azure/azure_aks_node_os_auto_upgrade_all_clusters.yaml @@ -0,0 +1,24 @@ +key: azure_aks_node_os_auto_upgrade_all_clusters +name: 'Azure AKS: Every Cluster Patches Node OS Automatically' +type: AUTOMATED +role: configuration +statement: > + Every AKS cluster (at least one) has a node OS upgrade channel that replaces or patches node images + automatically (SecurityPatch or NodeImage). Unmanaged does not count: it leaves node images alone, + though the node OS may still install its own updates (counted in node_os_unmanaged_clusters); None + installs nothing. Supports automatic node OS patching only: an enabled channel does not show that + updates were applied, and Kubernetes version upgrades are a separate setting this does not check. + Does not check whether the collection run succeeded. + +regex: '"node_os_auto_upgrade_clusters":\s*(?\d+)[\s\S]*?"total_clusters":\s*(?[1-9]\d*)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS MATCH_GROUP[2] +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # node_os_auto_upgrade_clusters + criteria: EQUALS + value: { type: MATCH_GROUP, groupNumber: 2 } # total_clusters + +evidence_sets: + - EVD-AZURE-AKS-CONFIG diff --git a/validators/azure/azure_aks_node_os_upgrade_channel_known.yaml b/validators/azure/azure_aks_node_os_upgrade_channel_known.yaml new file mode 100644 index 00000000..66583d09 --- /dev/null +++ b/validators/azure/azure_aks_node_os_upgrade_channel_known.yaml @@ -0,0 +1,21 @@ +key: azure_aks_node_os_upgrade_channel_known +name: 'Azure AKS: Every Cluster''s Node OS Upgrade Channel Is Known' +type: AUTOMATED +role: integrity +statement: > + Azure returned a node OS upgrade channel for every cluster (node_os_upgrade_channel_unknown_clusters + is 0), so no cluster is left out of the automatic-patching count. Does not check whether the + collection run succeeded. + +regex: '"node_os_upgrade_channel_unknown_clusters":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # node_os_upgrade_channel_unknown_clusters + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-AKS-CONFIG diff --git a/validators/azure/azure_endpoint_availability_endpoints_tested.yaml b/validators/azure/azure_endpoint_availability_endpoints_tested.yaml new file mode 100644 index 00000000..a740f347 --- /dev/null +++ b/validators/azure/azure_endpoint_availability_endpoints_tested.yaml @@ -0,0 +1,18 @@ +key: azure_endpoint_availability_endpoints_tested +name: 'Azure Endpoint Availability: Endpoints Are Tested From Outside' +type: AUTOMATED +role: configuration +statement: > + At least one endpoint URL is requested by an enabled Application Insights availability test, so + availability is measured from outside. These are inputs to availability reporting; they do not + replace the availability reporting itself. Does not check whether the collection run succeeded. + +regex: '"endpoints_tested":\s*(?[1-9]\d*)' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_lb_metrics_read.yaml b/validators/azure/azure_endpoint_availability_lb_metrics_read.yaml new file mode 100644 index 00000000..4979a88e --- /dev/null +++ b/validators/azure/azure_endpoint_availability_lb_metrics_read.yaml @@ -0,0 +1,20 @@ +key: azure_endpoint_availability_lb_metrics_read +name: 'Azure Endpoint Availability: Every Load Balancer''s Metrics Read' +type: AUTOMATED +role: integrity +statement: > + Every Standard load balancer's data-path and health-probe metrics were read + (load_balancers_metrics_unread is 0). Does not check whether the collection run succeeded. + +regex: '"load_balancers_metrics_unread":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # load_balancers_metrics_unread + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_lbs_all_judged.yaml b/validators/azure/azure_endpoint_availability_lbs_all_judged.yaml new file mode 100644 index 00000000..7805a800 --- /dev/null +++ b/validators/azure/azure_endpoint_availability_lbs_all_judged.yaml @@ -0,0 +1,20 @@ +key: azure_endpoint_availability_lbs_all_judged +name: 'Azure Endpoint Availability: Every Load Balancer Was Judged Against the Target' +type: AUTOMATED +role: configuration +statement: > + Every Standard load balancer with load-balancing rules or health probes was judged against the + target: none is missing an hour of a metric that applies or unread (load_balancers_not_judged is 0). + Passes while no target is configured; that case fails 'Availability Target Is Configured' instead. + These are inputs to availability reporting; they do not replace the availability reporting itself. + Does not check whether the collection run succeeded. + +regex: '"load_balancers_not_judged":\s*(?:0|null)\b' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_lbs_fully_measured.yaml b/validators/azure/azure_endpoint_availability_lbs_fully_measured.yaml new file mode 100644 index 00000000..06cbe787 --- /dev/null +++ b/validators/azure/azure_endpoint_availability_lbs_fully_measured.yaml @@ -0,0 +1,21 @@ +key: azure_endpoint_availability_lbs_fully_measured +name: 'Azure Endpoint Availability: No Load Balancer Missing an Hour of Metrics' +type: AUTOMATED +role: configuration +statement: > + No Standard load balancer is missing an hour of data-path or health-probe data over the lookback + (load_balancers_with_missing_measurements is 0). These are inputs to availability reporting; they do + not replace the availability reporting itself. Does not check whether the collection run succeeded. + +regex: '"load_balancers_with_missing_measurements":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # load_balancers_with_missing_measurements + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_lbs_meet_target.yaml b/validators/azure/azure_endpoint_availability_lbs_meet_target.yaml new file mode 100644 index 00000000..616a8aab --- /dev/null +++ b/validators/azure/azure_endpoint_availability_lbs_meet_target.yaml @@ -0,0 +1,22 @@ +key: azure_endpoint_availability_lbs_meet_target +name: 'Azure Endpoint Availability: Every Load Balancer Met the Target' +type: AUTOMATED +role: configuration +statement: > + No Standard load balancer with every hour measured had an average data-path availability or + health-probe status below availability_target_percentage (load_balancers_below_target is 0). Only + the metrics that apply are judged: data path when the load balancer has load-balancing rules, health + probe when it has probes; one with neither (outbound-only) is not judged. Passes while no target is + configured; that case fails 'Availability Target Is Configured' instead. These are inputs to + availability reporting; they do not replace the availability reporting itself. Does not check + whether the collection run succeeded. + +regex: '"load_balancers_below_target":\s*(?:0|null)\b' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_results_read.yaml b/validators/azure/azure_endpoint_availability_results_read.yaml new file mode 100644 index 00000000..2f67984a --- /dev/null +++ b/validators/azure/azure_endpoint_availability_results_read.yaml @@ -0,0 +1,21 @@ +key: azure_endpoint_availability_results_read +name: 'Azure Endpoint Availability: Every Test''s Results Read' +type: AUTOMATED +role: integrity +statement: > + Every enabled availability test's results were read (availability_tests_results_unread is 0), so the + availability checks are judged on complete data. Does not check whether the collection run + succeeded. + +regex: '"availability_tests_results_unread":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # availability_tests_results_unread + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_target_set.yaml b/validators/azure/azure_endpoint_availability_target_set.yaml new file mode 100644 index 00000000..494a6e4b --- /dev/null +++ b/validators/azure/azure_endpoint_availability_target_set.yaml @@ -0,0 +1,18 @@ +key: azure_endpoint_availability_target_set +name: 'Azure Endpoint Availability: Availability Target Is Configured' +type: AUTOMATED +role: configuration +statement: > + An availability objective is configured (availability_target_percentage is a number). Fails while it + is not set, which marks the target as undecided rather than an endpoint as unavailable. Does not + check whether the collection run succeeded. + +regex: '"availability_target_percentage":\s*(?\d+(?:\.\d+)?)' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_tests_all_judged.yaml b/validators/azure/azure_endpoint_availability_tests_all_judged.yaml new file mode 100644 index 00000000..e4f7f525 --- /dev/null +++ b/validators/azure/azure_endpoint_availability_tests_all_judged.yaml @@ -0,0 +1,20 @@ +key: azure_endpoint_availability_tests_all_judged +name: 'Azure Endpoint Availability: Every Test Was Judged Against the Target' +type: AUTOMATED +role: configuration +statement: > + Every enabled availability test was judged against the target: none is missing an hour of the + lookback or unread (availability_tests_not_judged is 0). Passes while no target is configured; that + case fails 'Availability Target Is Configured' instead. These are inputs to availability reporting; + they do not replace the availability reporting itself. Does not check whether the collection run + succeeded. + +regex: '"availability_tests_not_judged":\s*(?:0|null)\b' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_tests_check_application.yaml b/validators/azure/azure_endpoint_availability_tests_check_application.yaml new file mode 100644 index 00000000..dc61212d --- /dev/null +++ b/validators/azure/azure_endpoint_availability_tests_check_application.yaml @@ -0,0 +1,22 @@ +key: azure_endpoint_availability_tests_check_application +name: 'Azure Endpoint Availability: Every Test Checks the Application Works' +type: AUTOMATED +role: configuration +statement: > + Every enabled availability test (at least one) checks both an expected HTTP status code and the + response content, so a pass shows the application answered correctly and not only that the endpoint + was reachable. These are inputs to availability reporting; they do not replace the availability + reporting itself. Does not check whether the collection run succeeded. + +regex: '"availability_tests_checking_application":\s*(?\d+)[\s\S]*?"availability_tests_enabled":\s*(?[1-9]\d*)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS MATCH_GROUP[2] +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # availability_tests_checking_application + criteria: EQUALS + value: { type: MATCH_GROUP, groupNumber: 2 } # availability_tests_enabled + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_tests_fully_measured.yaml b/validators/azure/azure_endpoint_availability_tests_fully_measured.yaml new file mode 100644 index 00000000..fe0cdf98 --- /dev/null +++ b/validators/azure/azure_endpoint_availability_tests_fully_measured.yaml @@ -0,0 +1,22 @@ +key: azure_endpoint_availability_tests_fully_measured +name: 'Azure Endpoint Availability: No Test Missing an Hour of Results' +type: AUTOMATED +role: configuration +statement: > + No enabled availability test has an hour of the lookback without a result + (availability_tests_with_missing_measurements is 0), so the measured availability covers the whole + period. These are inputs to availability reporting; they do not replace the availability reporting + itself. Does not check whether the collection run succeeded. + +regex: '"availability_tests_with_missing_measurements":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # availability_tests_with_missing_measurements + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_tests_meet_target.yaml b/validators/azure/azure_endpoint_availability_tests_meet_target.yaml new file mode 100644 index 00000000..228bc8ac --- /dev/null +++ b/validators/azure/azure_endpoint_availability_tests_meet_target.yaml @@ -0,0 +1,21 @@ +key: azure_endpoint_availability_tests_meet_target +name: 'Azure Endpoint Availability: Every Tested Endpoint Met the Target' +type: AUTOMATED +role: configuration +statement: > + No enabled availability test with every hour measured averaged below availability_target_percentage + over the lookback (availability_tests_below_target is 0). Passes while no target is configured; that + case fails 'Availability Target Is Configured' instead. Tests that could not be judged are checked + by 'Every Test Was Judged'. Supports KSI-CNA-OFA. These are inputs to availability reporting; they + do not replace the availability reporting itself. Does not check whether the collection run + succeeded. + +regex: '"availability_tests_below_target":\s*(?:0|null)\b' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_tests_reporting.yaml b/validators/azure/azure_endpoint_availability_tests_reporting.yaml new file mode 100644 index 00000000..8da3b3e4 --- /dev/null +++ b/validators/azure/azure_endpoint_availability_tests_reporting.yaml @@ -0,0 +1,21 @@ +key: azure_endpoint_availability_tests_reporting +name: 'Azure Endpoint Availability: Every Test Reported Results' +type: AUTOMATED +role: configuration +statement: > + No enabled availability test went the whole lookback without a result + (availability_tests_without_data is 0). These are inputs to availability reporting; they do not + replace the availability reporting itself. Does not check whether the collection run succeeded. + +regex: '"availability_tests_without_data":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # availability_tests_without_data + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_flexible_server_backups_automatic_within_window.yaml b/validators/azure/azure_flexible_server_backups_automatic_within_window.yaml new file mode 100644 index 00000000..51f17e3e --- /dev/null +++ b/validators/azure/azure_flexible_server_backups_automatic_within_window.yaml @@ -0,0 +1,21 @@ +key: azure_flexible_server_backups_automatic_within_window +name: 'Azure PostgreSQL and MySQL Backups: Every Server Has a Recent Automatic Backup' +type: AUTOMATED +role: configuration +statement: > + Every backup server's newest completed automatic backup finished within backup_window_hours (26 + hours by default). Manual, on-demand backups do not count, so they cannot hide broken automation. + Supports KSI-RPL-ABO. Does not check whether the collection run succeeded. + +regex: '"backup_servers":\s*(?[1-9]\d*)[\s\S]*?"servers_with_automatic_backup_within_window":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS MATCH_GROUP[2] +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # backup_servers + criteria: EQUALS + value: { type: MATCH_GROUP, groupNumber: 2 } # servers_with_automatic_backup_within_window + +evidence_sets: + - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS diff --git a/validators/azure/azure_flexible_server_backups_geo_redundant.yaml b/validators/azure/azure_flexible_server_backups_geo_redundant.yaml new file mode 100644 index 00000000..2aaf3f8d --- /dev/null +++ b/validators/azure/azure_flexible_server_backups_geo_redundant.yaml @@ -0,0 +1,21 @@ +key: azure_flexible_server_backups_geo_redundant +name: 'Azure PostgreSQL and MySQL Backups: Every Server Has Geo-Redundant Backup' +type: AUTOMATED +role: configuration +statement: > + Every backup server has geo-redundant backup enabled, so Azure keeps a copy of its backups in the + paired region. Supports KSI-RPL-ARP. Does not show a restore from the paired region was tested. Does + not check whether the collection run succeeded. + +regex: '"backup_servers":\s*(?[1-9]\d*)[\s\S]*?"servers_geo_redundant_backup":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS MATCH_GROUP[2] +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # backup_servers + criteria: EQUALS + value: { type: MATCH_GROUP, groupNumber: 2 } # servers_geo_redundant_backup + +evidence_sets: + - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS diff --git a/validators/azure/azure_flexible_server_backups_restore_dates_known.yaml b/validators/azure/azure_flexible_server_backups_restore_dates_known.yaml new file mode 100644 index 00000000..324a0fd6 --- /dev/null +++ b/validators/azure/azure_flexible_server_backups_restore_dates_known.yaml @@ -0,0 +1,21 @@ +key: azure_flexible_server_backups_restore_dates_known +name: 'Azure PostgreSQL and MySQL Backups: Every Restored Server Has a Known Date' +type: AUTOMATED +role: integrity +statement: > + Every server created by a point-in-time restore has a creation date (restored_servers_date_unknown + is 0). A restored server without a date never counts as recent. Does not check whether the + collection run succeeded. + +regex: '"restored_servers_date_unknown":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # restored_servers_date_unknown + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS diff --git a/validators/azure/azure_flexible_server_backups_restore_exercised.yaml b/validators/azure/azure_flexible_server_backups_restore_exercised.yaml new file mode 100644 index 00000000..2052ccb0 --- /dev/null +++ b/validators/azure/azure_flexible_server_backups_restore_exercised.yaml @@ -0,0 +1,20 @@ +key: azure_flexible_server_backups_restore_exercised +name: 'Azure PostgreSQL and MySQL Backups: Point-in-Time Restore Exercised Within the Lookback' +type: AUTOMATED +role: configuration +statement: > + At least one server was created by an Azure point-in-time restore within restore_lookback_days. + Passes while no lookback is configured; that case fails 'Restore Lookback Is Configured' instead. + Supports KSI-RPL-TRC. Only servers that still exist are seen, so a restore test that deleted its + server does not count. Shows a restore was performed, not that the restored database or application + worked, and not the recovery time. Does not check whether the collection run succeeded. + +regex: '"restored_servers_within_lookback":\s*(?:[1-9]\d*|null)\b' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS diff --git a/validators/azure/azure_flexible_server_backups_restore_lookback_set.yaml b/validators/azure/azure_flexible_server_backups_restore_lookback_set.yaml new file mode 100644 index 00000000..39e22a1a --- /dev/null +++ b/validators/azure/azure_flexible_server_backups_restore_lookback_set.yaml @@ -0,0 +1,18 @@ +key: azure_flexible_server_backups_restore_lookback_set +name: 'Azure PostgreSQL and MySQL Backups: Restore Lookback Is Configured' +type: AUTOMATED +role: configuration +statement: > + A restore lookback is configured (restore_lookback_days is a whole number above 0). Fails while it + is not set, which marks the interval as undecided rather than a restore as missing. Does not check + whether the collection run succeeded. + +regex: '"restore_lookback_days":\s*(?[1-9]\d*)' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS diff --git a/validators/azure/azure_flexible_server_backups_retention_as_required.yaml b/validators/azure/azure_flexible_server_backups_retention_as_required.yaml new file mode 100644 index 00000000..7244582c --- /dev/null +++ b/validators/azure/azure_flexible_server_backups_retention_as_required.yaml @@ -0,0 +1,19 @@ +key: azure_flexible_server_backups_retention_as_required +name: 'Azure PostgreSQL and MySQL Backups: Every Server Keeps Backups for the Required Period' +type: AUTOMATED +role: configuration +statement: > + No backup server keeps backups for fewer days than required_retention_days, the minimum authorized + retention; keeping them longer meets it (servers_retention_below_required is 0). Passes while + required_retention_days is not set; that case fails 'Required Retention Is Configured' instead. + Supports KSI-SVC-RUD. Does not check whether the collection run succeeded. + +regex: '"servers_retention_below_required":\s*(?:0|null)\b' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS diff --git a/validators/azure/azure_flexible_server_backups_retention_known.yaml b/validators/azure/azure_flexible_server_backups_retention_known.yaml new file mode 100644 index 00000000..be110565 --- /dev/null +++ b/validators/azure/azure_flexible_server_backups_retention_known.yaml @@ -0,0 +1,20 @@ +key: azure_flexible_server_backups_retention_known +name: 'Azure PostgreSQL and MySQL Backups: Every Server''s Retention Is Known' +type: AUTOMATED +role: integrity +statement: > + Azure returned a backup retention for every backup server (servers_retention_unknown is 0), so no + server is left out of the retention check. Does not check whether the collection run succeeded. + +regex: '"servers_retention_unknown":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # servers_retention_unknown + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS diff --git a/validators/azure/azure_flexible_server_backups_retention_set.yaml b/validators/azure/azure_flexible_server_backups_retention_set.yaml new file mode 100644 index 00000000..d9007681 --- /dev/null +++ b/validators/azure/azure_flexible_server_backups_retention_set.yaml @@ -0,0 +1,18 @@ +key: azure_flexible_server_backups_retention_set +name: 'Azure PostgreSQL and MySQL Backups: Required Retention Is Configured' +type: AUTOMATED +role: configuration +statement: > + The authorized backup retention is configured (required_retention_days is a whole number above 0). + Fails while it is not set, which marks the retention as undecided rather than a server as wrong. + Does not check whether the collection run succeeded. + +regex: '"required_retention_days":\s*(?[1-9]\d*)' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS diff --git a/validators/azure/azure_flexible_server_backups_servers_read.yaml b/validators/azure/azure_flexible_server_backups_servers_read.yaml new file mode 100644 index 00000000..5d0a96aa --- /dev/null +++ b/validators/azure/azure_flexible_server_backups_servers_read.yaml @@ -0,0 +1,21 @@ +key: azure_flexible_server_backups_servers_read +name: 'Azure PostgreSQL and MySQL Backups: Every Server''s Backups Read' +type: AUTOMATED +role: integrity +statement: > + At least one PostgreSQL or MySQL flexible server that takes its own backups (not a read replica) is + in scope, and every one had its backup list read (backup_servers_read equals backup_servers). Does + not check whether the collection run succeeded. + +regex: '"backup_servers":\s*(?[1-9]\d*)[\s\S]*?"backup_servers_read":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS MATCH_GROUP[2] +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # backup_servers + criteria: EQUALS + value: { type: MATCH_GROUP, groupNumber: 2 } # backup_servers_read + +evidence_sets: + - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS diff --git a/validators/azure/azure_velero_backup_locations_read.yaml b/validators/azure/azure_velero_backup_locations_read.yaml new file mode 100644 index 00000000..1b4317a6 --- /dev/null +++ b/validators/azure/azure_velero_backup_locations_read.yaml @@ -0,0 +1,21 @@ +key: azure_velero_backup_locations_read +name: 'Azure Velero: Every Backup Storage Location Read' +type: AUTOMATED +role: integrity +statement: > + At least one Velero backup storage location was found and every one of them had its backups listed + (backup_locations_read equals backup_locations). Without this, the backup counts below are + incomplete or null. Does not check whether the collection run succeeded. + +regex: '"backup_locations":\s*(?[1-9]\d*)[\s\S]*?"backup_locations_read":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS MATCH_GROUP[2] +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # backup_locations + criteria: EQUALS + value: { type: MATCH_GROUP, groupNumber: 2 } # backup_locations_read + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_backup_records_readable.yaml b/validators/azure/azure_velero_backup_records_readable.yaml new file mode 100644 index 00000000..3c685da1 --- /dev/null +++ b/validators/azure/azure_velero_backup_records_readable.yaml @@ -0,0 +1,21 @@ +key: azure_velero_backup_records_readable +name: 'Azure Velero: Every Backup Record Readable' +type: AUTOMATED +role: integrity +statement: > + Every backup's velero-backup.json in storage could be read and parsed (backups_metadata_unreadable + is 0), so no backup is left out of the phase and schedule counts. Does not check whether the + collection run succeeded. + +regex: '"backups_metadata_unreadable":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # backups_metadata_unreadable + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_backup_storage_geo_replicated.yaml b/validators/azure/azure_velero_backup_storage_geo_replicated.yaml new file mode 100644 index 00000000..f6f5a44d --- /dev/null +++ b/validators/azure/azure_velero_backup_storage_geo_replicated.yaml @@ -0,0 +1,24 @@ +key: azure_velero_backup_storage_geo_replicated +name: 'Azure Velero: Backup Storage Accounts Are Geo-Replicated' +type: AUTOMATED +role: configuration +statement: > + Every Velero backup storage location (at least one) is in a geo-replicated storage account (GRS, + RA-GRS, GZRS or RA-GZRS), so what Velero writes there (Kubernetes resource backups and backup + metadata, and file-system backup data if used) has a copy in the paired region. Supports KSI-RPL-ARP + for that data only. Does not cover volume snapshots taken by the Azure disk snapshotter: those are + managed disk snapshots outside the storage account, and this check does not show them copied + off-site. Does not check whether the collection run succeeded. + +regex: '"backup_locations":\s*(?[1-9]\d*)[\s\S]*?"backup_locations_geo_replicated":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS MATCH_GROUP[2] +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # backup_locations + criteria: EQUALS + value: { type: MATCH_GROUP, groupNumber: 2 } # backup_locations_geo_replicated + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_clean_restore_within_interval.yaml b/validators/azure/azure_velero_clean_restore_within_interval.yaml new file mode 100644 index 00000000..0c5acaf7 --- /dev/null +++ b/validators/azure/azure_velero_clean_restore_within_interval.yaml @@ -0,0 +1,21 @@ +key: azure_velero_clean_restore_within_interval +name: 'Azure Velero: Clean Restore Within the Restore-Test Interval' +type: AUTOMATED +role: configuration +statement: > + The newest Velero restore that completed without errors is no older than restore_test_interval_days. + Passes while no interval is configured or restores are unread; those cases fail 'Restore-Test + Interval Is Configured' and 'Restore Records Read' instead. Supports KSI-RPL-TRC. A restore without + errors does not show the recovered application works, and does not prove the recovery time + objective; that needs a timed recovery walkthrough. Does not check whether the collection run + succeeded. + +regex: '"clean_restore_within_interval":\s*(?:true|null)\b' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_expected_schedules_have_backups.yaml b/validators/azure/azure_velero_expected_schedules_have_backups.yaml new file mode 100644 index 00000000..2299d853 --- /dev/null +++ b/validators/azure/azure_velero_expected_schedules_have_backups.yaml @@ -0,0 +1,20 @@ +key: azure_velero_expected_schedules_have_backups +name: 'Azure Velero: Every Expected Schedule Has a Backup' +type: AUTOMATED +role: configuration +statement: > + No expected schedule is missing from backup storage (expected_schedules_without_backups is 0). + Passes while expected_schedules is not set or a location is unread; those cases fail 'Expected + Backup Schedules Are Configured' and 'Every Backup Storage Location Read' instead, so an unset value + never reads as a broken backup. Supports KSI-RPL-ABO. Does not check whether the collection run + succeeded. + +regex: '"expected_schedules_without_backups":\s*(?:0|null)\b' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_expected_schedules_set.yaml b/validators/azure/azure_velero_expected_schedules_set.yaml new file mode 100644 index 00000000..617dc569 --- /dev/null +++ b/validators/azure/azure_velero_expected_schedules_set.yaml @@ -0,0 +1,19 @@ +key: azure_velero_expected_schedules_set +name: 'Azure Velero: Expected Backup Schedules Are Configured' +type: AUTOMATED +role: configuration +statement: > + At least one expected schedule is configured in expected_schedules (schedule:hours). Velero does not + write schedules to backup storage, so a schedule that never produced a backup is only visible when + it is listed. Fails while expected_schedules is not set, which marks the setting as unset rather + than a backup as broken. Does not check whether the collection run succeeded. + +regex: '"expected_schedules":\s*(?[1-9]\d*)' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_expired_backups_removed.yaml b/validators/azure/azure_velero_expired_backups_removed.yaml new file mode 100644 index 00000000..9a0fec13 --- /dev/null +++ b/validators/azure/azure_velero_expired_backups_removed.yaml @@ -0,0 +1,22 @@ +key: azure_velero_expired_backups_removed +name: 'Azure Velero: Expired Backups Are Removed' +type: AUTOMATED +role: configuration +statement: > + No backup stays in storage more than expiry_grace_hours past its expiration + (expired_backups_not_deleted is 0), so Velero's retention is enforced. Supports KSI-SVC-RUD. Does + not show that the retention period itself is the authorized one. Does not check whether the + collection run succeeded. + +regex: '"expired_backups_not_deleted":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # expired_backups_not_deleted + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_no_missed_scheduled_runs.yaml b/validators/azure/azure_velero_no_missed_scheduled_runs.yaml new file mode 100644 index 00000000..c3470665 --- /dev/null +++ b/validators/azure/azure_velero_no_missed_scheduled_runs.yaml @@ -0,0 +1,21 @@ +key: azure_velero_no_missed_scheduled_runs +name: 'Azure Velero: No Missed Scheduled Runs' +type: AUTOMATED +role: configuration +statement: > + No expected schedule missed a run (missed_scheduled_runs is 0), counted from the gaps between + Completed backups with 10% grace, over the part of missed_run_lookback_days the backups are kept + for, so a backup Velero deleted at the end of its retention is not a missed run. Passes while + expected_schedules is not set or a location is unread; those cases fail 'Expected Backup Schedules + Are Configured' and 'Every Backup Storage Location Read' instead. Supports KSI-RPL-ABO. Does not + check whether the collection run succeeded. + +regex: '"missed_scheduled_runs":\s*(?:0|null)\b' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_no_schedule_exceeds_rpo.yaml b/validators/azure/azure_velero_no_schedule_exceeds_rpo.yaml new file mode 100644 index 00000000..37e9067a --- /dev/null +++ b/validators/azure/azure_velero_no_schedule_exceeds_rpo.yaml @@ -0,0 +1,18 @@ +key: azure_velero_no_schedule_exceeds_rpo +name: 'Azure Velero: No Schedule Exceeds the Recovery Point Objective' +type: AUTOMATED +role: configuration +statement: > + No schedule has gone longer than rpo_hours without a Completed backup (schedules_exceeding_rpo is + 0). Passes while rpo_hours is not set; that case fails 'Recovery Point Objective Is Configured' + instead. Supports KSI-RPL-ABO. Does not check whether the collection run succeeded. + +regex: '"schedules_exceeding_rpo":\s*(?:0|null)\b' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_no_unresolved_failed_backups.yaml b/validators/azure/azure_velero_no_unresolved_failed_backups.yaml new file mode 100644 index 00000000..636468e0 --- /dev/null +++ b/validators/azure/azure_velero_no_unresolved_failed_backups.yaml @@ -0,0 +1,22 @@ +key: azure_velero_no_unresolved_failed_backups +name: 'Azure Velero: No Current Failed Backups' +type: AUTOMATED +role: configuration +statement: > + No Failed or PartiallyFailed backup is current: every one has a later Completed backup of the same + schedule (backups_failed_unresolved is 0). Resolved failures and deliberate failure tests (names + matching deliberate_failure_tests) stay in the totals, so history is kept without failing this + check. Supports KSI-RPL-ABO. Does not check whether the collection run succeeded. + +regex: '"backups_failed_unresolved":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # backups_failed_unresolved + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_no_unresolved_incomplete_snapshots.yaml b/validators/azure/azure_velero_no_unresolved_incomplete_snapshots.yaml new file mode 100644 index 00000000..9b55f305 --- /dev/null +++ b/validators/azure/azure_velero_no_unresolved_incomplete_snapshots.yaml @@ -0,0 +1,23 @@ +key: azure_velero_no_unresolved_incomplete_snapshots +name: 'Azure Velero: No Current Incomplete Volume Snapshots' +type: AUTOMATED +role: configuration +statement: > + No backup with incomplete volume snapshots is current: every one has a later Completed backup of the + same schedule that completed every snapshot it attempted + (backups_volume_snapshots_incomplete_unresolved is 0). Resolved failures and deliberate failure + tests (names matching deliberate_failure_tests) stay in the totals, so history is kept without + failing this check. Supports KSI-RPL-ABO. Does not check whether the collection run succeeded. + +regex: '"backups_volume_snapshots_incomplete_unresolved":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # backups_volume_snapshots_incomplete_unresolved + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_no_unresolved_restore_errors.yaml b/validators/azure/azure_velero_no_unresolved_restore_errors.yaml new file mode 100644 index 00000000..ecd088e0 --- /dev/null +++ b/validators/azure/azure_velero_no_unresolved_restore_errors.yaml @@ -0,0 +1,24 @@ +key: azure_velero_no_unresolved_restore_errors +name: 'Azure Velero: No Current Restore Errors' +type: AUTOMATED +role: configuration +statement: > + No restore with errors is current: every one has a later restore that completed without errors + (restores_with_errors_unresolved is 0). A restore with errors and no readable date is never treated + as resolved. Resolved failures and deliberate failure tests (names matching + deliberate_failure_tests) stay in the totals, so history is kept without failing this check. + Supports KSI-RPL-TRC. A restore without errors does not show the recovered application works. Does + not check whether the collection run succeeded. + +regex: '"restores_with_errors_unresolved":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # restores_with_errors_unresolved + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_restore_dates_known.yaml b/validators/azure/azure_velero_restore_dates_known.yaml new file mode 100644 index 00000000..5be9bb7c --- /dev/null +++ b/validators/azure/azure_velero_restore_dates_known.yaml @@ -0,0 +1,20 @@ +key: azure_velero_restore_dates_known +name: 'Azure Velero: Every Restore Has a Known Date' +type: AUTOMATED +role: integrity +statement: > + Every restore result has a readable date (restores_date_unknown is 0). A restore without a date + never counts as recent. Does not check whether the collection run succeeded. + +regex: '"restores_date_unknown":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # restores_date_unknown + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_restore_results_readable.yaml b/validators/azure/azure_velero_restore_results_readable.yaml new file mode 100644 index 00000000..bfe49d7b --- /dev/null +++ b/validators/azure/azure_velero_restore_results_readable.yaml @@ -0,0 +1,21 @@ +key: azure_velero_restore_results_readable +name: 'Azure Velero: Every Restore Result Readable' +type: AUTOMATED +role: integrity +statement: > + Every restore Velero recorded has a readable results file (restores_results_missing is 0), so no + restore is counted without knowing whether it had errors. Does not check whether the collection run + succeeded. + +regex: '"restores_results_missing":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # restores_results_missing + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_restore_test_interval_set.yaml b/validators/azure/azure_velero_restore_test_interval_set.yaml new file mode 100644 index 00000000..27dab48b --- /dev/null +++ b/validators/azure/azure_velero_restore_test_interval_set.yaml @@ -0,0 +1,18 @@ +key: azure_velero_restore_test_interval_set +name: 'Azure Velero: Restore-Test Interval Is Configured' +type: AUTOMATED +role: configuration +statement: > + A restore-test interval is configured (restore_test_interval_days is a whole number above 0). Fails + while it is not set, which marks the interval as undecided rather than a restore as failed. Does not + check whether the collection run succeeded. + +regex: '"restore_test_interval_days":\s*(?[1-9]\d*)' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_restores_read.yaml b/validators/azure/azure_velero_restores_read.yaml new file mode 100644 index 00000000..8b9940d6 --- /dev/null +++ b/validators/azure/azure_velero_restores_read.yaml @@ -0,0 +1,18 @@ +key: azure_velero_restores_read +name: 'Azure Velero: Restore Records Read' +type: AUTOMATED +role: integrity +statement: > + Every backup storage location's restore records were read (restores_total is a number, not null), so + the restore checks are judged on complete data. Zero restores is allowed here; whether a clean + restore is recent is judged separately. Does not check whether the collection run succeeded. + +regex: '"restores_total":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_rpo_set.yaml b/validators/azure/azure_velero_rpo_set.yaml new file mode 100644 index 00000000..80ec939c --- /dev/null +++ b/validators/azure/azure_velero_rpo_set.yaml @@ -0,0 +1,18 @@ +key: azure_velero_rpo_set +name: 'Azure Velero: Recovery Point Objective Is Configured' +type: AUTOMATED +role: configuration +statement: > + A recovery point objective is configured (rpo_hours is a whole number above 0). Fails while + rpo_hours is not set, which marks the objective as unset rather than a backup as broken. Does not + check whether the collection run succeeded. + +regex: '"rpo_hours":\s*(?[1-9]\d*)' +rules_summary: MATCH_COUNT NOT_EQUALS 0 +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_schedules_succeed_within_window.yaml b/validators/azure/azure_velero_schedules_succeed_within_window.yaml new file mode 100644 index 00000000..1844a5a9 --- /dev/null +++ b/validators/azure/azure_velero_schedules_succeed_within_window.yaml @@ -0,0 +1,24 @@ +key: azure_velero_schedules_succeed_within_window +name: 'Azure Velero: Every Schedule Succeeded Within the Daily Window' +type: AUTOMATED +role: configuration +statement: > + Every Velero schedule seen in backup storage (at least one) has a Completed backup within its + window: a schedule listed in expected_schedules gets its own interval plus 10% (at least 2 hours, so + 26 hours for daily:24), and any other schedule gets success_window_hours (26 hours by default). This + is the daily check, kept apart from the recovery point objective so a missed daily run shows before + the objective is exceeded. Supports KSI-RPL-ABO. Does not prove the backup can be restored. Does not + check whether the collection run succeeded. + +regex: '"schedules_observed":\s*(?[1-9]\d*)[\s\S]*?"schedules_with_success_within_window":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS MATCH_GROUP[2] +validation_rules: + - regexOperation: { type: MATCH_COUNT } + criteria: NOT_EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # schedules_observed + criteria: EQUALS + value: { type: MATCH_GROUP, groupNumber: 2 } # schedules_with_success_within_window + +evidence_sets: + - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/common/collection_succeeded.yaml b/validators/common/collection_succeeded.yaml index 0643eb82..5ba28586 100644 --- a/validators/common/collection_succeeded.yaml +++ b/validators/common/collection_succeeded.yaml @@ -70,3 +70,6 @@ evidence_sets: - EVD-FEDRAMP-VENDOR-CERTIFICATION - EVD-FEDRAMP-WORKSPACE-VENDOR-CERTIFICATION - EVD-ORGANIZATIONS-SCP + - EVD-AZURE-VELERO-BACKUPS + - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS + - EVD-AZURE-ENDPOINT-AVAILABILITY From ee7ad6ad72fc85b65fd7007d57e889ecf33d04db Mon Sep 17 00:00:00 2001 From: Bruce Weygandt Date: Tue, 17 Nov 2026 14:11:49 -0700 Subject: [PATCH 2/2] validators: unset values fail the judging checks too, never pass --- ...re_endpoint_availability_lbs_all_judged.yaml | 8 ++++---- ...e_endpoint_availability_lbs_meet_target.yaml | 8 ++++---- ..._endpoint_availability_tests_all_judged.yaml | 8 ++++---- ...endpoint_availability_tests_meet_target.yaml | 8 ++++---- ...exible_server_backups_restore_exercised.yaml | 8 ++++---- ...le_server_backups_retention_as_required.yaml | 8 ++++---- ...re_velero_clean_restore_within_interval.yaml | 2 +- ..._velero_expected_schedules_have_backups.yaml | 8 ++++---- .../azure_velero_no_missed_scheduled_runs.yaml | 8 ++++---- .../azure_velero_no_schedule_exceeds_rpo.yaml | 8 ++++---- ...re_endpoint_availability_lbs_all_judged.yaml | 14 +++++++++----- ...e_endpoint_availability_lbs_meet_target.yaml | 15 +++++++++------ ..._endpoint_availability_tests_all_judged.yaml | 15 +++++++++------ ...endpoint_availability_tests_meet_target.yaml | 17 ++++++++++------- ...exible_server_backups_restore_exercised.yaml | 13 +++++++------ ...le_server_backups_retention_as_required.yaml | 14 +++++++++----- ...re_velero_clean_restore_within_interval.yaml | 12 ++++++------ ..._velero_expected_schedules_have_backups.yaml | 15 +++++++++------ .../azure_velero_no_missed_scheduled_runs.yaml | 16 ++++++++++------ .../azure_velero_no_schedule_exceeds_rpo.yaml | 12 ++++++++---- 20 files changed, 123 insertions(+), 94 deletions(-) diff --git a/validators/_cases/azure_endpoint_availability_lbs_all_judged.yaml b/validators/_cases/azure_endpoint_availability_lbs_all_judged.yaml index 8a77a5e3..9f75dd32 100644 --- a/validators/_cases/azure_endpoint_availability_lbs_all_judged.yaml +++ b/validators/_cases/azure_endpoint_availability_lbs_all_judged.yaml @@ -4,10 +4,6 @@ cases: expect: PASS artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' - - name: not_configured_reads_null - expect: PASS - artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": null, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' - - name: one_found expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 1, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' @@ -16,6 +12,10 @@ cases: expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 10, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + - name: load_balancers_not_judged_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": null, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + - name: load_balancers_not_judged_renamed expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged_renamed": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_lbs_meet_target.yaml b/validators/_cases/azure_endpoint_availability_lbs_meet_target.yaml index 0ce79233..698bfc2a 100644 --- a/validators/_cases/azure_endpoint_availability_lbs_meet_target.yaml +++ b/validators/_cases/azure_endpoint_availability_lbs_meet_target.yaml @@ -4,10 +4,6 @@ cases: expect: PASS artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' - - name: not_configured_reads_null - expect: PASS - artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": null, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' - - name: one_found expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 1, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' @@ -16,6 +12,10 @@ cases: expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 10, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + - name: load_balancers_below_target_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": null, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + - name: load_balancers_below_target_renamed expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target_renamed": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_tests_all_judged.yaml b/validators/_cases/azure_endpoint_availability_tests_all_judged.yaml index fc32ef0c..661905aa 100644 --- a/validators/_cases/azure_endpoint_availability_tests_all_judged.yaml +++ b/validators/_cases/azure_endpoint_availability_tests_all_judged.yaml @@ -4,10 +4,6 @@ cases: expect: PASS artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' - - name: not_configured_reads_null - expect: PASS - artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": null, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' - - name: one_found expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 1, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' @@ -16,6 +12,10 @@ cases: expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 10, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + - name: availability_tests_not_judged_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": null, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + - name: availability_tests_not_judged_renamed expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged_renamed": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_endpoint_availability_tests_meet_target.yaml b/validators/_cases/azure_endpoint_availability_tests_meet_target.yaml index 7e468f15..dd1f1efe 100644 --- a/validators/_cases/azure_endpoint_availability_tests_meet_target.yaml +++ b/validators/_cases/azure_endpoint_availability_tests_meet_target.yaml @@ -4,10 +4,6 @@ cases: expect: PASS artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 0, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' - - name: not_configured_reads_null - expect: PASS - artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": null, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' - - name: one_found expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 1, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' @@ -16,6 +12,10 @@ cases: expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": 10, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + - name: availability_tests_below_target_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target": null, "availability_tests_below_target_latest_hour": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' + - name: availability_tests_below_target_renamed expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"availability_target_percentage": 99.9, "availability_tests_below_target_latest_hour": 0, "availability_tests_below_target_renamed": 0, "availability_tests_checking_application": 1, "availability_tests_enabled": 1, "availability_tests_not_judged": 0, "availability_tests_reachability_only": 0, "availability_tests_results_unread": 0, "availability_tests_with_missing_measurements": 0, "availability_tests_without_data": 0, "endpoints_tested": 1, "excluded_availability_tests": 0, "excluded_load_balancers": 0, "in_scope_availability_tests": 2, "in_scope_load_balancers": 2, "load_balancers_below_target": 0, "load_balancers_metrics_unread": 0, "load_balancers_not_judged": 0, "load_balancers_public": 1, "load_balancers_standard": 1, "load_balancers_with_missing_measurements": 0, "load_balancers_without_measured_traffic": 0, "lookback_days": 1, "lowest_availability_percentage": 99.5, "lowest_data_path_availability": 100.0, "lowest_health_probe_availability": 100.0, "lowest_load_balancer_measurement_coverage_percentage": 100.0, "lowest_measurement_coverage_percentage": 100.0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": []}}}' diff --git a/validators/_cases/azure_flexible_server_backups_restore_exercised.yaml b/validators/_cases/azure_flexible_server_backups_restore_exercised.yaml index 879fa4c9..3a072ffd 100644 --- a/validators/_cases/azure_flexible_server_backups_restore_exercised.yaml +++ b/validators/_cases/azure_flexible_server_backups_restore_exercised.yaml @@ -4,15 +4,15 @@ cases: expect: PASS artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' - - name: ten_restored + - name: ten_times_scale expect: PASS - artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 10, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 30, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' - name: not_configured_reads_null - expect: PASS + expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": null, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' - - name: none_within_lookback + - name: zero expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 0, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_flexible_server_backups_retention_as_required.yaml b/validators/_cases/azure_flexible_server_backups_retention_as_required.yaml index 8cdb5f0f..ce9b1391 100644 --- a/validators/_cases/azure_flexible_server_backups_retention_as_required.yaml +++ b/validators/_cases/azure_flexible_server_backups_retention_as_required.yaml @@ -4,10 +4,6 @@ cases: expect: PASS artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' - - name: not_configured_reads_null - expect: PASS - artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": null, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' - - name: one_found expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 1, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' @@ -16,6 +12,10 @@ cases: expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": 10, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + - name: servers_retention_below_required_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required": null, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' + - name: servers_retention_below_required_renamed expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_servers": 2, "backup_servers_read": 2, "backup_window_hours": 26, "database_servers_mysql": 1, "database_servers_postgresql": 2, "excluded_database_servers": 0, "in_scope_database_servers": 3, "max_backup_retention_days": 7, "max_hours_since_automatic_backup": 4.0, "min_backup_retention_days": 7, "mysql_provider_registration_status": "registered", "postgresql_provider_registration_status": "registered", "replica_servers": 1, "required_retention_days": 7, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_lookback_days": 90, "restored_servers_date_unknown": 0, "restored_servers_within_lookback": 1, "servers_geo_redundant_backup": 2, "servers_relying_on_manual_backup": 0, "servers_retention_below_required_renamed": 0, "servers_retention_unknown": 0, "servers_with_automatic_backup_within_window": 2, "servers_with_manual_backups": 0, "servers_without_automatic_backup_within_window": [], "stopped_servers": 0}}}' diff --git a/validators/_cases/azure_velero_clean_restore_within_interval.yaml b/validators/_cases/azure_velero_clean_restore_within_interval.yaml index 8c7be641..adbcb557 100644 --- a/validators/_cases/azure_velero_clean_restore_within_interval.yaml +++ b/validators/_cases/azure_velero_clean_restore_within_interval.yaml @@ -5,7 +5,7 @@ cases: artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' - name: not_configured_reads_null - expect: PASS + expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": null, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' - name: too_old diff --git a/validators/_cases/azure_velero_expected_schedules_have_backups.yaml b/validators/_cases/azure_velero_expected_schedules_have_backups.yaml index d69662b9..1dcd837f 100644 --- a/validators/_cases/azure_velero_expected_schedules_have_backups.yaml +++ b/validators/_cases/azure_velero_expected_schedules_have_backups.yaml @@ -4,10 +4,6 @@ cases: expect: PASS artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' - - name: not_configured_reads_null - expect: PASS - artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": null, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' - - name: one_found expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 1, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' @@ -16,6 +12,10 @@ cases: expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 10, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + - name: expected_schedules_without_backups_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": null, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + - name: expected_schedules_without_backups_renamed expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups_names": [], "expected_schedules_without_backups_renamed": 0, "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_no_missed_scheduled_runs.yaml b/validators/_cases/azure_velero_no_missed_scheduled_runs.yaml index 3b60883b..0db99a56 100644 --- a/validators/_cases/azure_velero_no_missed_scheduled_runs.yaml +++ b/validators/_cases/azure_velero_no_missed_scheduled_runs.yaml @@ -4,10 +4,6 @@ cases: expect: PASS artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' - - name: not_configured_reads_null - expect: PASS - artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": null, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' - - name: one_found expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 1, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' @@ -16,6 +12,10 @@ cases: expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 10, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + - name: missed_scheduled_runs_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": null, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + - name: missed_scheduled_runs_renamed expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs_renamed": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/_cases/azure_velero_no_schedule_exceeds_rpo.yaml b/validators/_cases/azure_velero_no_schedule_exceeds_rpo.yaml index 8cda014b..56a6d293 100644 --- a/validators/_cases/azure_velero_no_schedule_exceeds_rpo.yaml +++ b/validators/_cases/azure_velero_no_schedule_exceeds_rpo.yaml @@ -4,10 +4,6 @@ cases: expect: PASS artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' - - name: not_configured_reads_null - expect: PASS - artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": null, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' - - name: one_found expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 1, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' @@ -16,6 +12,10 @@ cases: expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": 10, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + - name: schedules_exceeding_rpo_null + expect: FAIL + artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo": null, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' + - name: schedules_exceeding_rpo_renamed expect: FAIL artifact: '{"metadata": {"exit_code": 0, "status": "success"}, "payload": {"metadata": {"api_failures": [], "datetime": "2026-11-17T00:00:00Z", "environment": null, "partial_failure": false, "subscription_id": "00000000-0000-0000-0000-000000000000", "subscription_source": "target"}, "results": {}, "summary": {"backup_locations": 1, "backup_locations_customer_managed_key": 0, "backup_locations_geo_replicated": 1, "backup_locations_read": 1, "backups_completed": 2, "backups_failed": 0, "backups_failed_unresolved": 0, "backups_metadata_unreadable": 0, "backups_other_phase": 0, "backups_partially_failed": 0, "backups_total": 2, "backups_volume_snapshots_incomplete": 0, "backups_volume_snapshots_incomplete_unresolved": 0, "clean_restore_within_interval": true, "days_since_last_clean_restore": 4, "deliberate_failure_test_patterns": [], "deliberate_failure_tests": 0, "excluded_storage_accounts": 0, "expected_schedules": 1, "expected_schedules_without_backups": 0, "expected_schedules_without_backups_names": [], "expired_backups_not_deleted": 0, "expiry_grace_hours": 24, "in_scope_storage_accounts": 1, "max_hours_since_scheduled_success": 5.0, "missed_run_lookback_days": 7, "missed_scheduled_runs": 0, "resource_exclusion_patterns": [], "resource_exclusion_patterns_unmatched": [], "restore_test_interval_days": 30, "restores_date_unknown": 0, "restores_results_missing": 0, "restores_total": 1, "restores_with_errors": 0, "restores_with_errors_unresolved": 0, "restores_without_errors": 1, "rpo_hours": 168, "schedules_exceeding_rpo_renamed": 0, "schedules_observed": 1, "schedules_with_missed_runs": 0, "schedules_with_success_within_window": 1, "schedules_without_success_within_window": [], "success_window_hours": 26}}}' diff --git a/validators/azure/azure_endpoint_availability_lbs_all_judged.yaml b/validators/azure/azure_endpoint_availability_lbs_all_judged.yaml index 7805a800..f692fac6 100644 --- a/validators/azure/azure_endpoint_availability_lbs_all_judged.yaml +++ b/validators/azure/azure_endpoint_availability_lbs_all_judged.yaml @@ -5,16 +5,20 @@ role: configuration statement: > Every Standard load balancer with load-balancing rules or health probes was judged against the target: none is missing an hour of a metric that applies or unread (load_balancers_not_judged is 0). - Passes while no target is configured; that case fails 'Availability Target Is Configured' instead. - These are inputs to availability reporting; they do not replace the availability reporting itself. - Does not check whether the collection run succeeded. + Also fails while no target is configured (see 'Availability Target Is Configured' for the cause), so + an undecided or unread value is never reported as a pass. These are inputs to availability + reporting; they do not replace the availability reporting itself. Does not check whether the + collection run succeeded. -regex: '"load_balancers_not_judged":\s*(?:0|null)\b' -rules_summary: MATCH_COUNT NOT_EQUALS 0 +regex: '"load_balancers_not_judged":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 validation_rules: - regexOperation: { type: MATCH_COUNT } criteria: NOT_EQUALS value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # load_balancers_not_judged + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } evidence_sets: - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_lbs_meet_target.yaml b/validators/azure/azure_endpoint_availability_lbs_meet_target.yaml index 616a8aab..22356150 100644 --- a/validators/azure/azure_endpoint_availability_lbs_meet_target.yaml +++ b/validators/azure/azure_endpoint_availability_lbs_meet_target.yaml @@ -6,17 +6,20 @@ statement: > No Standard load balancer with every hour measured had an average data-path availability or health-probe status below availability_target_percentage (load_balancers_below_target is 0). Only the metrics that apply are judged: data path when the load balancer has load-balancing rules, health - probe when it has probes; one with neither (outbound-only) is not judged. Passes while no target is - configured; that case fails 'Availability Target Is Configured' instead. These are inputs to - availability reporting; they do not replace the availability reporting itself. Does not check - whether the collection run succeeded. + probe when it has probes; one with neither (outbound-only) is not judged. Also fails while no target + is configured (see 'Availability Target Is Configured' for the cause), so an undecided or unread + value is never reported as a pass. These are inputs to availability reporting; they do not replace + the availability reporting itself. Does not check whether the collection run succeeded. -regex: '"load_balancers_below_target":\s*(?:0|null)\b' -rules_summary: MATCH_COUNT NOT_EQUALS 0 +regex: '"load_balancers_below_target":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 validation_rules: - regexOperation: { type: MATCH_COUNT } criteria: NOT_EQUALS value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # load_balancers_below_target + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } evidence_sets: - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_tests_all_judged.yaml b/validators/azure/azure_endpoint_availability_tests_all_judged.yaml index e4f7f525..c395d84e 100644 --- a/validators/azure/azure_endpoint_availability_tests_all_judged.yaml +++ b/validators/azure/azure_endpoint_availability_tests_all_judged.yaml @@ -4,17 +4,20 @@ type: AUTOMATED role: configuration statement: > Every enabled availability test was judged against the target: none is missing an hour of the - lookback or unread (availability_tests_not_judged is 0). Passes while no target is configured; that - case fails 'Availability Target Is Configured' instead. These are inputs to availability reporting; - they do not replace the availability reporting itself. Does not check whether the collection run - succeeded. + lookback or unread (availability_tests_not_judged is 0). Also fails while no target is configured + (see 'Availability Target Is Configured' for the cause), so an undecided or unread value is never + reported as a pass. These are inputs to availability reporting; they do not replace the availability + reporting itself. Does not check whether the collection run succeeded. -regex: '"availability_tests_not_judged":\s*(?:0|null)\b' -rules_summary: MATCH_COUNT NOT_EQUALS 0 +regex: '"availability_tests_not_judged":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 validation_rules: - regexOperation: { type: MATCH_COUNT } criteria: NOT_EQUALS value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # availability_tests_not_judged + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } evidence_sets: - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_endpoint_availability_tests_meet_target.yaml b/validators/azure/azure_endpoint_availability_tests_meet_target.yaml index 228bc8ac..fdde6053 100644 --- a/validators/azure/azure_endpoint_availability_tests_meet_target.yaml +++ b/validators/azure/azure_endpoint_availability_tests_meet_target.yaml @@ -4,18 +4,21 @@ type: AUTOMATED role: configuration statement: > No enabled availability test with every hour measured averaged below availability_target_percentage - over the lookback (availability_tests_below_target is 0). Passes while no target is configured; that - case fails 'Availability Target Is Configured' instead. Tests that could not be judged are checked - by 'Every Test Was Judged'. Supports KSI-CNA-OFA. These are inputs to availability reporting; they - do not replace the availability reporting itself. Does not check whether the collection run - succeeded. + over the lookback (availability_tests_below_target is 0). Also fails while no target is configured + (see 'Availability Target Is Configured' for the cause), so an undecided or unread value is never + reported as a pass. Tests that could not be judged are checked by 'Every Test Was Judged'. Supports + KSI-CNA-OFA. These are inputs to availability reporting; they do not replace the availability + reporting itself. Does not check whether the collection run succeeded. -regex: '"availability_tests_below_target":\s*(?:0|null)\b' -rules_summary: MATCH_COUNT NOT_EQUALS 0 +regex: '"availability_tests_below_target":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 validation_rules: - regexOperation: { type: MATCH_COUNT } criteria: NOT_EQUALS value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # availability_tests_below_target + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } evidence_sets: - EVD-AZURE-ENDPOINT-AVAILABILITY diff --git a/validators/azure/azure_flexible_server_backups_restore_exercised.yaml b/validators/azure/azure_flexible_server_backups_restore_exercised.yaml index 2052ccb0..71aa8c7f 100644 --- a/validators/azure/azure_flexible_server_backups_restore_exercised.yaml +++ b/validators/azure/azure_flexible_server_backups_restore_exercised.yaml @@ -3,13 +3,14 @@ name: 'Azure PostgreSQL and MySQL Backups: Point-in-Time Restore Exercised Withi type: AUTOMATED role: configuration statement: > - At least one server was created by an Azure point-in-time restore within restore_lookback_days. - Passes while no lookback is configured; that case fails 'Restore Lookback Is Configured' instead. - Supports KSI-RPL-TRC. Only servers that still exist are seen, so a restore test that deleted its - server does not count. Shows a restore was performed, not that the restored database or application - worked, and not the recovery time. Does not check whether the collection run succeeded. + At least one server was created by an Azure point-in-time restore within restore_lookback_days. Also + fails while no lookback is configured (see 'Restore Lookback Is Configured' for the cause), so an + undecided or unread value is never reported as a pass. Supports KSI-RPL-TRC. Only servers that still + exist are seen, so a restore test that deleted its server does not count. Shows a restore was + performed, not that the restored database or application worked, and not the recovery time. Does not + check whether the collection run succeeded. -regex: '"restored_servers_within_lookback":\s*(?:[1-9]\d*|null)\b' +regex: '"restored_servers_within_lookback":\s*(?[1-9]\d*)' rules_summary: MATCH_COUNT NOT_EQUALS 0 validation_rules: - regexOperation: { type: MATCH_COUNT } diff --git a/validators/azure/azure_flexible_server_backups_retention_as_required.yaml b/validators/azure/azure_flexible_server_backups_retention_as_required.yaml index 7244582c..387b826a 100644 --- a/validators/azure/azure_flexible_server_backups_retention_as_required.yaml +++ b/validators/azure/azure_flexible_server_backups_retention_as_required.yaml @@ -4,16 +4,20 @@ type: AUTOMATED role: configuration statement: > No backup server keeps backups for fewer days than required_retention_days, the minimum authorized - retention; keeping them longer meets it (servers_retention_below_required is 0). Passes while - required_retention_days is not set; that case fails 'Required Retention Is Configured' instead. - Supports KSI-SVC-RUD. Does not check whether the collection run succeeded. + retention; keeping them longer meets it (servers_retention_below_required is 0). Also fails while + required_retention_days is not set (see 'Required Retention Is Configured' for the cause), so an + undecided or unread value is never reported as a pass. Supports KSI-SVC-RUD. Does not check whether + the collection run succeeded. -regex: '"servers_retention_below_required":\s*(?:0|null)\b' -rules_summary: MATCH_COUNT NOT_EQUALS 0 +regex: '"servers_retention_below_required":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 validation_rules: - regexOperation: { type: MATCH_COUNT } criteria: NOT_EQUALS value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # servers_retention_below_required + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } evidence_sets: - EVD-AZURE-FLEXIBLE-SERVER-BACKUPS diff --git a/validators/azure/azure_velero_clean_restore_within_interval.yaml b/validators/azure/azure_velero_clean_restore_within_interval.yaml index 0c5acaf7..3f301c81 100644 --- a/validators/azure/azure_velero_clean_restore_within_interval.yaml +++ b/validators/azure/azure_velero_clean_restore_within_interval.yaml @@ -4,13 +4,13 @@ type: AUTOMATED role: configuration statement: > The newest Velero restore that completed without errors is no older than restore_test_interval_days. - Passes while no interval is configured or restores are unread; those cases fail 'Restore-Test - Interval Is Configured' and 'Restore Records Read' instead. Supports KSI-RPL-TRC. A restore without - errors does not show the recovered application works, and does not prove the recovery time - objective; that needs a timed recovery walkthrough. Does not check whether the collection run - succeeded. + Also fails while no interval is configured or restores are unread (see 'Restore-Test Interval Is + Configured' and 'Restore Records Read' for the cause), so an undecided or unread value is never + reported as a pass. Supports KSI-RPL-TRC. A restore without errors does not show the recovered + application works, and does not prove the recovery time objective; that needs a timed recovery + walkthrough. Does not check whether the collection run succeeded. -regex: '"clean_restore_within_interval":\s*(?:true|null)\b' +regex: '"clean_restore_within_interval":\s*true\b' rules_summary: MATCH_COUNT NOT_EQUALS 0 validation_rules: - regexOperation: { type: MATCH_COUNT } diff --git a/validators/azure/azure_velero_expected_schedules_have_backups.yaml b/validators/azure/azure_velero_expected_schedules_have_backups.yaml index 2299d853..a7aacdba 100644 --- a/validators/azure/azure_velero_expected_schedules_have_backups.yaml +++ b/validators/azure/azure_velero_expected_schedules_have_backups.yaml @@ -3,18 +3,21 @@ name: 'Azure Velero: Every Expected Schedule Has a Backup' type: AUTOMATED role: configuration statement: > - No expected schedule is missing from backup storage (expected_schedules_without_backups is 0). - Passes while expected_schedules is not set or a location is unread; those cases fail 'Expected - Backup Schedules Are Configured' and 'Every Backup Storage Location Read' instead, so an unset value - never reads as a broken backup. Supports KSI-RPL-ABO. Does not check whether the collection run + No expected schedule is missing from backup storage (expected_schedules_without_backups is 0). Also + fails while expected_schedules is not set or a location is unread (see 'Expected Backup Schedules + Are Configured' and 'Every Backup Storage Location Read' for the cause), so an undecided or unread + value is never reported as a pass. Supports KSI-RPL-ABO. Does not check whether the collection run succeeded. -regex: '"expected_schedules_without_backups":\s*(?:0|null)\b' -rules_summary: MATCH_COUNT NOT_EQUALS 0 +regex: '"expected_schedules_without_backups":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 validation_rules: - regexOperation: { type: MATCH_COUNT } criteria: NOT_EQUALS value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # expected_schedules_without_backups + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } evidence_sets: - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_no_missed_scheduled_runs.yaml b/validators/azure/azure_velero_no_missed_scheduled_runs.yaml index c3470665..4a2a1422 100644 --- a/validators/azure/azure_velero_no_missed_scheduled_runs.yaml +++ b/validators/azure/azure_velero_no_missed_scheduled_runs.yaml @@ -5,17 +5,21 @@ role: configuration statement: > No expected schedule missed a run (missed_scheduled_runs is 0), counted from the gaps between Completed backups with 10% grace, over the part of missed_run_lookback_days the backups are kept - for, so a backup Velero deleted at the end of its retention is not a missed run. Passes while - expected_schedules is not set or a location is unread; those cases fail 'Expected Backup Schedules - Are Configured' and 'Every Backup Storage Location Read' instead. Supports KSI-RPL-ABO. Does not - check whether the collection run succeeded. + for, so a backup Velero deleted at the end of its retention is not a missed run. Also fails while + expected_schedules is not set or a location is unread (see 'Expected Backup Schedules Are + Configured' and 'Every Backup Storage Location Read' for the cause), so an undecided or unread value + is never reported as a pass. Supports KSI-RPL-ABO. Does not check whether the collection run + succeeded. -regex: '"missed_scheduled_runs":\s*(?:0|null)\b' -rules_summary: MATCH_COUNT NOT_EQUALS 0 +regex: '"missed_scheduled_runs":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 validation_rules: - regexOperation: { type: MATCH_COUNT } criteria: NOT_EQUALS value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # missed_scheduled_runs + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } evidence_sets: - EVD-AZURE-VELERO-BACKUPS diff --git a/validators/azure/azure_velero_no_schedule_exceeds_rpo.yaml b/validators/azure/azure_velero_no_schedule_exceeds_rpo.yaml index 37e9067a..3f9731ce 100644 --- a/validators/azure/azure_velero_no_schedule_exceeds_rpo.yaml +++ b/validators/azure/azure_velero_no_schedule_exceeds_rpo.yaml @@ -4,15 +4,19 @@ type: AUTOMATED role: configuration statement: > No schedule has gone longer than rpo_hours without a Completed backup (schedules_exceeding_rpo is - 0). Passes while rpo_hours is not set; that case fails 'Recovery Point Objective Is Configured' - instead. Supports KSI-RPL-ABO. Does not check whether the collection run succeeded. + 0). Also fails while rpo_hours is not set (see 'Recovery Point Objective Is Configured' for the + cause), so an undecided or unread value is never reported as a pass. Supports KSI-RPL-ABO. Does not + check whether the collection run succeeded. -regex: '"schedules_exceeding_rpo":\s*(?:0|null)\b' -rules_summary: MATCH_COUNT NOT_EQUALS 0 +regex: '"schedules_exceeding_rpo":\s*(?\d+)' +rules_summary: MATCH_COUNT NOT_EQUALS 0; MATCH_GROUP[1] EQUALS 0 validation_rules: - regexOperation: { type: MATCH_COUNT } criteria: NOT_EQUALS value: { type: CUSTOM_TEXT, customText: "0" } + - regexOperation: { type: MATCH_GROUP, groupNumber: 1 } # schedules_exceeding_rpo + criteria: EQUALS + value: { type: CUSTOM_TEXT, customText: "0" } evidence_sets: - EVD-AZURE-VELERO-BACKUPS