blockmine 1.24.0 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.en.md +427 -0
  3. package/README.md +40 -0
  4. package/backend/cli.js +1 -1
  5. package/backend/src/ai/plugin-assistant-system-prompt.md +664 -5
  6. package/backend/src/api/routes/bots.js +13 -0
  7. package/backend/src/api/routes/servers.js +14 -2
  8. package/backend/src/core/BotProcess.js +98 -2
  9. package/backend/src/core/PluginLoader.js +83 -3
  10. package/backend/src/core/PluginManager.js +75 -5
  11. package/backend/src/core/services/BotLifecycleService.js +186 -2
  12. package/backend/src/server.js +11 -1
  13. package/frontend/dist/assets/browser-ponyfill-DN7pwmHT.js +2 -0
  14. package/frontend/dist/assets/index-LSy71uwm.js +11261 -0
  15. package/frontend/dist/assets/index-SfhKxI4-.css +32 -0
  16. package/frontend/dist/flags/en.svg +32 -0
  17. package/frontend/dist/flags/ru.svg +5 -0
  18. package/frontend/dist/index.html +2 -2
  19. package/frontend/dist/locales/en/admin.json +100 -0
  20. package/frontend/dist/locales/en/api-keys.json +58 -0
  21. package/frontend/dist/locales/en/bots.json +110 -0
  22. package/frontend/dist/locales/en/common.json +47 -0
  23. package/frontend/dist/locales/en/configuration.json +22 -0
  24. package/frontend/dist/locales/en/console.json +10 -0
  25. package/frontend/dist/locales/en/dashboard.json +85 -0
  26. package/frontend/dist/locales/en/dialogs.json +70 -0
  27. package/frontend/dist/locales/en/event-graphs.json +50 -0
  28. package/frontend/dist/locales/en/graph-store.json +70 -0
  29. package/frontend/dist/locales/en/login.json +34 -0
  30. package/frontend/dist/locales/en/management.json +114 -0
  31. package/frontend/dist/locales/en/minecraft-viewer.json +27 -0
  32. package/frontend/dist/locales/en/nodes.json +1077 -0
  33. package/frontend/dist/locales/en/permissions.json +50 -0
  34. package/frontend/dist/locales/en/plugin-detail.json +49 -0
  35. package/frontend/dist/locales/en/plugins.json +110 -0
  36. package/frontend/dist/locales/en/proxies.json +81 -0
  37. package/frontend/dist/locales/en/servers.json +39 -0
  38. package/frontend/dist/locales/en/setup.json +17 -0
  39. package/frontend/dist/locales/en/sidebar.json +27 -0
  40. package/frontend/dist/locales/en/tasks.json +62 -0
  41. package/frontend/dist/locales/en/visual-editor.json +219 -0
  42. package/frontend/dist/locales/en/websocket.json +86 -0
  43. package/frontend/dist/locales/ru/admin.json +100 -0
  44. package/frontend/dist/locales/ru/api-keys.json +58 -0
  45. package/frontend/dist/locales/ru/bots.json +110 -0
  46. package/frontend/dist/locales/ru/common.json +49 -0
  47. package/frontend/dist/locales/ru/configuration.json +22 -0
  48. package/frontend/dist/locales/ru/console.json +10 -0
  49. package/frontend/dist/locales/ru/dashboard.json +85 -0
  50. package/frontend/dist/locales/ru/dialogs.json +70 -0
  51. package/frontend/dist/locales/ru/event-graphs.json +50 -0
  52. package/frontend/dist/locales/ru/graph-store.json +70 -0
  53. package/frontend/dist/locales/ru/login.json +34 -0
  54. package/frontend/dist/locales/ru/management.json +114 -0
  55. package/frontend/dist/locales/ru/minecraft-viewer.json +27 -0
  56. package/frontend/dist/locales/ru/nodes.json +1077 -0
  57. package/frontend/dist/locales/ru/permissions.json +50 -0
  58. package/frontend/dist/locales/ru/plugin-detail.json +49 -0
  59. package/frontend/dist/locales/ru/plugins.json +110 -0
  60. package/frontend/dist/locales/ru/proxies.json +81 -0
  61. package/frontend/dist/locales/ru/servers.json +39 -0
  62. package/frontend/dist/locales/ru/setup.json +17 -0
  63. package/frontend/dist/locales/ru/sidebar.json +27 -0
  64. package/frontend/dist/locales/ru/tasks.json +62 -0
  65. package/frontend/dist/locales/ru/visual-editor.json +221 -0
  66. package/frontend/dist/locales/ru/websocket.json +86 -0
  67. package/frontend/dist/monacoeditorwork/css.worker.bundle.js +7 -7
  68. package/frontend/dist/monacoeditorwork/html.worker.bundle.js +7 -7
  69. package/frontend/dist/monacoeditorwork/json.worker.bundle.js +7 -7
  70. package/frontend/dist/monacoeditorwork/ts.worker.bundle.js +3 -3
  71. package/frontend/package.json +4 -0
  72. package/package.json +1 -1
  73. package/screen/3dviewer.png +0 -0
  74. package/screen/console.png +0 -0
  75. package/screen/dashboard.png +0 -0
  76. package/screen/graph_collabe.png +0 -0
  77. package/screen/graph_live_debug.png +0 -0
  78. package/screen/language_selector.png +0 -0
  79. package/screen/management_command.png +0 -0
  80. package/screen/node_debug_trace.png +0 -0
  81. package/screen/plugin_/320/276/320/261/320/267/320/276/321/200.png +0 -0
  82. package/screen/websocket.png +0 -0
  83. package/screen//320/275/320/260/321/201/321/202/321/200/320/276/320/271/320/272/320/270_/320/276/321/202/320/264/320/265/320/273/321/214/320/275/321/213/321/205_/320/272/320/276/320/274/320/260/320/275/320/264_/320/272/320/260/320/266/320/264/321/203_/320/272/320/276/320/274/320/260/320/275/320/273/320/264/321/203_/320/274/320/276/320/266/320/275/320/276_/320/275/320/260/321/201/321/202/321/200/320/260/320/270/320/262/320/260/321/202/321/214.png +0 -0
  84. package/screen//320/277/320/273/320/260/320/275/320/270/321/200/320/276/320/262/321/211/320/270/320/272_/320/274/320/276/320/266/320/275/320/276_/320/267/320/260/320/264/320/260/320/262/320/260/321/202/321/214_/320/264/320/265/320/271/321/201/321/202/320/262/320/270/321/217_/320/277/320/276_/320/262/321/200/320/265/320/274/320/265/320/275/320/270.png +0 -0
  85. package/.claude/agents/README.md +0 -469
  86. package/.claude/agents/auth-route-debugger.md +0 -118
  87. package/.claude/agents/auth-route-tester.md +0 -93
  88. package/.claude/agents/auto-error-resolver.md +0 -97
  89. package/.claude/agents/build-optimizer.md +0 -236
  90. package/.claude/agents/code-architect.md +0 -34
  91. package/.claude/agents/code-architecture-reviewer.md +0 -83
  92. package/.claude/agents/code-explorer.md +0 -51
  93. package/.claude/agents/code-refactor-master.md +0 -94
  94. package/.claude/agents/code-reviewer.md +0 -46
  95. package/.claude/agents/cost-optimizer.md +0 -134
  96. package/.claude/agents/deployment-orchestrator.md +0 -113
  97. package/.claude/agents/documentation-architect.md +0 -82
  98. package/.claude/agents/frontend-error-fixer.md +0 -77
  99. package/.claude/agents/iac-code-generator.md +0 -71
  100. package/.claude/agents/incident-responder.md +0 -346
  101. package/.claude/agents/infrastructure-architect.md +0 -31
  102. package/.claude/agents/kubernetes-specialist.md +0 -56
  103. package/.claude/agents/migration-planner.md +0 -181
  104. package/.claude/agents/network-architect.md +0 -196
  105. package/.claude/agents/plan-reviewer.md +0 -52
  106. package/.claude/agents/refactor-planner.md +0 -63
  107. package/.claude/agents/security-scanner.md +0 -102
  108. package/.claude/agents/web-research-specialist.md +0 -78
  109. package/.claude/commands/cost-analysis.md +0 -315
  110. package/.claude/commands/dev-docs-update.md +0 -55
  111. package/.claude/commands/dev-docs.md +0 -51
  112. package/.claude/commands/feature-dev.md +0 -125
  113. package/.claude/commands/incident-debug.md +0 -247
  114. package/.claude/commands/infra-plan.md +0 -81
  115. package/.claude/commands/migration-plan.md +0 -478
  116. package/.claude/commands/route-research-for-testing.md +0 -37
  117. package/.claude/commands/security-review.md +0 -66
  118. package/.claude/hooks/CONFIG.md +0 -448
  119. package/.claude/hooks/README.md +0 -163
  120. package/.claude/hooks/SKILL_ACTIVATION_COMPLETE.md +0 -226
  121. package/.claude/hooks/WINDOWS_HOOKS_README.md +0 -151
  122. package/.claude/hooks/add-skill-activation-banners.ts +0 -132
  123. package/.claude/hooks/comprehensive-skill-test.ts +0 -1315
  124. package/.claude/hooks/error-handling-reminder.sh +0 -12
  125. package/.claude/hooks/error-handling-reminder.ts +0 -222
  126. package/.claude/hooks/k8s-manifest-validator.sh +0 -56
  127. package/.claude/hooks/package-lock.json +0 -556
  128. package/.claude/hooks/package.json +0 -16
  129. package/.claude/hooks/post-tool-use-tracker.ps1 +0 -174
  130. package/.claude/hooks/post-tool-use-tracker.sh +0 -183
  131. package/.claude/hooks/security-policy-check.sh +0 -247
  132. package/.claude/hooks/skill-activation-prompt.ps1 +0 -10
  133. package/.claude/hooks/skill-activation-prompt.sh +0 -10
  134. package/.claude/hooks/skill-activation-prompt.ts +0 -141
  135. package/.claude/hooks/stop-build-check-enhanced.sh +0 -130
  136. package/.claude/hooks/terraform-validator.sh +0 -53
  137. package/.claude/hooks/test-input.json +0 -7
  138. package/.claude/hooks/test-skill-activation.ts +0 -427
  139. package/.claude/hooks/trigger-build-resolver.sh +0 -79
  140. package/.claude/hooks/tsc-check.sh +0 -173
  141. package/.claude/hooks/tsconfig.json +0 -19
  142. package/.claude/settings.json +0 -59
  143. package/.claude/settings.local.json +0 -67
  144. package/.claude/skills/README.md +0 -507
  145. package/.claude/skills/api-engineering/SKILL.md +0 -63
  146. package/.claude/skills/api-engineering/resources/api-versioning.md +0 -88
  147. package/.claude/skills/api-engineering/resources/graphql-patterns.md +0 -106
  148. package/.claude/skills/api-engineering/resources/rate-limiting.md +0 -118
  149. package/.claude/skills/api-engineering/resources/rest-api-design.md +0 -105
  150. package/.claude/skills/backend-dev-guidelines/SKILL.md +0 -306
  151. package/.claude/skills/backend-dev-guidelines/resources/architecture-overview.md +0 -451
  152. package/.claude/skills/backend-dev-guidelines/resources/async-and-errors.md +0 -307
  153. package/.claude/skills/backend-dev-guidelines/resources/complete-examples.md +0 -638
  154. package/.claude/skills/backend-dev-guidelines/resources/configuration.md +0 -275
  155. package/.claude/skills/backend-dev-guidelines/resources/database-patterns.md +0 -224
  156. package/.claude/skills/backend-dev-guidelines/resources/middleware-guide.md +0 -213
  157. package/.claude/skills/backend-dev-guidelines/resources/routing-and-controllers.md +0 -756
  158. package/.claude/skills/backend-dev-guidelines/resources/sentry-and-monitoring.md +0 -336
  159. package/.claude/skills/backend-dev-guidelines/resources/services-and-repositories.md +0 -789
  160. package/.claude/skills/backend-dev-guidelines/resources/testing-guide.md +0 -235
  161. package/.claude/skills/backend-dev-guidelines/resources/validation-patterns.md +0 -754
  162. package/.claude/skills/budget-and-cost-management/SKILL.md +0 -850
  163. package/.claude/skills/build-engineering/SKILL.md +0 -431
  164. package/.claude/skills/build-engineering/resources/artifact-repositories.md +0 -72
  165. package/.claude/skills/build-engineering/resources/build-caching.md +0 -96
  166. package/.claude/skills/build-engineering/resources/build-pipelines.md +0 -105
  167. package/.claude/skills/build-engineering/resources/build-security.md +0 -95
  168. package/.claude/skills/build-engineering/resources/build-systems.md +0 -389
  169. package/.claude/skills/build-engineering/resources/compilation-optimization.md +0 -201
  170. package/.claude/skills/build-engineering/resources/dependency-management.md +0 -73
  171. package/.claude/skills/build-engineering/resources/monorepo-builds.md +0 -110
  172. package/.claude/skills/build-engineering/resources/performance-optimization.md +0 -113
  173. package/.claude/skills/build-engineering/resources/reproducible-builds.md +0 -82
  174. package/.claude/skills/cloud-engineering/SKILL.md +0 -675
  175. package/.claude/skills/cloud-engineering/resources/aws-patterns.md +0 -742
  176. package/.claude/skills/cloud-engineering/resources/azure-patterns.md +0 -714
  177. package/.claude/skills/cloud-engineering/resources/cleared-cloud-environments.md +0 -987
  178. package/.claude/skills/cloud-engineering/resources/cloud-cost-optimization.md +0 -757
  179. package/.claude/skills/cloud-engineering/resources/cloud-networking.md +0 -1058
  180. package/.claude/skills/cloud-engineering/resources/cloud-security-tools.md +0 -1530
  181. package/.claude/skills/cloud-engineering/resources/cloud-security.md +0 -990
  182. package/.claude/skills/cloud-engineering/resources/gcp-patterns.md +0 -758
  183. package/.claude/skills/cloud-engineering/resources/migration-strategies.md +0 -820
  184. package/.claude/skills/cloud-engineering/resources/multi-cloud-strategies.md +0 -670
  185. package/.claude/skills/cloud-engineering/resources/oci-patterns.md +0 -1198
  186. package/.claude/skills/cloud-engineering/resources/serverless-patterns.md +0 -795
  187. package/.claude/skills/cloud-engineering/resources/well-architected-frameworks.md +0 -966
  188. package/.claude/skills/cybersecurity/SKILL.md +0 -409
  189. package/.claude/skills/cybersecurity/resources/security-architecture.md +0 -266
  190. package/.claude/skills/database-engineering/SKILL.md +0 -61
  191. package/.claude/skills/database-engineering/resources/backup-and-recovery.md +0 -72
  192. package/.claude/skills/database-engineering/resources/database-replication.md +0 -63
  193. package/.claude/skills/database-engineering/resources/postgresql-fundamentals.md +0 -70
  194. package/.claude/skills/database-engineering/resources/query-optimization.md +0 -68
  195. package/.claude/skills/devsecops/SKILL.md +0 -374
  196. package/.claude/skills/devsecops/resources/ci-cd-security.md +0 -204
  197. package/.claude/skills/devsecops/resources/compliance-automation.md +0 -530
  198. package/.claude/skills/devsecops/resources/compliance-frameworks.md +0 -2322
  199. package/.claude/skills/devsecops/resources/container-security.md +0 -915
  200. package/.claude/skills/devsecops/resources/cspm-integration.md +0 -1440
  201. package/.claude/skills/devsecops/resources/policy-enforcement.md +0 -619
  202. package/.claude/skills/devsecops/resources/secrets-management.md +0 -755
  203. package/.claude/skills/devsecops/resources/security-monitoring.md +0 -146
  204. package/.claude/skills/devsecops/resources/security-scanning.md +0 -887
  205. package/.claude/skills/devsecops/resources/security-testing.md +0 -203
  206. package/.claude/skills/devsecops/resources/supply-chain-security.md +0 -518
  207. package/.claude/skills/devsecops/resources/vulnerability-management.md +0 -481
  208. package/.claude/skills/devsecops/resources/zero-trust-architecture.md +0 -177
  209. package/.claude/skills/documentation-as-code/SKILL.md +0 -323
  210. package/.claude/skills/documentation-as-code/resources/api-documentation.md +0 -90
  211. package/.claude/skills/documentation-as-code/resources/changelog-management.md +0 -79
  212. package/.claude/skills/documentation-as-code/resources/diagram-generation.md +0 -44
  213. package/.claude/skills/documentation-as-code/resources/docs-as-code-workflow.md +0 -99
  214. package/.claude/skills/documentation-as-code/resources/documentation-automation.md +0 -68
  215. package/.claude/skills/documentation-as-code/resources/documentation-sites.md +0 -79
  216. package/.claude/skills/documentation-as-code/resources/markdown-best-practices.md +0 -162
  217. package/.claude/skills/documentation-as-code/resources/openapi-specification.md +0 -77
  218. package/.claude/skills/documentation-as-code/resources/readme-engineering.md +0 -60
  219. package/.claude/skills/documentation-as-code/resources/technical-writing-guide.md +0 -202
  220. package/.claude/skills/engineering-management/SKILL.md +0 -356
  221. package/.claude/skills/engineering-management/resources/career-ladders.md +0 -609
  222. package/.claude/skills/engineering-management/resources/hiring-and-assessment.md +0 -555
  223. package/.claude/skills/engineering-management/resources/one-on-one-guides.md +0 -609
  224. package/.claude/skills/engineering-management/resources/resource-planning.md +0 -557
  225. package/.claude/skills/engineering-management/resources/team-organization-patterns.md +0 -491
  226. package/.claude/skills/engineering-management/resources/technical-interviews.md +0 -474
  227. package/.claude/skills/engineering-operations-management/SKILL.md +0 -817
  228. package/.claude/skills/error-tracking/SKILL.md +0 -379
  229. package/.claude/skills/frontend-design/SKILL.md +0 -42
  230. package/.claude/skills/frontend-dev-guidelines/SKILL.md +0 -403
  231. package/.claude/skills/frontend-dev-guidelines/resources/common-patterns.md +0 -331
  232. package/.claude/skills/frontend-dev-guidelines/resources/complete-examples.md +0 -872
  233. package/.claude/skills/frontend-dev-guidelines/resources/component-patterns.md +0 -502
  234. package/.claude/skills/frontend-dev-guidelines/resources/data-fetching.md +0 -767
  235. package/.claude/skills/frontend-dev-guidelines/resources/file-organization.md +0 -502
  236. package/.claude/skills/frontend-dev-guidelines/resources/loading-and-error-states.md +0 -501
  237. package/.claude/skills/frontend-dev-guidelines/resources/performance.md +0 -406
  238. package/.claude/skills/frontend-dev-guidelines/resources/routing-guide.md +0 -364
  239. package/.claude/skills/frontend-dev-guidelines/resources/styling-guide.md +0 -428
  240. package/.claude/skills/frontend-dev-guidelines/resources/typescript-standards.md +0 -418
  241. package/.claude/skills/general-it-engineering/SKILL.md +0 -393
  242. package/.claude/skills/general-it-engineering/resources/asset-management.md +0 -712
  243. package/.claude/skills/general-it-engineering/resources/automation-orchestration.md +0 -817
  244. package/.claude/skills/general-it-engineering/resources/business-continuity.md +0 -786
  245. package/.claude/skills/general-it-engineering/resources/change-management.md +0 -715
  246. package/.claude/skills/general-it-engineering/resources/enterprise-monitoring.md +0 -729
  247. package/.claude/skills/general-it-engineering/resources/help-desk-operations.md +0 -738
  248. package/.claude/skills/general-it-engineering/resources/incident-service-management.md +0 -834
  249. package/.claude/skills/general-it-engineering/resources/it-governance.md +0 -753
  250. package/.claude/skills/general-it-engineering/resources/itil-framework.md +0 -503
  251. package/.claude/skills/general-it-engineering/resources/service-management.md +0 -669
  252. package/.claude/skills/infrastructure-architecture/SKILL.md +0 -328
  253. package/.claude/skills/infrastructure-architecture/resources/architecture-decision-records.md +0 -505
  254. package/.claude/skills/infrastructure-architecture/resources/architecture-patterns.md +0 -528
  255. package/.claude/skills/infrastructure-architecture/resources/capacity-planning.md +0 -453
  256. package/.claude/skills/infrastructure-architecture/resources/cleared-environment-architecture.md +0 -773
  257. package/.claude/skills/infrastructure-architecture/resources/cost-architecture.md +0 -499
  258. package/.claude/skills/infrastructure-architecture/resources/data-architecture.md +0 -501
  259. package/.claude/skills/infrastructure-architecture/resources/disaster-recovery.md +0 -535
  260. package/.claude/skills/infrastructure-architecture/resources/migration-architecture.md +0 -512
  261. package/.claude/skills/infrastructure-architecture/resources/multi-region-design.md +0 -608
  262. package/.claude/skills/infrastructure-architecture/resources/reference-architectures.md +0 -562
  263. package/.claude/skills/infrastructure-architecture/resources/security-architecture.md +0 -538
  264. package/.claude/skills/infrastructure-architecture/resources/system-design-principles.md +0 -489
  265. package/.claude/skills/infrastructure-architecture/resources/workload-classification.md +0 -1000
  266. package/.claude/skills/infrastructure-strategy/SKILL.md +0 -924
  267. package/.claude/skills/network-engineering/SKILL.md +0 -385
  268. package/.claude/skills/network-engineering/resources/dns-management.md +0 -738
  269. package/.claude/skills/network-engineering/resources/load-balancing.md +0 -820
  270. package/.claude/skills/network-engineering/resources/network-architecture.md +0 -546
  271. package/.claude/skills/network-engineering/resources/network-security.md +0 -921
  272. package/.claude/skills/network-engineering/resources/network-troubleshooting.md +0 -749
  273. package/.claude/skills/network-engineering/resources/routing-switching.md +0 -373
  274. package/.claude/skills/network-engineering/resources/sdn-networking.md +0 -695
  275. package/.claude/skills/network-engineering/resources/service-mesh-networking.md +0 -777
  276. package/.claude/skills/network-engineering/resources/tcp-ip-protocols.md +0 -444
  277. package/.claude/skills/network-engineering/resources/vpn-connectivity.md +0 -672
  278. package/.claude/skills/node-development/SKILL.md +0 -317
  279. package/.claude/skills/observability-engineering/SKILL.md +0 -101
  280. package/.claude/skills/observability-engineering/resources/apm-tools.md +0 -97
  281. package/.claude/skills/observability-engineering/resources/correlation-strategies.md +0 -87
  282. package/.claude/skills/observability-engineering/resources/distributed-tracing.md +0 -98
  283. package/.claude/skills/observability-engineering/resources/logs-aggregation.md +0 -118
  284. package/.claude/skills/observability-engineering/resources/observability-cost-optimization.md +0 -141
  285. package/.claude/skills/observability-engineering/resources/opentelemetry.md +0 -110
  286. package/.claude/skills/platform-engineering/SKILL.md +0 -555
  287. package/.claude/skills/platform-engineering/resources/architecture-overview.md +0 -600
  288. package/.claude/skills/platform-engineering/resources/container-orchestration.md +0 -916
  289. package/.claude/skills/platform-engineering/resources/cost-optimization.md +0 -634
  290. package/.claude/skills/platform-engineering/resources/developer-platforms.md +0 -670
  291. package/.claude/skills/platform-engineering/resources/gitops-automation.md +0 -650
  292. package/.claude/skills/platform-engineering/resources/infrastructure-as-code.md +0 -778
  293. package/.claude/skills/platform-engineering/resources/infrastructure-standards.md +0 -708
  294. package/.claude/skills/platform-engineering/resources/multi-tenancy.md +0 -602
  295. package/.claude/skills/platform-engineering/resources/platform-security.md +0 -711
  296. package/.claude/skills/platform-engineering/resources/resource-management.md +0 -592
  297. package/.claude/skills/platform-engineering/resources/service-mesh.md +0 -628
  298. package/.claude/skills/release-engineering/SKILL.md +0 -393
  299. package/.claude/skills/release-engineering/resources/artifact-management.md +0 -108
  300. package/.claude/skills/release-engineering/resources/build-optimization.md +0 -84
  301. package/.claude/skills/release-engineering/resources/ci-cd-pipelines.md +0 -411
  302. package/.claude/skills/release-engineering/resources/deployment-strategies.md +0 -197
  303. package/.claude/skills/release-engineering/resources/pipeline-security.md +0 -62
  304. package/.claude/skills/release-engineering/resources/progressive-delivery.md +0 -83
  305. package/.claude/skills/release-engineering/resources/release-automation.md +0 -68
  306. package/.claude/skills/release-engineering/resources/release-orchestration.md +0 -77
  307. package/.claude/skills/release-engineering/resources/rollback-strategies.md +0 -66
  308. package/.claude/skills/release-engineering/resources/versioning-strategies.md +0 -59
  309. package/.claude/skills/route-tester/SKILL.md +0 -392
  310. package/.claude/skills/skill-developer/ADVANCED.md +0 -197
  311. package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +0 -306
  312. package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +0 -152
  313. package/.claude/skills/skill-developer/SKILL.md +0 -430
  314. package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +0 -315
  315. package/.claude/skills/skill-developer/TRIGGER_TYPES.md +0 -305
  316. package/.claude/skills/skill-developer/TROUBLESHOOTING.md +0 -514
  317. package/.claude/skills/skill-rules.json +0 -2989
  318. package/.claude/skills/sre/SKILL.md +0 -464
  319. package/.claude/skills/sre/resources/alerting-best-practices.md +0 -282
  320. package/.claude/skills/sre/resources/capacity-planning.md +0 -226
  321. package/.claude/skills/sre/resources/chaos-engineering.md +0 -193
  322. package/.claude/skills/sre/resources/disaster-recovery.md +0 -232
  323. package/.claude/skills/sre/resources/incident-management.md +0 -436
  324. package/.claude/skills/sre/resources/observability-stack.md +0 -240
  325. package/.claude/skills/sre/resources/on-call-runbooks.md +0 -167
  326. package/.claude/skills/sre/resources/performance-optimization.md +0 -108
  327. package/.claude/skills/sre/resources/reliability-patterns.md +0 -183
  328. package/.claude/skills/sre/resources/slo-sli-sla.md +0 -464
  329. package/.claude/skills/sre/resources/toil-reduction.md +0 -145
  330. package/.claude/skills/systems-engineering/SKILL.md +0 -648
  331. package/.claude/skills/systems-engineering/resources/automation-patterns.md +0 -771
  332. package/.claude/skills/systems-engineering/resources/configuration-management.md +0 -998
  333. package/.claude/skills/systems-engineering/resources/linux-administration.md +0 -672
  334. package/.claude/skills/systems-engineering/resources/networking-fundamentals.md +0 -982
  335. package/.claude/skills/systems-engineering/resources/performance-tuning.md +0 -871
  336. package/.claude/skills/systems-engineering/resources/powershell-scripting.md +0 -482
  337. package/.claude/skills/systems-engineering/resources/security-hardening.md +0 -739
  338. package/.claude/skills/systems-engineering/resources/shell-scripting.md +0 -915
  339. package/.claude/skills/systems-engineering/resources/storage-management.md +0 -628
  340. package/.claude/skills/systems-engineering/resources/system-monitoring.md +0 -787
  341. package/.claude/skills/systems-engineering/resources/troubleshooting-guide.md +0 -753
  342. package/.claude/skills/systems-engineering/resources/windows-administration.md +0 -738
  343. package/.claude/skills/technical-leadership/SKILL.md +0 -728
  344. package/backend/docs/SECRETS_DOCUMENTATION.md +0 -327
  345. package/frontend/dist/assets/index-BC-NbKXi.css +0 -32
  346. package/frontend/dist/assets/index-DqJXZMHY.js +0 -11266
@@ -1,921 +0,0 @@
1
- # Network Security
2
-
3
- Comprehensive guide to network security covering firewalls, security groups, network ACLs, DDoS protection, WAF, IDS/IPS, zero trust architecture, and network security best practices.
4
-
5
- ## Table of Contents
6
-
7
- - [Overview](#overview)
8
- - [Security Layers](#security-layers)
9
- - [Firewalls](#firewalls)
10
- - [Security Groups](#security-groups)
11
- - [Network ACLs](#network-acls)
12
- - [DDoS Protection](#ddos-protection)
13
- - [Web Application Firewall (WAF)](#web-application-firewall-waf)
14
- - [IDS/IPS](#idsips)
15
- - [Zero Trust Architecture](#zero-trust-architecture)
16
- - [Network Segmentation](#network-segmentation)
17
- - [VPN Security](#vpn-security)
18
- - [Best Practices](#best-practices)
19
- - [Anti-Patterns](#anti-patterns)
20
-
21
- ## Overview
22
-
23
- Network security protects infrastructure, data, and communications from unauthorized access, attacks, and vulnerabilities through multiple layers of defense.
24
-
25
- **Defense in Depth Strategy:**
26
- ```
27
- ┌────────────────────────────────────────┐
28
- │ Application Security (WAF, API GW) │
29
- ├────────────────────────────────────────┤
30
- │ Host Security (Firewall, SELinux) │
31
- ├────────────────────────────────────────┤
32
- │ Network Security (SG, NACL, FW) │
33
- ├────────────────────────────────────────┤
34
- │ Perimeter Security (DDoS, IPS) │
35
- ├────────────────────────────────────────┤
36
- │ Physical Security (Data Centers) │
37
- └────────────────────────────────────────┘
38
- ```
39
-
40
- ## Security Layers
41
-
42
- ### Network Zones
43
-
44
- ```
45
- ┌─────────────────────────────────────────────┐
46
- │ Internet │
47
- └──────────────────┬──────────────────────────┘
48
-
49
- ┌──────▼──────┐
50
- │ Firewall │
51
- │ (Perimeter)│
52
- └──────┬──────┘
53
-
54
- ┌───────────┴───────────┐
55
- │ │
56
- ┌─────▼─────┐ ┌─────▼──────┐
57
- │ DMZ │ │ Internal │
58
- │ (Public) │ │ (Private) │
59
- └───────────┘ └─────┬───────┘
60
-
61
- ┌───────▼────────┐
62
- │ Database │
63
- │ (Isolated) │
64
- └────────────────┘
65
- ```
66
-
67
- ### Security Control Layers
68
-
69
- 1. **Perimeter:** DDoS protection, firewall
70
- 2. **Network:** Security groups, NACLs, routing
71
- 3. **Application:** WAF, API gateway
72
- 4. **Data:** Encryption, access control
73
- 5. **Identity:** IAM, authentication, authorization
74
-
75
- ## Firewalls
76
-
77
- ### iptables Configuration
78
-
79
- ```bash
80
- #!/bin/bash
81
- # Flush existing rules
82
- iptables -F
83
- iptables -X
84
- iptables -t nat -F
85
- iptables -t nat -X
86
- iptables -t mangle -F
87
- iptables -t mangle -X
88
-
89
- # Default policies
90
- iptables -P INPUT DROP
91
- iptables -P FORWARD DROP
92
- iptables -P OUTPUT ACCEPT
93
-
94
- # Allow loopback
95
- iptables -A INPUT -i lo -j ACCEPT
96
- iptables -A OUTPUT -o lo -j ACCEPT
97
-
98
- # Allow established connections
99
- iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
100
-
101
- # Allow SSH (rate limited)
102
- iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m recent --set
103
- iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m recent --update --seconds 60 --hitcount 4 -j DROP
104
- iptables -A INPUT -p tcp --dport 22 -j ACCEPT
105
-
106
- # Allow HTTP/HTTPS
107
- iptables -A INPUT -p tcp --dport 80 -j ACCEPT
108
- iptables -A INPUT -p tcp --dport 443 -j ACCEPT
109
-
110
- # Allow ping (rate limited)
111
- iptables -A INPUT -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT
112
-
113
- # Drop invalid packets
114
- iptables -A INPUT -m conntrack --ctstate INVALID -j DROP
115
-
116
- # Log dropped packets
117
- iptables -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7
118
-
119
- # Drop everything else
120
- iptables -A INPUT -j DROP
121
-
122
- # Save rules
123
- iptables-save > /etc/iptables/rules.v4
124
- ```
125
-
126
- ### nftables (Modern Replacement)
127
-
128
- ```bash
129
- #!/usr/sbin/nft -f
130
-
131
- flush ruleset
132
-
133
- table inet filter {
134
- chain input {
135
- type filter hook input priority 0; policy drop;
136
-
137
- # Allow loopback
138
- iif lo accept
139
-
140
- # Allow established/related
141
- ct state established,related accept
142
-
143
- # Allow SSH (rate limited)
144
- tcp dport 22 ct state new limit rate 3/minute accept
145
-
146
- # Allow HTTP/HTTPS
147
- tcp dport { 80, 443 } accept
148
-
149
- # Allow ICMP
150
- icmp type echo-request limit rate 1/second accept
151
-
152
- # Log drops
153
- limit rate 5/minute log prefix "nftables drop: "
154
- }
155
-
156
- chain forward {
157
- type filter hook forward priority 0; policy drop;
158
- }
159
-
160
- chain output {
161
- type filter hook output priority 0; policy accept;
162
- }
163
- }
164
- ```
165
-
166
- ### UFW (Uncomplicated Firewall)
167
-
168
- ```bash
169
- # Enable UFW
170
- ufw enable
171
-
172
- # Default policies
173
- ufw default deny incoming
174
- ufw default allow outgoing
175
-
176
- # Allow SSH
177
- ufw allow ssh
178
- ufw limit ssh # Rate limit SSH
179
-
180
- # Allow HTTP/HTTPS
181
- ufw allow 80/tcp
182
- ufw allow 443/tcp
183
-
184
- # Allow from specific IP
185
- ufw allow from 192.0.2.0/24 to any port 3306
186
-
187
- # Allow specific service
188
- ufw allow from 10.0.0.0/8 to any app 'PostgreSQL'
189
-
190
- # Deny specific IP
191
- ufw deny from 203.0.113.0/24
192
-
193
- # Show status
194
- ufw status verbose
195
-
196
- # Application profiles
197
- ufw app list
198
- ufw allow 'Nginx Full'
199
- ```
200
-
201
- ## Security Groups
202
-
203
- ### AWS Security Groups
204
-
205
- ```hcl
206
- # Web server security group
207
- resource "aws_security_group" "web" {
208
- name = "web-server-sg"
209
- description = "Security group for web servers"
210
- vpc_id = aws_vpc.main.id
211
-
212
- # Inbound rules
213
- ingress {
214
- description = "HTTPS from ALB"
215
- from_port = 443
216
- to_port = 443
217
- protocol = "tcp"
218
- security_groups = [aws_security_group.alb.id]
219
- }
220
-
221
- ingress {
222
- description = "HTTP from ALB"
223
- from_port = 80
224
- to_port = 80
225
- protocol = "tcp"
226
- security_groups = [aws_security_group.alb.id]
227
- }
228
-
229
- ingress {
230
- description = "SSH from bastion"
231
- from_port = 22
232
- to_port = 22
233
- protocol = "tcp"
234
- security_groups = [aws_security_group.bastion.id]
235
- }
236
-
237
- # Outbound rules
238
- egress {
239
- description = "All outbound"
240
- from_port = 0
241
- to_port = 0
242
- protocol = "-1"
243
- cidr_blocks = ["0.0.0.0/0"]
244
- }
245
-
246
- tags = {
247
- Name = "web-server-sg"
248
- }
249
- }
250
-
251
- # Database security group
252
- resource "aws_security_group" "database" {
253
- name = "database-sg"
254
- description = "Security group for database servers"
255
- vpc_id = aws_vpc.main.id
256
-
257
- ingress {
258
- description = "PostgreSQL from app servers"
259
- from_port = 5432
260
- to_port = 5432
261
- protocol = "tcp"
262
- security_groups = [aws_security_group.app.id]
263
- }
264
-
265
- egress {
266
- description = "No outbound internet"
267
- from_port = 0
268
- to_port = 0
269
- protocol = "-1"
270
- cidr_blocks = []
271
- }
272
-
273
- tags = {
274
- Name = "database-sg"
275
- }
276
- }
277
-
278
- # ALB security group
279
- resource "aws_security_group" "alb" {
280
- name = "alb-sg"
281
- description = "Security group for application load balancer"
282
- vpc_id = aws_vpc.main.id
283
-
284
- ingress {
285
- description = "HTTPS from internet"
286
- from_port = 443
287
- to_port = 443
288
- protocol = "tcp"
289
- cidr_blocks = ["0.0.0.0/0"]
290
- }
291
-
292
- ingress {
293
- description = "HTTP from internet (redirect to HTTPS)"
294
- from_port = 80
295
- to_port = 80
296
- protocol = "tcp"
297
- cidr_blocks = ["0.0.0.0/0"]
298
- }
299
-
300
- egress {
301
- description = "To web servers"
302
- from_port = 0
303
- to_port = 0
304
- protocol = "-1"
305
- security_groups = [aws_security_group.web.id]
306
- }
307
-
308
- tags = {
309
- Name = "alb-sg"
310
- }
311
- }
312
- ```
313
-
314
- ### Azure Network Security Groups
315
-
316
- ```hcl
317
- resource "azurerm_network_security_group" "web" {
318
- name = "web-nsg"
319
- location = azurerm_resource_group.main.location
320
- resource_group_name = azurerm_resource_group.main.name
321
-
322
- security_rule {
323
- name = "AllowHTTPS"
324
- priority = 100
325
- direction = "Inbound"
326
- access = "Allow"
327
- protocol = "Tcp"
328
- source_port_range = "*"
329
- destination_port_range = "443"
330
- source_address_prefix = "*"
331
- destination_address_prefix = "*"
332
- }
333
-
334
- security_rule {
335
- name = "AllowHTTP"
336
- priority = 110
337
- direction = "Inbound"
338
- access = "Allow"
339
- protocol = "Tcp"
340
- source_port_range = "*"
341
- destination_port_range = "80"
342
- source_address_prefix = "*"
343
- destination_address_prefix = "*"
344
- }
345
-
346
- security_rule {
347
- name = "DenyAll"
348
- priority = 4096
349
- direction = "Inbound"
350
- access = "Deny"
351
- protocol = "*"
352
- source_port_range = "*"
353
- destination_port_range = "*"
354
- source_address_prefix = "*"
355
- destination_address_prefix = "*"
356
- }
357
- }
358
- ```
359
-
360
- ## Network ACLs
361
-
362
- ### AWS Network ACLs
363
-
364
- ```hcl
365
- resource "aws_network_acl" "public" {
366
- vpc_id = aws_vpc.main.id
367
- subnet_ids = aws_subnet.public[*].id
368
-
369
- # Inbound rules
370
- ingress {
371
- protocol = "tcp"
372
- rule_no = 100
373
- action = "allow"
374
- cidr_block = "0.0.0.0/0"
375
- from_port = 443
376
- to_port = 443
377
- }
378
-
379
- ingress {
380
- protocol = "tcp"
381
- rule_no = 110
382
- action = "allow"
383
- cidr_block = "0.0.0.0/0"
384
- from_port = 80
385
- to_port = 80
386
- }
387
-
388
- # Ephemeral ports for return traffic
389
- ingress {
390
- protocol = "tcp"
391
- rule_no = 120
392
- action = "allow"
393
- cidr_block = "0.0.0.0/0"
394
- from_port = 1024
395
- to_port = 65535
396
- }
397
-
398
- # Deny known malicious IPs
399
- ingress {
400
- protocol = "-1"
401
- rule_no = 50
402
- action = "deny"
403
- cidr_block = "203.0.113.0/24" # Example malicious range
404
- from_port = 0
405
- to_port = 0
406
- }
407
-
408
- # Outbound rules
409
- egress {
410
- protocol = "-1"
411
- rule_no = 100
412
- action = "allow"
413
- cidr_block = "0.0.0.0/0"
414
- from_port = 0
415
- to_port = 0
416
- }
417
-
418
- tags = {
419
- Name = "public-nacl"
420
- }
421
- }
422
- ```
423
-
424
- ## DDoS Protection
425
-
426
- ### AWS Shield and WAF
427
-
428
- ```hcl
429
- # AWS Shield Advanced
430
- resource "aws_shield_protection" "alb" {
431
- name = "alb-protection"
432
- resource_arn = aws_lb.main.arn
433
- }
434
-
435
- # Rate limiting with WAF
436
- resource "aws_wafv2_web_acl" "main" {
437
- name = "rate-limit-acl"
438
- scope = "REGIONAL"
439
-
440
- default_action {
441
- allow {}
442
- }
443
-
444
- # Rate limiting rule
445
- rule {
446
- name = "RateLimitRule"
447
- priority = 1
448
-
449
- action {
450
- block {}
451
- }
452
-
453
- statement {
454
- rate_based_statement {
455
- limit = 2000
456
- aggregate_key_type = "IP"
457
- }
458
- }
459
-
460
- visibility_config {
461
- cloudwatch_metrics_enabled = true
462
- metric_name = "RateLimitRule"
463
- sampled_requests_enabled = true
464
- }
465
- }
466
-
467
- # Geographic blocking
468
- rule {
469
- name = "GeoBlockRule"
470
- priority = 2
471
-
472
- action {
473
- block {}
474
- }
475
-
476
- statement {
477
- geo_match_statement {
478
- country_codes = ["CN", "RU"] # Example countries
479
- }
480
- }
481
-
482
- visibility_config {
483
- cloudwatch_metrics_enabled = true
484
- metric_name = "GeoBlockRule"
485
- sampled_requests_enabled = true
486
- }
487
- }
488
-
489
- visibility_config {
490
- cloudwatch_metrics_enabled = true
491
- metric_name = "MainWebACL"
492
- sampled_requests_enabled = true
493
- }
494
- }
495
-
496
- # Associate WAF with ALB
497
- resource "aws_wafv2_web_acl_association" "main" {
498
- resource_arn = aws_lb.main.arn
499
- web_acl_arn = aws_wafv2_web_acl.main.arn
500
- }
501
- ```
502
-
503
- ### Cloudflare DDoS Protection
504
-
505
- ```hcl
506
- resource "cloudflare_rate_limit" "api" {
507
- zone_id = var.cloudflare_zone_id
508
-
509
- threshold = 1000
510
- period = 60
511
- match {
512
- request {
513
- url_pattern = "api.example.com/v1/*"
514
- }
515
- }
516
-
517
- action {
518
- mode = "challenge"
519
- timeout = 3600
520
- }
521
- }
522
-
523
- resource "cloudflare_firewall_rule" "block_countries" {
524
- zone_id = var.cloudflare_zone_id
525
- description = "Block traffic from specific countries"
526
- filter_id = cloudflare_filter.geo_block.id
527
- action = "block"
528
- }
529
-
530
- resource "cloudflare_filter" "geo_block" {
531
- zone_id = var.cloudflare_zone_id
532
- description = "Block specific countries"
533
- expression = "(ip.geoip.country in {\"CN\" \"RU\"})"
534
- }
535
- ```
536
-
537
- ## Web Application Firewall (WAF)
538
-
539
- ### AWS WAF Rules
540
-
541
- ```hcl
542
- resource "aws_wafv2_web_acl" "comprehensive" {
543
- name = "comprehensive-waf"
544
- scope = "REGIONAL"
545
-
546
- default_action {
547
- allow {}
548
- }
549
-
550
- # SQL injection protection
551
- rule {
552
- name = "SQLInjectionRule"
553
- priority = 1
554
-
555
- override_action {
556
- none {}
557
- }
558
-
559
- statement {
560
- managed_rule_group_statement {
561
- vendor_name = "AWS"
562
- name = "AWSManagedRulesSQLiRuleSet"
563
- }
564
- }
565
-
566
- visibility_config {
567
- cloudwatch_metrics_enabled = true
568
- metric_name = "SQLInjectionRule"
569
- sampled_requests_enabled = true
570
- }
571
- }
572
-
573
- # XSS protection
574
- rule {
575
- name = "XSSRule"
576
- priority = 2
577
-
578
- override_action {
579
- none {}
580
- }
581
-
582
- statement {
583
- managed_rule_group_statement {
584
- vendor_name = "AWS"
585
- name = "AWSManagedRulesKnownBadInputsRuleSet"
586
- }
587
- }
588
-
589
- visibility_config {
590
- cloudwatch_metrics_enabled = true
591
- metric_name = "XSSRule"
592
- sampled_requests_enabled = true
593
- }
594
- }
595
-
596
- # Core rule set
597
- rule {
598
- name = "CoreRuleSet"
599
- priority = 3
600
-
601
- override_action {
602
- none {}
603
- }
604
-
605
- statement {
606
- managed_rule_group_statement {
607
- vendor_name = "AWS"
608
- name = "AWSManagedRulesCommonRuleSet"
609
- }
610
- }
611
-
612
- visibility_config {
613
- cloudwatch_metrics_enabled = true
614
- metric_name = "CoreRuleSet"
615
- sampled_requests_enabled = true
616
- }
617
- }
618
-
619
- # IP reputation list
620
- rule {
621
- name = "IPReputationRule"
622
- priority = 4
623
-
624
- override_action {
625
- none {}
626
- }
627
-
628
- statement {
629
- managed_rule_group_statement {
630
- vendor_name = "AWS"
631
- name = "AWSManagedRulesAmazonIpReputationList"
632
- }
633
- }
634
-
635
- visibility_config {
636
- cloudwatch_metrics_enabled = true
637
- metric_name = "IPReputationRule"
638
- sampled_requests_enabled = true
639
- }
640
- }
641
-
642
- visibility_config {
643
- cloudwatch_metrics_enabled = true
644
- metric_name = "ComprehensiveWAF"
645
- sampled_requests_enabled = true
646
- }
647
- }
648
- ```
649
-
650
- ## IDS/IPS
651
-
652
- ### Snort Configuration
653
-
654
- ```bash
655
- # /etc/snort/snort.conf
656
-
657
- # Network variables
658
- ipvar HOME_NET 10.0.0.0/8
659
- ipvar EXTERNAL_NET !$HOME_NET
660
-
661
- # Port lists
662
- portvar HTTP_PORTS [80,443,8080]
663
- portvar SSH_PORTS 22
664
-
665
- # Rules
666
- include $RULE_PATH/local.rules
667
-
668
- # Custom rules in local.rules:
669
- # Detect port scanning
670
- alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"SCAN nmap TCP"; flags:S; threshold:type both, track by_src, count 5, seconds 60; sid:10000001;)
671
-
672
- # Detect SSH brute force
673
- alert tcp $EXTERNAL_NET any -> $HOME_NET $SSH_PORTS (msg:"SSH Brute Force Attempt"; flow:to_server,established; content:"SSH"; threshold:type both, track by_src, count 5, seconds 60; sid:10000002;)
674
-
675
- # Detect SQL injection
676
- alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"SQL Injection Attempt"; flow:to_server,established; content:"UNION"; content:"SELECT"; sid:10000003;)
677
- ```
678
-
679
- ### Suricata (Modern IDS/IPS)
680
-
681
- ```yaml
682
- # /etc/suricata/suricata.yaml
683
- vars:
684
- address-groups:
685
- HOME_NET: "[10.0.0.0/8]"
686
- EXTERNAL_NET: "!$HOME_NET"
687
-
688
- port-groups:
689
- HTTP_PORTS: "80,443"
690
- SSH_PORTS: "22"
691
-
692
- af-packet:
693
- - interface: eth0
694
- threads: auto
695
- cluster-id: 99
696
- cluster-type: cluster_flow
697
-
698
- outputs:
699
- - fast:
700
- enabled: yes
701
- filename: fast.log
702
- - eve-log:
703
- enabled: yes
704
- filetype: regular
705
- filename: eve.json
706
- types:
707
- - alert
708
- - http
709
- - dns
710
- - tls
711
-
712
- # Custom rules
713
- rule-files:
714
- - local.rules
715
- - emerging-threats.rules
716
- ```
717
-
718
- ## Zero Trust Architecture
719
-
720
- ### Zero Trust Principles
721
-
722
- ```
723
- Traditional: Zero Trust:
724
- Trust inside Trust nothing
725
- Verify once Verify always
726
- Network-based Identity-based
727
- Perimeter security Micro-segmentation
728
- ```
729
-
730
- ### Implementation with Service Mesh
731
-
732
- ```yaml
733
- # Istio authorization policy (zero trust)
734
- apiVersion: security.istio.io/v1beta1
735
- kind: AuthorizationPolicy
736
- metadata:
737
- name: deny-all
738
- namespace: production
739
- spec:
740
- {} # Empty spec denies all
741
-
742
- ---
743
- apiVersion: security.istio.io/v1beta1
744
- kind: AuthorizationPolicy
745
- metadata:
746
- name: allow-frontend-to-api
747
- namespace: production
748
- spec:
749
- selector:
750
- matchLabels:
751
- app: api
752
- action: ALLOW
753
- rules:
754
- - from:
755
- - source:
756
- principals: ["cluster.local/ns/production/sa/frontend"]
757
- to:
758
- - operation:
759
- methods: ["GET", "POST"]
760
- paths: ["/api/*"]
761
-
762
- ---
763
- # Require mTLS
764
- apiVersion: security.istio.io/v1beta1
765
- kind: PeerAuthentication
766
- metadata:
767
- name: default
768
- namespace: production
769
- spec:
770
- mtls:
771
- mode: STRICT
772
- ```
773
-
774
- ## Network Segmentation
775
-
776
- ### VLAN Segmentation
777
-
778
- ```
779
- VLAN 10: Management (10.0.10.0/24)
780
- VLAN 20: Web Tier (10.0.20.0/24)
781
- VLAN 30: App Tier (10.0.30.0/24)
782
- VLAN 40: Database Tier (10.0.40.0/24)
783
- VLAN 50: DMZ (10.0.50.0/24)
784
- ```
785
-
786
- ### Kubernetes Network Policies
787
-
788
- ```yaml
789
- # Default deny all
790
- apiVersion: networking.k8s.io/v1
791
- kind: NetworkPolicy
792
- metadata:
793
- name: default-deny-all
794
- namespace: production
795
- spec:
796
- podSelector: {}
797
- policyTypes:
798
- - Ingress
799
- - Egress
800
-
801
- ---
802
- # Allow frontend to API
803
- apiVersion: networking.k8s.io/v1
804
- kind: NetworkPolicy
805
- metadata:
806
- name: allow-frontend-to-api
807
- namespace: production
808
- spec:
809
- podSelector:
810
- matchLabels:
811
- app: api
812
- policyTypes:
813
- - Ingress
814
- ingress:
815
- - from:
816
- - podSelector:
817
- matchLabels:
818
- app: frontend
819
- ports:
820
- - protocol: TCP
821
- port: 8080
822
-
823
- ---
824
- # Allow API to database
825
- apiVersion: networking.k8s.io/v1
826
- kind: NetworkPolicy
827
- metadata:
828
- name: allow-api-to-db
829
- namespace: production
830
- spec:
831
- podSelector:
832
- matchLabels:
833
- app: database
834
- policyTypes:
835
- - Ingress
836
- ingress:
837
- - from:
838
- - podSelector:
839
- matchLabels:
840
- app: api
841
- ports:
842
- - protocol: TCP
843
- port: 5432
844
-
845
- ---
846
- # Allow egress to external APIs
847
- apiVersion: networking.k8s.io/v1
848
- kind: NetworkPolicy
849
- metadata:
850
- name: allow-api-egress
851
- namespace: production
852
- spec:
853
- podSelector:
854
- matchLabels:
855
- app: api
856
- policyTypes:
857
- - Egress
858
- egress:
859
- - to:
860
- - namespaceSelector: {}
861
- ports:
862
- - protocol: TCP
863
- port: 443
864
- - to:
865
- - podSelector:
866
- matchLabels:
867
- app: database
868
- ports:
869
- - protocol: TCP
870
- port: 5432
871
- ```
872
-
873
- ## VPN Security
874
-
875
- ### WireGuard Configuration
876
-
877
- ```ini
878
- # /etc/wireguard/wg0.conf
879
- [Interface]
880
- PrivateKey = <server-private-key>
881
- Address = 10.200.0.1/24
882
- ListenPort = 51820
883
- PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
884
- PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
885
-
886
- [Peer]
887
- # Client 1
888
- PublicKey = <client1-public-key>
889
- AllowedIPs = 10.200.0.2/32
890
-
891
- [Peer]
892
- # Client 2
893
- PublicKey = <client2-public-key>
894
- AllowedIPs = 10.200.0.3/32
895
- ```
896
-
897
- ## Best Practices
898
-
899
- 1. **Implement defense in depth** - Multiple security layers
900
- 2. **Principle of least privilege** - Minimum necessary access
901
- 3. **Default deny** - Explicitly allow only what's needed
902
- 4. **Network segmentation** - Isolate workloads and data
903
- 5. **Enable logging** - Monitor and audit all traffic
904
- 6. **Regular security audits** - Review and update rules
905
- 7. **Encrypt in transit** - Use TLS/mTLS for all communications
906
- 8. **Rate limiting** - Protect against abuse and DDoS
907
- 9. **Keep systems updated** - Patch vulnerabilities promptly
908
- 10. **Incident response plan** - Be prepared for security events
909
-
910
- ## Anti-Patterns
911
-
912
- - **0.0.0.0/0 everywhere** - Overly permissive rules
913
- - **No logging** - Can't detect or investigate incidents
914
- - **Single security layer** - Insufficient defense
915
- - **Trusting internal network** - Internal threats exist
916
- - **No rate limiting** - Vulnerable to DDoS
917
- - **Ignoring egress filtering** - Data exfiltration risk
918
- - **Weak encryption** - Use modern TLS versions only
919
- - **No security monitoring** - Can't detect breaches
920
- - **Manual firewall rules** - Inconsistent and error-prone
921
- - **No incident response plan** - Slow reaction to breaches