# 第八章 安全架构设计

安全架构是 LLM 应用安全的基石。良好的架构设计可以从根本上降低安全风险，而架构缺陷则可能导致无论如何加固都存在漏洞。

本章聚焦于 LLM 安全架构设计，主要内容包括：

* **8.1 纵深防御原则**：构建多层次的安全防护体系
* **8.2 大语言模型安全架构模式**：介绍经过验证的架构模式
* **8.3 权限与访问控制**：设计细粒度的权限管理机制
* **8.4 安全开发生命周期**：将安全融入开发全过程
* **8.5 隐私增强技术与数据保护**：探讨联邦学习、机密计算等 PETs 在 LLM 中的应用
* **8.6 供应链与基础设施安全**：管控上下游大模型组件供应链风险

通过本章的学习，读者将掌握设计安全 LLM 系统的核心原则和方法。

{% @mermaid/diagram content="flowchart TB
subgraph "安全架构框架"
A\["纵深防御"] --> E\["安全的 LLM 应用"]
B\["架构模式"] --> E
C\["访问控制"] --> E
D\["安全开发"] --> E
end" %}

***

> **📚 延伸阅读**：关于 ClawHub 技能生态的供应链安全风险（Leaky Skills、ClawHavoc 事件），参见 [《OpenClaw 从入门到精通》第 5.3 节和第 11.4 节](https://yeasy.gitbook.io/openclaw_guide)。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yeasy.gitbook.io/ai_security_guide/di-san-bu-fen-fang-yu-pian/08_architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
