1151 lines
57 KiB
HTML
1151 lines
57 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>身份认证中心 — 技术解析与开源项目匹配度分析</title>
|
||
<style>
|
||
/* ===== Ant Design 阿里云风格 Design Tokens ===== */
|
||
:root {
|
||
--color-primary: #1677FF;
|
||
--color-primary-hover: #4096FF;
|
||
--color-primary-active: #0958D9;
|
||
--color-primary-bg: #E6F4FF;
|
||
--color-success: #52C41A;
|
||
--color-warning: #FAAD14;
|
||
--color-error: #FF4D4F;
|
||
--color-info: #1677FF;
|
||
--bg: #F5F5F5;
|
||
--bg-container: #FFFFFF;
|
||
--bg-elevated: #FAFAFA;
|
||
--border: #D9D9D9;
|
||
--border-light: #F0F0F0;
|
||
--text-primary: #141414;
|
||
--text-secondary: #595959;
|
||
--text-tertiary: #8C8C8C;
|
||
--radius-sm: 6px;
|
||
--radius-md: 8px;
|
||
--radius-lg: 12px;
|
||
--shadow-sm: 0 1px 2px rgba(0,0,0,0.03), 0 1px 6px -1px rgba(0,0,0,0.02);
|
||
--shadow-md: 0 2px 4px rgba(0,0,0,0.04), 0 4px 12px -2px rgba(0,0,0,0.04);
|
||
--header-h: 64px;
|
||
--content-max: 1200px;
|
||
}
|
||
|
||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||
|
||
body {
|
||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||
'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
|
||
'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||
background: var(--bg);
|
||
color: var(--text-primary);
|
||
line-height: 1.57;
|
||
font-size: 14px;
|
||
}
|
||
|
||
/* ===== Header ===== */
|
||
.header-bar {
|
||
position: sticky; top: 0; height: var(--header-h);
|
||
background: rgba(255,255,255,0.85);
|
||
backdrop-filter: blur(12px);
|
||
border-bottom: 1px solid var(--border-light);
|
||
display: flex; align-items: center; padding: 0 40px; z-index: 100;
|
||
}
|
||
.header-bar .brand { display: flex; align-items: baseline; gap: 12px; }
|
||
.header-bar h1 {
|
||
font-size: 18px; font-weight: 700;
|
||
background: linear-gradient(135deg, var(--color-primary) 0%, #722ED1 100%);
|
||
-webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
|
||
}
|
||
.header-bar .tagline { font-size: 12px; color: var(--text-tertiary); }
|
||
|
||
/* ===== Sidebar Layout ===== */
|
||
.layout { display: flex; gap: 24px; }
|
||
.sidebar {
|
||
width: 260px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 32px);
|
||
max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto;
|
||
background: var(--bg-container); border: 1px solid var(--border);
|
||
border-radius: var(--radius-md); padding: 20px 0;
|
||
}
|
||
.sidebar::-webkit-scrollbar { width: 4px; }
|
||
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||
.sidebar-section { padding: 0 20px; margin-bottom: 16px; }
|
||
.sidebar-title {
|
||
font-size: 11px; font-weight: 600; color: var(--text-tertiary);
|
||
text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; padding: 0 12px;
|
||
}
|
||
.sidebar-link {
|
||
display: block; padding: 6px 12px; color: var(--text-secondary);
|
||
text-decoration: none; border-radius: var(--radius-sm); font-size: 13px;
|
||
border-left: 3px solid transparent; transition: all 0.15s ease;
|
||
}
|
||
.sidebar-link:hover { color: var(--color-primary); background: var(--color-primary-bg); }
|
||
.sidebar-link.active {
|
||
color: var(--color-primary); background: var(--color-primary-bg);
|
||
border-left-color: var(--color-primary); font-weight: 600;
|
||
}
|
||
.content { flex: 1; min-width: 0; }
|
||
|
||
/* ===== Content ===== */
|
||
.container { max-width: var(--content-max); margin: 0 auto; padding: 32px 40px 64px; }
|
||
.section {
|
||
background: var(--bg-container); border: 1px solid var(--border);
|
||
border-radius: var(--radius-md); padding: 32px; margin-bottom: 24px;
|
||
}
|
||
.section-title {
|
||
font-size: 24px; font-weight: 600; margin-bottom: 24px; padding-bottom: 12px;
|
||
border-bottom: 2px solid var(--color-primary); color: var(--text-primary);
|
||
}
|
||
.subsection { margin: 24px 0 16px; }
|
||
.subsection-title {
|
||
font-size: 18px; font-weight: 600; color: var(--text-primary);
|
||
padding-left: 12px; border-left: 3px solid var(--color-primary); margin-bottom: 12px;
|
||
}
|
||
.sub-subsection { margin: 16px 0; }
|
||
.sub-sub-title {
|
||
font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px;
|
||
}
|
||
p { margin-bottom: 12px; }
|
||
ul, ol { margin: 8px 0 16px 24px; }
|
||
li { margin-bottom: 4px; }
|
||
|
||
/* ===== Table ===== */
|
||
.table-wrap { overflow-x: auto; margin: 16px 0; }
|
||
table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
||
th, td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
|
||
th {
|
||
background: var(--bg-elevated); font-weight: 600; position: sticky; top: 0;
|
||
white-space: nowrap;
|
||
}
|
||
td { background: var(--bg-container); }
|
||
tr:hover td { background: var(--color-primary-bg); }
|
||
|
||
/* ===== Badges ===== */
|
||
.badge {
|
||
display: inline-block; padding: 2px 10px; border-radius: 12px;
|
||
font-size: 12px; font-weight: 600;
|
||
}
|
||
.badge--critical { background: #FFF1F0; color: #CF1322; border: 1px solid #FFA39E; }
|
||
.badge--high { background: #FFF7E6; color: #D46B08; border: 1px solid #FFD591; }
|
||
.badge--medium { background: #E6F4FF; color: #0958D9; border: 1px solid #91CAFF; }
|
||
.badge--low { background: #F6FFED; color: #389E0D; border: 1px solid #B7EB8F; }
|
||
|
||
/* ===== Score bar ===== */
|
||
.score-bar-wrap { display: flex; align-items: center; gap: 8px; }
|
||
.score-bar {
|
||
width: 80px; height: 6px; background: var(--border-light);
|
||
border-radius: 3px; overflow: hidden;
|
||
}
|
||
.score-bar-fill { height: 100%; border-radius: 3px; }
|
||
.score-bar-fill--high { background: var(--color-success); }
|
||
.score-bar-fill--medium { background: var(--color-warning); }
|
||
.score-bar-fill--low { background: var(--color-error); }
|
||
.score-text { font-weight: 600; font-size: 12px; min-width: 30px; }
|
||
|
||
/* ===== Metric Cards ===== */
|
||
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 20px 0; }
|
||
.metric-card {
|
||
background: var(--bg-elevated); border: 1px solid var(--border);
|
||
border-radius: var(--radius-md); padding: 20px; text-align: center;
|
||
}
|
||
.metric-value { font-size: 28px; font-weight: 700; color: var(--color-primary); }
|
||
.metric-label { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }
|
||
|
||
/* ===== Architecture Diagram ===== */
|
||
.arch-diagram {
|
||
background: var(--bg-elevated); border: 1px solid var(--border);
|
||
border-radius: var(--radius-md); padding: 24px; margin: 16px 0;
|
||
font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
|
||
font-size: 12px; line-height: 1.8; white-space: pre; overflow-x: auto;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
/* ===== Callout ===== */
|
||
.callout {
|
||
border-left: 4px solid var(--color-warning); background: #FFFBE6;
|
||
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
|
||
padding: 12px 16px; margin: 16px 0; font-size: 13px;
|
||
}
|
||
.callout--info { border-left-color: var(--color-primary); background: var(--color-primary-bg); }
|
||
.callout--danger { border-left-color: var(--color-error); background: #FFF1F0; }
|
||
.callout-title { font-weight: 600; margin-bottom: 4px; }
|
||
|
||
code {
|
||
background: var(--bg-elevated); padding: 2px 8px; border-radius: 4px;
|
||
font-size: 13px; font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
|
||
color: var(--color-primary);
|
||
}
|
||
.tag {
|
||
display: inline-block; padding: 1px 8px; border-radius: 4px;
|
||
font-size: 11px; font-weight: 600; background: var(--bg-elevated);
|
||
color: var(--text-secondary); border: 1px solid var(--border);
|
||
}
|
||
|
||
/* ===== Flow Diagram ===== */
|
||
.flow {
|
||
background: var(--bg-elevated); border: 1px solid var(--border);
|
||
border-radius: var(--radius-md); padding: 20px; margin: 16px 0;
|
||
text-align: center; font-size: 13px;
|
||
}
|
||
.flow-step {
|
||
display: inline-block; padding: 8px 16px; background: var(--bg-container);
|
||
border: 1px solid var(--border); border-radius: var(--radius-sm);
|
||
margin: 4px; font-size: 12px;
|
||
}
|
||
.flow-arrow { display: inline-block; color: var(--color-primary); font-weight: 700; margin: 0 4px; }
|
||
|
||
/* ===== TOC Mobile ===== */
|
||
.toc-toggle {
|
||
display: none; position: fixed; bottom: 20px; right: 20px; z-index: 200;
|
||
width: 48px; height: 48px; border-radius: 50%; background: var(--color-primary);
|
||
color: #fff; border: none; font-size: 20px; cursor: pointer; box-shadow: var(--shadow-md);
|
||
}
|
||
|
||
/* ===== Responsive ===== */
|
||
@media (max-width: 992px) {
|
||
.sidebar { width: 220px; }
|
||
.container { padding: 24px 24px 48px; }
|
||
.section { padding: 24px; }
|
||
}
|
||
@media (max-width: 768px) {
|
||
.sidebar {
|
||
display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
|
||
width: 100%; max-height: 100vh; z-index: 150; border-radius: 0;
|
||
padding-top: 64px;
|
||
}
|
||
.sidebar.open { display: block; }
|
||
.toc-toggle { display: flex; align-items: center; justify-content: center; }
|
||
.layout { flex-direction: column; }
|
||
.container { padding: 16px; }
|
||
.section { padding: 16px; }
|
||
.metrics { grid-template-columns: repeat(2, 1fr); }
|
||
.header-bar { padding: 0 16px; }
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<div class="header-bar">
|
||
<div class="brand">
|
||
<h1>身份认证中心</h1>
|
||
<span class="tagline">技术解析与开源项目匹配度分析报告</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="container">
|
||
<div class="layout">
|
||
|
||
<!-- Sidebar TOC -->
|
||
<nav class="sidebar" id="sidebar">
|
||
<div class="sidebar-section">
|
||
<div class="sidebar-title">概览</div>
|
||
<a href="#overview" class="sidebar-link active">系统定位</a>
|
||
<a href="#capabilities" class="sidebar-link">核心能力矩阵</a>
|
||
</div>
|
||
<div class="sidebar-section">
|
||
<div class="sidebar-title">技术深度解析</div>
|
||
<a href="#multi-auth" class="sidebar-link">多元化身份认证</a>
|
||
<a href="#sso-protocols" class="sidebar-link">SSO 协议体系</a>
|
||
<a href="#zero-trust" class="sidebar-link">零信任登录</a>
|
||
<a href="#password-filling" class="sidebar-link">密码代填方案</a>
|
||
<a href="#cas-integration" class="sidebar-link">CAS 对接架构</a>
|
||
<a href="#sdk" class="sidebar-link">多语言 SDK 体系</a>
|
||
</div>
|
||
<div class="sidebar-section">
|
||
<div class="sidebar-title">开源项目匹配</div>
|
||
<a href="#candidates" class="sidebar-link">候选项目总览</a>
|
||
<a href="#keycloak" class="sidebar-link">Keycloak 分析</a>
|
||
<a href="#casdoor" class="sidebar-link">Casdoor 分析</a>
|
||
<a href="#maxkey" class="sidebar-link">MaxKey 分析</a>
|
||
<a href="#apereo" class="sidebar-link">Apereo CAS 分析</a>
|
||
<a href="#syncope" class="sidebar-link">Apache Syncope 分析</a>
|
||
<a href="#comparison" class="sidebar-link">匹配度对比</a>
|
||
<a href="#recommendation" class="sidebar-link">选型建议</a>
|
||
</div>
|
||
</nav>
|
||
|
||
<!-- Main Content -->
|
||
<div class="content">
|
||
|
||
<!-- ====== 1. 系统定位 ====== -->
|
||
<div class="section" id="overview">
|
||
<h2 class="section-title">一、身份认证中心 — 系统定位</h2>
|
||
|
||
<p>
|
||
身份认证中心是整个全域智能认证与门户平台的<strong>底座系统</strong>,承担"一次认证、全域通行"的核心职责。
|
||
它不是简单的登录页面,而是一个完整的 <strong>IAM(Identity & Access Management)</strong>平台,
|
||
向上支撑门户、移动端、第三方业务系统的认证需求,向下对接零信任网关、短信服务、各业务系统的用户数据库。
|
||
</p>
|
||
|
||
<div class="arch-diagram">
|
||
┌────────────────────────────────────┐
|
||
│ 调用方 / 消费端 │
|
||
│ 门户平台 │ 移动端 App │ 业务系统 │
|
||
└──────────┬─────────────────────────┘
|
||
│
|
||
┌──────────▼─────────────────────────┐
|
||
│ 身份认证中心 (IAM) │
|
||
│ ┌──────────┐ ┌──────────────────┐ │
|
||
│ │ 认证引擎 │ │ 协议网关 │ │
|
||
│ │ 多因子鉴权│ │ CAS/OAuth/SAML │ │
|
||
│ └──────────┘ └──────────────────┘ │
|
||
│ ┌──────────┐ ┌──────────────────┐ │
|
||
│ │ 用户管理 │ │ 策略引擎 │ │
|
||
│ │ 组织架构 │ │ 排他登录/设备绑定 │ │
|
||
│ └──────────┘ └──────────────────┘ │
|
||
└──────────┬─────────────────────────┘
|
||
│
|
||
┌───────────────┼───────────────┐
|
||
▼ ▼ ▼
|
||
┌──────────┐ ┌──────────────┐ ┌────────────┐
|
||
│ 达梦数据库│ │ ESB 总线/Redis│ │ 零信任网关 │
|
||
│ 业务/日志 │ │ 会话/缓存层 │ │ 深信服aTrust│
|
||
└──────────┘ └──────────────┘ └────────────┘</div>
|
||
|
||
<h3 class="sub-sub-title">核心价值</h3>
|
||
<ul>
|
||
<li><strong>统一入口</strong>:以员工工号为全系统唯一身份标识,消除多套系统多套账号</li>
|
||
<li><strong>协议适配</strong>:7 大主流协议全覆盖,兼容新老系统认证需求</li>
|
||
<li><strong>安全底座</strong>:多因子认证、设备绑定、零信任、审计日志构成安全防线</li>
|
||
<li><strong>开放能力</strong>:多语言 SDK + 标准化 API,降低第三方系统接入成本</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<!-- ====== 2. 核心能力矩阵 ====== -->
|
||
<div class="section" id="capabilities">
|
||
<h2 class="section-title">二、核心能力矩阵</h2>
|
||
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>能力域</th><th>子能力</th><th>需求要求</th></tr>
|
||
<tr>
|
||
<td rowspan="3"><strong>认证方式</strong></td>
|
||
<td>基础认证</td>
|
||
<td>账号密码、短信验证码、APP 扫码</td>
|
||
</tr>
|
||
<tr><td>生物识别</td><td>指纹识别、人脸识别</td></tr>
|
||
<tr><td>硬件/网络</td><td>USBKey 证书认证、IP 认证</td></tr>
|
||
<tr>
|
||
<td rowspan="3"><strong>协议支持</strong></td>
|
||
<td>企业 SSO</td>
|
||
<td>CAS、SAML 2.0</td>
|
||
</tr>
|
||
<tr><td>OAuth 生态</td><td>OAuth 2.0、OpenID Connect</td></tr>
|
||
<tr><td>传统协议</td><td>REST Protocol、Digest Authentication、Remote Address</td></tr>
|
||
<tr>
|
||
<td rowspan="3"><strong>策略控制</strong></td>
|
||
<td>终端策略</td>
|
||
<td>PC/移动端分别配置默认鉴权方式</td>
|
||
</tr>
|
||
<tr><td>会话策略</td><td>排他登录、强制手机绑定、设备绑定与数量限制</td></tr>
|
||
<tr><td>安全策略</td><td>密码规则、错误锁定、验证码切换</td></tr>
|
||
<tr>
|
||
<td rowspan="2"><strong>集成对接</strong></td>
|
||
<td>应用集成</td>
|
||
<td>多语言 SDK(Android/iOS/JSP/JAVA/ASP/PHP/C/C#/VB)</td>
|
||
</tr>
|
||
<tr><td>基础设施</td><td>零信任集成、短信模块、ESB 数据同步</td></tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 3. 多元化身份认证 ====== -->
|
||
<div class="section" id="multi-auth">
|
||
<h2 class="section-title">三、多元化身份认证技术解析</h2>
|
||
|
||
<h3 class="sub-sub-title">3.1 认证方式矩阵</h3>
|
||
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>认证方式</th><th>技术原理</th><th>适用场景</th><th>安全等级</th></tr>
|
||
<tr>
|
||
<td><strong>账号密码</strong></td>
|
||
<td>用户输入预设凭证,服务端校验哈希</td>
|
||
<td>PC 端基础登录、密码代填底层</td>
|
||
<td><span class="badge badge--medium">中</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>短信验证码</strong></td>
|
||
<td>服务端生成随机码通过短信网关下发,限时校验</td>
|
||
<td>移动端快捷登录、忘记密码重置</td>
|
||
<td><span class="badge badge--high">较高</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>APP 扫码登录</strong></td>
|
||
<td>PC 端展示动态二维码 → App 扫码确认 → 服务端关联两端的 session</td>
|
||
<td>PC 端免密登录,安全且体验好</td>
|
||
<td><span class="badge badge--high">较高</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>IP 认证</strong></td>
|
||
<td>基于 Remote Address,信任内网 IP 段直接放行或降级验证</td>
|
||
<td>内网办公免登录、零信任内外网判断依据</td>
|
||
<td><span class="badge badge--low">低(需配合其他因子)</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>指纹识别</strong></td>
|
||
<td>移动端调用系统生物识别 API(Android BiometricPrompt / iOS LocalAuthentication)</td>
|
||
<td>移动端快捷二次验证</td>
|
||
<td><span class="badge badge--high">较高</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>人脸识别</strong></td>
|
||
<td>移动端摄像头采集 → 本地/云端活体检测 + 特征比对</td>
|
||
<td>高安全场景二次认证</td>
|
||
<td><span class="badge badge--high">较高</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>USBKey 证书</strong></td>
|
||
<td>基于 X.509 数字证书,私钥存储在硬件 USBKey 中,TLS 客户端证书认证</td>
|
||
<td>管理后台、高安全等级操作</td>
|
||
<td><span class="badge badge--critical">高</span></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">3.2 终端自适应认证策略</h3>
|
||
<p>
|
||
需求要求"基于系统用户工作方式不同,分别配置 PC 端与移动端的默认鉴权方式"。这体现了一个核心设计理念:
|
||
<strong>认证方式不全局统一,而是按终端类型分别配置默认值</strong>。
|
||
</p>
|
||
<div class="callout callout--info">
|
||
<div class="callout-title">设计意义</div>
|
||
PC 端以键盘输入为主,默认推荐账号密码或 USBKey;移动端具备生物识别能力,默认推荐指纹/人脸。
|
||
系统管理员在后台为每种终端配置默认方式,用户可在允许范围内切换。
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 4. SSO 协议体系 ====== -->
|
||
<div class="section" id="sso-protocols">
|
||
<h2 class="section-title">四、SSO 协议体系</h2>
|
||
|
||
<h3 class="sub-sub-title">4.1 协议对比</h3>
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>协议</th><th>类型</th><th>数据格式</th><th>典型场景</th><th>方向</th></tr>
|
||
<tr>
|
||
<td><strong>CAS</strong></td>
|
||
<td>SSO 协议</td>
|
||
<td>Ticket (ST/TGT)</td>
|
||
<td>Web 应用统一认证,企业/高校主流</td>
|
||
<td>中心化</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>OAuth 2.0</strong></td>
|
||
<td>授权框架</td>
|
||
<td>JSON + JWT</td>
|
||
<td>API 授权、第三方应用接入、移动端</td>
|
||
<td>去中心化</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>OpenID Connect</strong></td>
|
||
<td>身份认证层</td>
|
||
<td>JWT (ID Token)</td>
|
||
<td>基于 OAuth 2.0 的身份认证,现代 Web/Mobile App</td>
|
||
<td>去中心化</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>SAML 2.0</strong></td>
|
||
<td>SSO 协议</td>
|
||
<td>XML</td>
|
||
<td>企业级跨域 SSO,政企系统常用</td>
|
||
<td>联邦化</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>REST Protocol</strong></td>
|
||
<td>API 认证</td>
|
||
<td>JSON</td>
|
||
<td>RESTful API 的 Token 认证</td>
|
||
<td>API 级别</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Digest Authentication</strong></td>
|
||
<td>HTTP 认证</td>
|
||
<td>HTTP Header</td>
|
||
<td>浏览器原生认证,替代 Basic Auth</td>
|
||
<td>点对点</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Remote Address Auth</strong></td>
|
||
<td>网络层认证</td>
|
||
<td>IP 地址</td>
|
||
<td>内网信任、零信任内外网判断</td>
|
||
<td>网络级别</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">4.2 CAS 协议核心流程</h3>
|
||
<p>CAS(Central Authentication Service)是本项目最核心的协议——需对接 7 套已建系统 + 3 套待建系统:</p>
|
||
<div class="flow">
|
||
<span class="flow-step">① 用户访问业务系统</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">② 业务系统检查无本地 Session</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">③ 重定向到 CAS 认证中心</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">④ 用户在 CAS 中心完成认证</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">⑤ CAS 颁发 Service Ticket</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">⑥ 业务系统验证 ST 并建立 Session</span>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 5. 零信任登录 ====== -->
|
||
<div class="section" id="zero-trust">
|
||
<h2 class="section-title">五、零信任登录技术解析</h2>
|
||
|
||
<h3 class="sub-sub-title">5.1 什么是零信任</h3>
|
||
<p>
|
||
零信任(Zero Trust)的核心理念是 <strong>"永不信任,始终验证"(Never Trust, Always Verify)</strong>。
|
||
传统安全模型假设"内网即安全",而零信任认为<strong>无论用户在内网还是外网,每一次访问请求都需要经过身份认证和授权</strong>。
|
||
</p>
|
||
|
||
<h3 class="sub-sub-title">5.2 深信服 aTrust 零信任体系</h3>
|
||
<p>
|
||
需求中明确要求集成<strong>深信服零信任(aTrust)</strong>,实现用户无感登录并判断内外网逻辑。深信服 aTrust 的核心能力:
|
||
</p>
|
||
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>核心能力</th><th>说明</th></tr>
|
||
<tr><td><strong>流量身份化</strong></td>
|
||
<td>不再以网络位置(内网 IP)决定访问权限,所有访问主体(人/设备/应用)都需要身份标识</td></tr>
|
||
<tr><td><strong>动态自适应访问控制</strong></td>
|
||
<td>根据用户身份、设备状态、地理位置、行为基线等多维度进行持续信任评估,动态调整访问权限</td></tr>
|
||
<tr><td><strong>网络隐身</strong></td>
|
||
<td>业务系统不对外暴露端口和 IP,只有通过零信任认证的用户才能建立连接</td></tr>
|
||
<tr><td><strong>终端环境检测</strong></td>
|
||
<td>检测终端设备安全状态(是否越狱、杀毒软件是否运行等),作为信任评估因子</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">5.3 本项目零信任登录流程</h3>
|
||
<p>需求中"内网无需调用零信任认证,外网需要通过零信任认证"的内外网判断流程:</p>
|
||
|
||
<div class="flow">
|
||
<span class="flow-step">① App 发起登录请求</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">② 判断网络环境(内网/外网)</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step" style="border-color: var(--color-success);">③a 内网:直接走统一认证</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step" style="border-color: var(--color-error);">③b 外网:先通过零信任认证</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">④ 统一身份认证</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">⑤ 颁发 Token,无感登录</span>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">5.4 零信任与 SSO 的关系</h3>
|
||
<p>
|
||
SSO 提供的是"一次登录、多系统通行"的便利,而零信任提供的是"持续验证、动态授权"的安全。
|
||
两者不是对立关系,而是<strong>互补关系</strong>:
|
||
</p>
|
||
<ul>
|
||
<li>SSO 作为<strong>身份提供者(IdP)</strong>,负责首次认证和令牌颁发</li>
|
||
<li>零信任网关作为<strong>策略执行点(PEP)</strong>,在每次资源访问前验证令牌有效性和上下文安全</li>
|
||
<li>本项目中:深信服 aTrust 与统一认证中心对接,aTrust 可作为 CAS 的 Service Provider 消费认证</li>
|
||
</ul>
|
||
|
||
<div class="callout callout--info">
|
||
<div class="callout-title"> 集成要点</div>
|
||
深信服 aTrust 支持通过 CAS/OAuth2 协议与统一身份认证平台对接。App 端需集成 aTrust SDK,
|
||
实现"内外网自动判断 → 外网触发零信任认证 → 认证后无感访问业务系统"的完整流程。
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 6. 密码代填方案 ====== -->
|
||
<div class="section" id="password-filling">
|
||
<h2 class="section-title">六、密码代填方案</h2>
|
||
|
||
<h3 class="sub-sub-title">6.1 什么是密码代填</h3>
|
||
<p>
|
||
密码代填(Password Filling / Form-Fill SSO)是一种为<strong>不支持标准 SSO 协议的老旧系统</strong>
|
||
实现单点登录的技术手段。需求明确要求"以密码代填方式接入平台的老旧系统若干"。
|
||
</p>
|
||
<p>
|
||
原理:用户先通过统一认证中心登录 → 认证中心代管该用户的业务系统凭据 →
|
||
用户点击老旧系统时,认证中心自动导航到其登录页面 → <strong>自动填充用户名和密码字段 → 自动提交表单</strong>。
|
||
</p>
|
||
|
||
<h3 class="sub-sub-title">6.2 代填登录流程</h3>
|
||
<div class="flow">
|
||
<span class="flow-step">① 用户统一登录到 IAM</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">② 点击老旧系统入口</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">③ IAM 代管凭据注入代理页面</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">④ 代理页自动填充表单并提交</span>
|
||
<span class="flow-arrow">→</span>
|
||
<span class="flow-step">⑤ 用户无感进入老旧系统</span>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">6.3 安全风险与缓解</h3>
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>风险</th><th>缓解措施</th></tr>
|
||
<tr>
|
||
<td>凭据在 IAM 中明文或弱加密存储</td>
|
||
<td>使用 AES-256 加密存储,密钥与数据分库存放</td>
|
||
</tr>
|
||
<tr>
|
||
<td>老旧系统本身不支持 MFA</td>
|
||
<td>在 IAM 侧增加前置 MFA 校验,代填后再过一层</td>
|
||
</tr>
|
||
<tr>
|
||
<td>老旧系统登录页面结构变更</td>
|
||
<td>代填模板支持配置化(字段选择器、提交 URL),便于维护</td>
|
||
</tr>
|
||
<tr>
|
||
<td>代填过程可能被中间人攻击</td>
|
||
<td>代理页面与老旧系统间强制 HTTPS 通信</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="callout callout--danger">
|
||
<div class="callout-title"> 定位</div>
|
||
密码代填应作为<strong>过渡方案</strong>。长期应推动老旧系统改造为标准 CAS/OAuth2 接入。
|
||
需求中乙方已承诺承担第三方系统改造费用,这为推进老旧系统升级提供了预算保障。
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 7. CAS 对接架构 ====== -->
|
||
<div class="section" id="cas-integration">
|
||
<h2 class="section-title">七、CAS 对接架构</h2>
|
||
|
||
<h3 class="sub-sub-title">7.1 对接规模</h3>
|
||
<ul>
|
||
<li><strong>7 套已建系统</strong>:安全生产综合管控平台、承包商系统、设备完整性系统、EAM 设备管理系统、实时数据库系统、生产调度指挥系统、综合管理平台</li>
|
||
<li><strong>3 套待建系统</strong>:OA 办公系统、华锦邮箱、档案管理系统(建成后免费接入)</li>
|
||
<li><strong>若干老旧系统</strong>:非 CAS 认证,以密码代填方式接入</li>
|
||
</ul>
|
||
|
||
<h3 class="sub-sub-title">7.2 统一身份标识</h3>
|
||
<p>
|
||
以<strong>员工工号</strong>作为全系统唯一身份标识。这意味着:
|
||
</p>
|
||
<ul>
|
||
<li>CAS 认证中心的用户表以工号为主键或唯一标识</li>
|
||
<li>各业务系统需支持通过工号映射本地用户</li>
|
||
<li>ESB 同步组织架构时,工号是关联字段</li>
|
||
</ul>
|
||
|
||
<h3 class="sub-sub-title">7.3 对接模式分类</h3>
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>对接模式</th><th>适用系统</th><th>实现方式</th></tr>
|
||
<tr>
|
||
<td><strong>CAS 原生对接</strong></td>
|
||
<td>支持 CAS Client 的系统</td>
|
||
<td>业务系统集成 CAS Client SDK,验证 Service Ticket</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>SAML/OAuth2 桥接</strong></td>
|
||
<td>仅支持 SAML 或 OAuth 的系统</td>
|
||
<td>IAM 作为协议桥接器,将 CAS 认证转换为目标协议</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>密码代填</strong></td>
|
||
<td>不支持标准协议的老旧系统</td>
|
||
<td>表单自动填充 + 代理转发</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 8. 多语言 SDK 体系 ====== -->
|
||
<div class="section" id="sdk">
|
||
<h2 class="section-title">八、多语言 SDK 体系</h2>
|
||
|
||
<p>需求要求第三方接入支持多种语言和平台,涵盖以下范围:</p>
|
||
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>SDK 类型</th><th>支持语言/平台</th><th>用途</th></tr>
|
||
<tr><td>移动端 SDK</td><td>Android SDK、iOS SDK</td><td>移动端 App 集成认证、扫码登录、生物识别</td></tr>
|
||
<tr><td>Java 系</td><td>Java、JSP</td><td>Java Web 系统(Spring/Servlet)接入 CAS/OAuth</td></tr>
|
||
<tr><td>.NET 系</td><td>ASP、C#、VB</td><td>.NET 业务系统接入统一认证</td></tr>
|
||
<tr><td>PHP</td><td>PHP</td><td>PHP 业务系统接入</td></tr>
|
||
<tr><td>C/C++</td><td>C、C++</td><td>底层系统或嵌入式设备接入</td></tr>
|
||
<tr><td>标准化 API</td><td>RESTful API(语言无关)</td><td>任意语言通过 HTTP 调用认证接口</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="callout callout--info">
|
||
<div class="callout-title"> 实现建议</div>
|
||
核心认证服务对外暴露标准 RESTful API,各语言 SDK 本质是对这些 API 的封装。
|
||
建议优先提供 Java、.NET、PHP 的官方 SDK(覆盖 90%+ 的业务系统),
|
||
C/C++ 等通过 REST API 直接调用,无需额外 SDK。
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 9. 候选开源项目总览 ====== -->
|
||
<div class="section" id="candidates">
|
||
<h2 class="section-title">九、候选开源项目总览</h2>
|
||
|
||
<p>
|
||
基于需求中对协议支持(CAS + OAuth2 + SAML + 7 大协议)、多因子认证、多语言 SDK、国产化适配、10000+ 并发等要求,
|
||
筛选出以下 5 个主流开源 IAM 项目进行匹配度分析:
|
||
</p>
|
||
|
||
<div class="metrics">
|
||
<div class="metric-card">
|
||
<div class="metric-value" style="font-size: 18px;">Keycloak</div>
|
||
<div class="metric-label">Red Hat 维护,市场占有率第一</div>
|
||
</div>
|
||
<div class="metric-card">
|
||
<div class="metric-value" style="font-size: 18px;">Casdoor</div>
|
||
<div class="metric-label">Go 语言,Casbin 生态,轻量高效</div>
|
||
</div>
|
||
<div class="metric-card">
|
||
<div class="metric-value" style="font-size: 18px;">MaxKey</div>
|
||
<div class="metric-label">国产 IAM,Apache-2.0,协议全覆盖</div>
|
||
</div>
|
||
<div class="metric-card">
|
||
<div class="metric-value" style="font-size: 18px;">Apereo CAS</div>
|
||
<div class="metric-label">CAS 协议创始者,企业/高校标准</div>
|
||
</div>
|
||
<div class="metric-card">
|
||
<div class="metric-value" style="font-size: 18px;">Apache Syncope</div>
|
||
<div class="metric-label">Apache 基金会,身份治理与生命周期</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 10. Keycloak ====== -->
|
||
<div class="section" id="keycloak">
|
||
<h2 class="section-title">十、Keycloak 深度分析</h2>
|
||
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>维度</th><th>详情</th></tr>
|
||
<tr><td>维护方</td><td>Red Hat → Linux Foundation(2024 年移交)</td></tr>
|
||
<tr><td>技术栈</td><td>Java / Quarkus</td></tr>
|
||
<tr><td>协议支持</td><td>OAuth 2.0、OIDC、SAML 2.0(CAS 需通过代理/插件)</td></tr>
|
||
<tr><td>多因子认证</td><td>WebAuthn、TOTP、OTP、短信、邮件</td></tr>
|
||
<tr><td>用户联合</td><td>LDAP、Active Directory、Kerberos、Social Login</td></tr>
|
||
<tr><td>扩展机制</td><td>SPI(Service Provider Interface),高度可定制</td></tr>
|
||
<tr><td>社区规模</td><td>最大开源 IAM 社区,GitHub 22k+ Stars</td></tr>
|
||
<tr><td>安可适配</td><td>Java 跨平台,可运行于麒麟 OS + 达梦数据库(需 JDBC 适配)</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">匹配度评估</h3>
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>需求项</th><th>Keycloak 支持度</th><th>说明</th></tr>
|
||
<tr><td>CAS 原生支持</td><td><span class="badge badge--high">部分</span></td><td>不原生支持 CAS Server,可作 CAS Client 或通过 SPI 扩展</td></tr>
|
||
<tr><td>SAML 2.0</td><td><span class="badge badge--low">✅ 原生</span></td><td>原生支持 SAML IdP 和 SP</td></tr>
|
||
<tr><td>OAuth 2.0 / OIDC</td><td><span class="badge badge--low">✅ 原生</span></td><td>完整支持</td></tr>
|
||
<tr><td>多因子认证</td><td><span class="badge badge--low">✅ 原生</span></td><td>WebAuthn、TOTP、OTP 等</td></tr>
|
||
<tr><td>密码代填</td><td><span class="badge badge--critical">❌ 不支持</span></td><td>需额外部署网关(如 F5 APM)</td></tr>
|
||
<tr><td>多语言 SDK</td><td><span class="badge badge--medium">社区</span></td><td>官方不提供 SDK,社区有 Java/JS/Go 等</td></tr>
|
||
<tr><td>10000+ 并发</td><td><span class="badge badge--medium">集群可达</span></td><td>单节点约 2000-3000 并发,需集群部署</td></tr>
|
||
<tr><td>移动端 SDK</td><td><span class="badge badge--medium">社区</span></td><td>Android/iOS SDK 由社区维护</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="callout">
|
||
<div class="callout-title">总结</div>
|
||
Keycloak 是功能最完善的开源 IAM,但 <strong>CAS 非原生支持</strong>是其与本项目需求最大的 gap。
|
||
需要通过 SPI 扩展或部署 CAS 代理层(如 Apereo CAS 作为前置)来补齐。
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 11. Casdoor ====== -->
|
||
<div class="section" id="casdoor">
|
||
<h2 class="section-title">十一、Casdoor 深度分析</h2>
|
||
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>维度</th><th>详情</th></tr>
|
||
<tr><td>维护方</td><td>Casdoor 开源社区(Casbin 团队)</td></tr>
|
||
<tr><td>技术栈</td><td>Go(前端 React)</td></tr>
|
||
<tr><td>协议支持</td><td>OAuth 2.0、OIDC、SAML、<strong>CAS(原生)</strong>、LDAP、SCIM</td></tr>
|
||
<tr><td>多因子认证</td><td>TOTP、短信、邮件、WebAuthn</td></tr>
|
||
<tr><td>权限引擎</td><td>内置 Casbin(支持 ACL、RBAC、ABAC)</td></tr>
|
||
<tr><td>第三方登录</td><td>微信、钉钉、GitHub、Google、GitHub 等 30+ 平台</td></tr>
|
||
<tr><td>社区规模</td><td>GitHub 10k+ Stars</td></tr>
|
||
<tr><td>安可适配</td><td>Go 编译为二进制,天然支持麒麟 OS;支持达梦数据库(需驱动适配)</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">匹配度评估</h3>
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>需求项</th><th>Casdoor 支持度</th><th>说明</th></tr>
|
||
<tr><td>CAS 原生支持</td><td><span class="badge badge--low">✅ 原生</span></td><td>原生 CAS IdP,直接兼容需求中的 7 套系统对接</td></tr>
|
||
<tr><td>SAML 2.0</td><td><span class="badge badge--low">✅ 原生</span></td><td>支持 SAML IdP</td></tr>
|
||
<tr><td>OAuth 2.0 / OIDC</td><td><span class="badge badge--low">✅ 原生</span></td><td>完整支持</td></tr>
|
||
<tr><td>多因子认证</td><td><span class="badge badge--low">✅ 原生</span></td><td>TOTP、短信、WebAuthn 等</td></tr>
|
||
<tr><td>密码代填</td><td><span class="badge badge--critical">❌ 不支持</span></td><td>需自行开发代理填充模块</td></tr>
|
||
<tr><td>多语言 SDK</td><td><span class="badge badge--low">✅ 官方</span></td><td>官方提供 Go、Java、Python、PHP、Node.js、C#、Swift 等 SDK</td></tr>
|
||
<tr><td>10000+ 并发</td><td><span class="badge badge--low">✅ 单节点可达</span></td><td>Go 高并发特性,单节点可支撑 10000+ 并发</td></tr>
|
||
<tr><td>移动端 SDK</td><td><span class="badge badge--medium">部分</span></td><td>Swift SDK 支持 iOS,Android 可用 REST API 集成</td></tr>
|
||
<tr><td>设备绑定</td><td><span class="badge badge--medium">可配置</span></td><td>通过自定义字段和策略实现</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="callout">
|
||
<div class="callout-title">总结</div>
|
||
Casdoor 是<strong>协议覆盖最全</strong>的开源 IAM——CAS、OAuth2、SAML 全部原生支持。
|
||
Go 语言在性能和安可适配上具有天然优势。社区 SDK 丰富度也最高。
|
||
主要短板:密码代填和设备绑定需二次开发。
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 12. MaxKey ====== -->
|
||
<div class="section" id="maxkey">
|
||
<h2 class="section-title">十二、MaxKey 深度分析</h2>
|
||
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>维度</th><th>详情</th></tr>
|
||
<tr><td>维护方</td><td>Dromara 开源社区(国产 IAM 第一品牌)</td></tr>
|
||
<tr><td>技术栈</td><td>Java / Spring Boot</td></tr>
|
||
<tr><td>协议支持</td><td><strong>CAS(原生)</strong>、OAuth 2.x / OIDC、SAML 2.0、JWT、SCIM 2.0</td></tr>
|
||
<tr><td>多因子认证</td><td>图片验证码、短信验证码、TOTP/HOTP(Google/Microsoft Authenticator)、二次密码</td></tr>
|
||
<tr><td>第三方登录</td><td>微信、钉钉、新浪微博</td></tr>
|
||
<tr><td>社区规模</td><td>Gitee + GitHub,Dromara 社区活跃</td></tr>
|
||
<tr><td>安可适配</td><td>Java 跨平台,天然支持麒麟 OS + 达梦数据库</td></tr>
|
||
<tr><td>最新本</td><td>4.1.6(2025-02),持续迭代中</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">匹配度评估</h3>
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>需求项</th><th>MaxKey 支持度</th><th>说明</th></tr>
|
||
<tr><td>CAS 原生支持</td><td><span class="badge badge--low">✅ 原生</span></td><td>原生 CAS Server,直接兼容</td></tr>
|
||
<tr><td>SAML 2.0</td><td><span class="badge badge--low">✅ 原生</span></td><td>支持 SAML IdP</td></tr>
|
||
<tr><td>OAuth 2.0 / OIDC</td><td><span class="badge badge--low">✅ 原生</span></td><td>完整支持</td></tr>
|
||
<tr><td>多因子认证</td><td><span class="badge badge--low">✅ 原生</span></td><td>验证码、短信、TOTP 全覆盖</td></tr>
|
||
<tr><td>密码代填</td><td><span class="badge badge--critical">❌ 不支持</span></td><td>需自行开发</td></tr>
|
||
<tr><td>多语言 SDK</td><td><span class="badge badge--medium">Java 为主</span></td><td>Java/CAS Client 完善,其他语言依赖 REST API</td></tr>
|
||
<tr><td>10000+ 并发</td><td><span class="badge badge--medium">集群可达</span></td><td>Java/Spring Boot,单节点性能中等,需集群部署</td></tr>
|
||
<tr><td>国产化亲和度</td><td><span class="badge badge--low">✅ 国产</span></td><td>国产开源,中文文档完善,Dromara 社区国内活跃</td></tr>
|
||
<tr><td>排他登录/设备绑定</td><td><span class="badge badge--low">✅ 原生</span></td><td>支持会话管理、并发登录控制</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="callout">
|
||
<div class="callout-title">总结</div>
|
||
MaxKey 是<strong>国产化适配最友好</strong>的选择——CAS/SAML/OAuth 全部原生支持,中文文档完善,
|
||
国内社区活跃。排他登录、会话管理等需求功能原生具备。
|
||
短板同样在于密码代填和多语言 SDK 丰富度不如 Casdoor。
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 13. Apereo CAS ====== -->
|
||
<div class="section" id="apereo">
|
||
<h2 class="section-title">十三、Apereo CAS 深度分析</h2>
|
||
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>维度</th><th>详情</th></tr>
|
||
<tr><td>维护方</td><td>Apereo 基金会(原耶鲁大学开发)</td></tr>
|
||
<tr><td>技术栈</td><td>Java / Spring Boot</td></tr>
|
||
<tr><td>协议支持</td><td><strong>CAS(创始者)</strong>、SAML 2.0、OAuth 2.0、OIDC、REST</td></tr>
|
||
<tr><td>多因子认证</td><td>Duo、Google Authenticator、FIDO2/WebAuthn、Radius、短信</td></tr>
|
||
<tr><td>用户联合</td><td>LDAP、Active Directory、JDBC、MongoDB、REST</td></tr>
|
||
<tr><td>社区规模</td><td>企业/高校广泛使用,社区成熟</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">匹配度评估</h3>
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>需求项</th><th>Apereo CAS 支持度</th><th>说明</th></tr>
|
||
<tr><td>CAS 原生支持</td><td><span class="badge badge--low">✅ 创始者</span></td><td>本身就是 CAS 协议的参考实现</td></tr>
|
||
<tr><td>SAML 2.0 / OAuth2</td><td><span class="badge badge--low">✅ 原生</span></td><td>完整支持</td></tr>
|
||
<tr><td>多因子认证</td><td><span class="badge badge--low">✅ 原生</span></td><td>自适应 MFA,支持多种因子</td></tr>
|
||
<tr><td>密码代填</td><td><span class="badge badge--critical">❌ 不支持</span></td><td>需配合外部网关</td></tr>
|
||
<tr><td>用户管理 UI</td><td><span class="badge badge--high">较弱</span></td><td>侧重认证,用户管理功能不如 Keycloak/Casdoor 完善</td></tr>
|
||
<tr><td>移动端 SDK</td><td><span class="badge badge--high">无</span></td><td>无官方移动端 SDK</td></tr>
|
||
<tr><td>门户集成</td><td><span class="badge badge--high">无</span></td><td>纯认证引擎,无门户/待办聚合能力</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<div class="callout">
|
||
<div class="callout-title">总结</div>
|
||
Apereo CAS 是 CAS 协议的<strong>标准和参考实现</strong>,认证能力极强,但它是一个<strong>纯认证引擎</strong>,
|
||
缺乏用户管理 UI、门户集成、移动端 SDK 等项目所需的全栈能力。
|
||
更适合作为认证引擎与其他平台(如 Apache Syncope)组合使用。
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 14. Apache Syncope ====== -->
|
||
<div class="section" id="syncope">
|
||
<h2 class="section-title">十四、Apache Syncope 深度分析</h2>
|
||
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>维度</th><th>详情</th></tr>
|
||
<tr><td>维护方</td><td>Apache 软件基金会</td></tr>
|
||
<tr><td>技术栈</td><td>Java / Spring</td></tr>
|
||
<tr><td>核心定位</td><td>身份治理与生命周期管理(非纯认证)</td></tr>
|
||
<tr><td>协议支持</td><td>可对接 CAS/Keycloak 作为认证层</td></tr>
|
||
<tr><td>核心能力</td><td>身份生命周期(入职/转岗/离职)、Provisioning、多系统同步、合规审计</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">匹配度评估</h3>
|
||
<div class="callout callout--info">
|
||
<div class="callout-title">定位差异</div>
|
||
Apache Syncope 的核心优势是<strong>身份治理和生命周期管理</strong>,而非认证引擎。
|
||
它可以与 Keycloak 或 Apereo CAS 组合使用:Syncope 管身份数据和同步,Keycloak/CAS 管认证和 SSO。
|
||
对于本项目来说,如果选型 Keycloak,可以后续用 Syncope 补充用户生命周期管理能力。
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 15. 匹配度对比 ====== -->
|
||
<div class="section" id="comparison">
|
||
<h2 class="section-title">十五、开源项目匹配度总对比</h2>
|
||
|
||
<h3 class="sub-sub-title">15.1 需求-项目匹配矩阵</h3>
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>需求维度(权重)</th><th>Keycloak</th><th>Casdoor</th><th>MaxKey</th><th>Apereo CAS</th></tr>
|
||
<tr>
|
||
<td><strong>CAS 原生支持</strong> <span class="badge badge--critical">必须</span></td>
|
||
<td><span class="badge badge--high">插件</span></td>
|
||
<td><span class="badge badge--low">✅ 原生</span></td>
|
||
<td><span class="badge badge--low">✅ 原生</span></td>
|
||
<td><span class="badge badge--low">✅ 创始者</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>SAML 2.0</strong> <span class="badge badge--critical">必须</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>OAuth 2.0 / OIDC</strong> <span class="badge badge--critical">必须</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>多因子认证</strong> <span class="badge badge--high">高</span></td>
|
||
<td><span class="badge badge--low">✅ 丰富</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
<td><span class="badge badge--low">✅ 丰富</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>密码代填</strong> <span class="badge badge--high">高</span></td>
|
||
<td><span class="badge badge--critical">❌</span></td>
|
||
<td><span class="badge badge--critical">❌</span></td>
|
||
<td><span class="badge badge--critical">❌</span></td>
|
||
<td><span class="badge badge--critical">❌</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>多语言 SDK</strong> <span class="badge badge--high">高</span></td>
|
||
<td><span class="badge badge--medium">社区</span></td>
|
||
<td><span class="badge badge--low">✅ 官方 8+</span></td>
|
||
<td><span class="badge badge--medium">Java 为主</span></td>
|
||
<td><span class="badge badge--high">无</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>移动端 SDK</strong> <span class="badge badge--medium">中</span></td>
|
||
<td><span class="badge badge--medium">社区</span></td>
|
||
<td><span class="badge badge--medium">Swift SDK</span></td>
|
||
<td><span class="badge badge--high">无</span></td>
|
||
<td><span class="badge badge--high">无</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>排他登录/设备绑定</strong> <span class="badge badge--medium">中</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
<td><span class="badge badge--medium">可配置</span></td>
|
||
<td><span class="badge badge--low">✅</span></td>
|
||
<td><span class="badge badge--medium">可配置</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>10000+ 并发</strong> <span class="badge badge--high">高</span></td>
|
||
<td><span class="badge badge--medium">集群</span></td>
|
||
<td><span class="badge badge--low">✅ 单节点</span></td>
|
||
<td><span class="badge badge--medium">集群</span></td>
|
||
<td><span class="badge badge--medium">集群</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>安可适配</strong> <span class="badge badge--critical">必须</span></td>
|
||
<td><span class="badge badge--medium">Java 可配</span></td>
|
||
<td><span class="badge badge--low">✅ Go 二进</span></td>
|
||
<td><span class="badge badge--medium">Java 可配</span></td>
|
||
<td><span class="badge badge--medium">Java 可配</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>国产化社区支持</strong> <span class="badge badge--medium">中</span></td>
|
||
<td><span class="badge badge--high">国际</span></td>
|
||
<td><span class="badge badge--medium">国际化</span></td>
|
||
<td><span class="badge badge--low">✅ 国产</span></td>
|
||
<td><span class="badge badge--high">国际</span></td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">15.2 综合评分</h3>
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>项目</th><th>综合匹配度</th><th>优势</th><th>短板</th></tr>
|
||
<tr>
|
||
<td><strong>Casdoor</strong></td>
|
||
<td>
|
||
<div class="score-bar-wrap">
|
||
<div class="score-bar"><div class="score-bar-fill score-bar-fill--high" style="width:88%"></div></div>
|
||
<span class="score-text" style="color:var(--color-success)">88%</span>
|
||
</div>
|
||
</td>
|
||
<td>CAS/SAML/OAuth 全原生、Go 高性能、官方 SDK 丰富、安可适配最佳</td>
|
||
<td>密码代填/设备绑定需二开、项目相对年轻</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>MaxKey</strong></td>
|
||
<td>
|
||
<div class="score-bar-wrap">
|
||
<div class="score-bar"><div class="score-bar-fill score-bar-fill--high" style="width:82%"></div></div>
|
||
<span class="score-text" style="color:var(--color-success)">82%</span>
|
||
</div>
|
||
</td>
|
||
<td>CAS/SAML/OAuth 全原生、国产化最友好、排他登录原生、中文文档完善</td>
|
||
<td>密码代填需二开、多语言 SDK 较少、社区规模偏小</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Keycloak</strong></td>
|
||
<td>
|
||
<div class="score-bar-wrap">
|
||
<div class="score-bar"><div class="score-bar-fill score-bar-fill--medium" style="width:72%"></div></div>
|
||
<span class="score-text" style="color:var(--color-warning)">72%</span>
|
||
</div>
|
||
</td>
|
||
<td>社区最大、功能最全、生态最成熟、SPI 扩展能力强</td>
|
||
<td>CAS 非原生、Java 资源消耗大、移动端 SDK 非官方</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Apereo CAS</strong></td>
|
||
<td>
|
||
<div class="score-bar-wrap">
|
||
<div class="score-bar"><div class="score-bar-fill score-bar-fill--medium" style="width:60%"></div></div>
|
||
<span class="score-text" style="color:var(--color-warning)">60%</span>
|
||
</div>
|
||
</td>
|
||
<td>CAS 协议创始者、认证能力最强、自适应 MFA 成熟</td>
|
||
<td>纯认证引擎、无用户管理 UI、无移动端 SDK、无门户能力</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ====== 16. 选型建议 ====== -->
|
||
<div class="section" id="recommendation">
|
||
<h2 class="section-title">十六、选型建议</h2>
|
||
|
||
<h3 class="sub-sub-title">16.1 推荐方案:Casdoor + 自研密码代填模块</h3>
|
||
<p>
|
||
综合匹配度最高的是 <strong>Casdoor</strong>,理由如下:
|
||
</p>
|
||
<ul>
|
||
<li><strong>协议全覆盖</strong>:CAS、SAML、OAuth2 全部原生支持,直接满足 7 套系统 CAS 对接 + 多协议兼容需求</li>
|
||
<li><strong>Go 语言优势</strong>:单节点即可支撑 10000+ 并发,减少集群部署复杂度;编译为二进制文件,安可适配最简单</li>
|
||
<li><strong>SDK 生态</strong>:官方提供 8+ 语言 SDK,覆盖需求中要求的 Java、PHP、C# 等</li>
|
||
<li><strong>Casbin 权限引擎</strong>:内置 RBAC/ABAC,可直接支撑门户平台的差异化权限展示需求</li>
|
||
<li><strong>轻量部署</strong>:单二进制文件 + 数据库即可运行,运维成本低</li>
|
||
</ul>
|
||
|
||
<h3 class="sub-sub-title">16.2 需自研的部分</h3>
|
||
<div class="table-wrap">
|
||
<table>
|
||
<tr><th>自研模块</th><th>原因</th><th>工作量评估</th></tr>
|
||
<tr><td><strong>密码代填引擎</strong></td><td>所有候选项目均不原生支持</td><td>中(2-3 周)</td></tr>
|
||
<tr><td><strong>设备绑定/排他登录增强</strong></td><td>需结合需求细化策略配置</td><td>小(1 周)</td></tr>
|
||
<tr><td><strong>Android/鸿蒙 SDK</strong></td><td>Casdoor 有 REST API,移动端封装</td><td>中(2-3 周)</td></tr>
|
||
<tr><td><strong>门户待办聚合</strong></td><td>属于平台层功能,不在 IAM 范围内</td><td>大(独立模块)</td></tr>
|
||
<tr><td><strong>深信服零信任集成</strong></td><td>需对接 aTrust SDK</td><td>小(1 周)</td></tr>
|
||
<tr><td><strong>审计日志仪表盘</strong></td><td>Casdoor 有基础日志,需增强可视化</td><td>中(2 周)</td></tr>
|
||
</table>
|
||
</div>
|
||
|
||
<h3 class="sub-sub-title">16.3 备选方案</h3>
|
||
<ul>
|
||
<li><strong>备选 A:MaxKey</strong>——如果团队更看重国产化属性和中文社区支持,MaxKey 是最佳备选。协议覆盖同样完整,排他登录等需求功能原生具备。</li>
|
||
<li><strong>备选 B:Keycloak + Apereo CAS 组合</strong>——Keycloak 作为 IAM 核心,Apereo CAS 作为前置 CAS 认证层。适合已有 Keycloak 使用经验的团队,但架构复杂度更高。</li>
|
||
</ul>
|
||
|
||
<h3 class="sub-sub-title">16.4 架构蓝图</h3>
|
||
<div class="arch-diagram">
|
||
┌──────────────────────────────────────────────────────────────────┐
|
||
│ 推荐架构 │
|
||
│ │
|
||
│ ┌────────────────────────────────────────────────────────────┐ │
|
||
│ │ Casdoor(IAM 核心) │ │
|
||
│ │ ┌───────────┐ ┌───────────┐ ┌────────────────────────┐ │ │
|
||
│ │ │ CAS IdP │ │ SAML IdP │ │ OAuth 2.0 / OIDC │ │ │
|
||
│ │ └───────────┘ └───────────┘ └────────────────────────┘ │ │
|
||
│ │ ┌───────────┐ ┌───────────┐ ┌────────────────────────┐ │ │
|
||
│ │ │ MFA 引擎 │ │ Casbin │ │ 用户/组织管理 │ │ │
|
||
│ │ │ (TOTP/ │ │ (RBAC/ │ │ + ESB 同步 │ │ │
|
||
│ │ │ 短信/ │ │ ABAC) │ │ │ │ │
|
||
│ │ │ WebAuthn)│ └───────────┘ └────────────────────────┘ │ │
|
||
│ │ └───────────┘ │ │
|
||
│ └────────────────────────────────────────────────────────────┘ │
|
||
│ ▲ │
|
||
│ ┌────────────────────┼────────────────────┐ │
|
||
│ │ │ │ │
|
||
│ ┌──────▼──────┐ ┌───────▼───────┐ ┌───────▼───────┐ │
|
||
│ │ 密码代填引擎 │ │ 深信服 aTrust │ │ 自研 SDK 层 │ │
|
||
│ │ (Form-Fill │ │ (零信任网关) │ │ Android/鸿蒙 │ │
|
||
│ │ 代理模块) │ │ │ │ Java/PHP/C# │ │
|
||
│ └─────────────┘ └───────────────┘ └───────────────┘ │
|
||
│ │
|
||
│ ┌────────────────────────────────────────────────────────────┐ │
|
||
│ │ 数据层 │ │
|
||
│ │ ┌──────────────┐ ┌──────────────┐ │ │
|
||
│ │ │ 达梦数据库 │ │ Redis 缓存 │ │ │
|
||
│ │ │ (业务 + 日志 │ │ (Session/ │ │ │
|
||
│ │ │ 分库分表) │ │ Token) │ │ │
|
||
│ │ └──────────────┘ └──────────────┘ │ │
|
||
│ └────────────────────────────────────────────────────────────┘ │
|
||
└──────────────────────────────────────────────────────────────────┘</div>
|
||
</div>
|
||
|
||
</div><!-- .content -->
|
||
</div><!-- .layout -->
|
||
</div><!-- .container -->
|
||
|
||
<button class="toc-toggle" id="tocToggle" aria-label="目录">☰</button>
|
||
|
||
<script>
|
||
const links = document.querySelectorAll('.sidebar-link');
|
||
const sections = document.querySelectorAll('.section');
|
||
|
||
function setActiveLink() {
|
||
let current = '';
|
||
sections.forEach(s => {
|
||
if (window.scrollY >= s.offsetTop - 100) current = s.id;
|
||
});
|
||
links.forEach(l => {
|
||
l.classList.toggle('active', l.getAttribute('href') === '#' + current);
|
||
});
|
||
}
|
||
|
||
window.addEventListener('scroll', setActiveLink);
|
||
setActiveLink();
|
||
|
||
document.getElementById('tocToggle').addEventListener('click', function() {
|
||
document.getElementById('sidebar').classList.toggle('open');
|
||
});
|
||
|
||
links.forEach(l => l.addEventListener('click', function() {
|
||
if (window.innerWidth <= 768) document.getElementById('sidebar').classList.remove('open');
|
||
}));
|
||
</script>
|
||
</body>
|
||
</html>
|