1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
import { MarkerType } from "@xyflow/react";
import type { ZTNodeData, ZTScenarioDefinition } from "../types";
const node = (
id: string,
x: number,
y: number,
data: ZTNodeData,
): Node<ZTNodeData> => ({
id,
type: "ztNode",
position: { x, y },
data,
});
const edgeOk = (
id: string,
source: string,
target: string,
label: string,
): Edge => ({
id,
source,
target,
label,
animated: true,
markerEnd: { type: MarkerType.ArrowClosed, width: 18, height: 18 },
style: { stroke: "#0d9488" },
labelStyle: { fill: "#134e4a", fontWeight: 500, fontSize: 11 },
labelBgStyle: { fill: "#ecfdf5", fillOpacity: 0.95 },
});
const edgeBlocked = (
id: string,
source: string,
target: string,
label: string,
): Edge => ({
id,
source,
target,
label,
animated: false,
markerEnd: { type: MarkerType.ArrowClosed, width: 18, height: 18, color: "#dc2626" },
style: { stroke: "#dc2626", strokeDasharray: "6 4" },
labelStyle: { fill: "#991b1b", fontWeight: 600, fontSize: 11 },
labelBgStyle: { fill: "#fef2f2", fillOpacity: 0.95 },
});
export const eastWestScenario: ZTScenarioDefinition = {
id: "east-west",
title: "Micro-segmentation east-west",
subtitle: "Contrôler les flux latéraux entre charges",
intro:
"Sans segmentation, un compromis sur un service peut se propager. Les politiques réseau et applicatives limitent qui peut parler à qui, avec observabilité centralisée.",
nodes: [
node("svc-a", 80, 200, {
kind: "workload",
label: "Service A",
role: "Microservice",
}),
node("svc-b", 480, 200, {
kind: "workload",
label: "Service B",
role: "Microservice",
}),
node("seg", 280, 200, {
kind: "gateway",
label: "Segmentation / politique",
role: "Contrôle réseau",
}),
node("siem", 280, 40, {
kind: "monitoring",
label: "SIEM / observabilité",
role: "Journalisation",
}),
],
edges: [
edgeOk("e-a-s", "svc-a", "seg", "Flux autorisé et inspecté"),
edgeOk("e-s-b", "seg", "svc-b", "Suite si politique OK"),
edgeBlocked("e-a-b", "svc-a", "svc-b", "Direct — refusé"),
edgeOk("e-a-m", "svc-a", "siem", "Événements"),
edgeOk("e-b-m", "svc-b", "siem", "Événements"),
],
steps: [
{
id: "ew1",
title: "Flux latéraux contrôlés",
description:
"Le chemin autorisé passe par la couche de segmentation (pare-feu distribué, service mesh, politiques cloud).",
highlightNodes: ["svc-a", "seg", "svc-b"],
highlightEdges: ["e-a-s", "e-s-b"],
pillars: ["network", "application"],
practices: [
"Définir des groupes de charges et des règles explicites (allow-list), pas un « tout ouvert » en interne.",
"Réviser régulièrement les règles avec les propriétaires métier.",
],
},
{
id: "ew2",
title: "Blocage du raccourci",
description:
"Une tentative de communication directe entre services sans passer par la politique est refusée et visible.",
highlightNodes: ["svc-a", "svc-b"],
highlightEdges: ["e-a-b"],
pillars: ["network", "data"],
practices: [
"Supposer la compromission : limiter le blast radius par défaut.",
"Tester les règles (red team / tests de fuite) pour valider la segmentation.",
],
},
{
id: "ew3",
title: "Visibilité et corrélation",
description:
"Les journaux remontent vers une couche d’observabilité pour corréler identités, flux et alertes.",
highlightNodes: ["svc-a", "svc-b", "siem"],
highlightEdges: ["e-a-m", "e-b-m"],
pillars: ["network", "application"],
practices: [
"Never trust, always verify : la supervision continue valide que les politiques sont effectivement appliquées.",
"Alertes sur les flux non conformes ou les nouvelles dépendances applicatives.",
],
},
],
};
|