Ayush1234-coder-sketch/ZeroTrust-IAM

GitHub: Ayush1234-coder-sketch/ZeroTrust-IAM

一个采用纵深防御与零信任理念的模块化 IAM 系统,实现从身份验证、MFA 到策略执行的全流程管控。

Stars: 0 | Forks: 0

# 🛡️ 零信任身份与访问管理(IAM) [![Python](https://img.shields.io/badge/Python-3.10+-blue.svg)](https://www.python.org/downloads/) [![Security](https://img.shields.io/badge/Security-Zero--Trust-red.svg)]() [![License](https://img.shields.io/badge/License-MIT-green.svg)]() 一个采用 **纵深防御** 架构的模块化、后端密集型身份与访问管理系统。该项目实现了零信任安全的核心理念:“永不信任,始终验证”。 ## 🚀 关键特性 * **安全身份存储:** 使用 `bcrypt` 结合自适应加盐进行行业标准密码哈希。 * **无状态认证:** 实施 **JWT(JSON Web 令牌)** 进行会话管理,确保微服务环境下的可扩展性与安全性。 * **多因素认证(MFA):** 集成 **TOTP(基于时间的一次性密码)** 支持,兼容 Google Authenticator 与 Authy。 * **上下文验证:** 基于源 IP 与时段约束的自适应安全层,验证请求合法性。 * **细粒度 RBAC(基于角色的访问控制):** 集中式 **策略引擎** 强制执行最小权限原则。 * **API 网关代理:** 集中式安全中间件,拦截并验证所有内部服务请求。 * **VAPT-ready 日志:** 完整的安全审计轨迹,记录每一次 `GRANTED` 与 `DENIED` 事件及其元数据。 ## 🏗️ 架构与流程 系统为每个请求遵循严格的五阶段验证流水线: 1. **上下文检查:** 请求是否来自可信 IP 且在授权时段内? 2. **身份验证:** 盐值哈希是否与数据库匹配? 3. **保障层:** 6 位 TOTP 码是否有效且未过期? 4. **令牌验证:** JWT 签名是否完整且未失效? 5. **策略执行:** 用户角色是否具备针对特定操作的显式权限? ## 🛠️ 技术栈 * **语言:** Python 3.x * **密码学:** `bcrypt`(哈希)、`PyJWT`(令牌化) * **MFA 协议:** `pyotp`(RFC 6238) * **数据存储:** JSON(扁平文件身份存储) * **日志:** Python 标准 `logging` 库 ## 视频演示链接: https://screenrec.com/share/AD0Q6haO3Y ## 📦 安装与使用 1. **克隆仓库:** git clone [https://github.com/Ayush1234-coder-sketch/ZeroTrust-IAM.git](https://github.com/Ayush1234-coder-sketch/ZeroTrust-IAM.git) cd ZeroTrust-IAM ## 安装依赖: pip install -r requirements.txt ## 运行系统: python main.py ## 🔒 实施的安全原则 ``` Least Privilege: Users are granted the minimum level of access required. Assume Breach: The internal network is treated as untrusted; every request is verified. Non-Repudiation: Every action is logged in security_audit.log for forensic analysis. Separation of Concerns: Modular design where Auth, Policy, and Gateway logic are decoupled. ``` ## 👨‍💻 关于作者 Ayush Singh 网络安全研究员 & 未来的 B.Tech 计算机科学学生 我是一名专注于 Web 应用安全、VAPT(漏洞评估与渗透测试)以及身份与访问管理(IAM)的安全开发者。 🎯 专业方向与理念 我坚信在现代威胁格局中,基于边界的安全已过时。我的工作围绕零信任架构展开,其中身份是新的边界。此项目 ZeroTrust-IAM 是我致力于构建“永不信任,始终验证”系统的承诺体现。 🛠️ 技术专长 ``` Offensive Security: Bug Bounty Hunting, Web App Pentesting (XSS, SQLi, IDOR), and automated vulnerability scanning. Security Engineering: Developing secure-by-design backends, implementing cryptographically secure session management, and Multi-Factor Authentication (MFA). Programming: Proficient in Python for security automation and C/C++ for core computer science fundamentals. Tools: Burp Suite Professional, Metasploit, Nmap, and PyJWT. ``` 📈 当前项目与培训 ``` VAPT Training: Currently undergoing a rigorous 6-month specialized VAPT program at Ansh Infotech (Started Jan 2026). AI Security: Developing an AI-driven vulnerability scanner to automate the detection of injection-based flaws in modern web architectures. Identity Research: Exploring Zero-Trust Identity and Access Management to eliminate the risk of lateral movement in enterprise networks. ``` 🤝 与我连接 我积极寻求远程优先的网络安全实习机会,在贡献关键基础设施防御的同时不断提升进攻性安全技能。 ``` GitHub: Ayush1234-coder-sketch LinkedIn: www.linkedin.com/in/ayush-singh-67050b333 Location: Jamshedpur, Jharkhand, India (Available for Remote Global Roles) ```
标签:API网关, bcrypt, Homebrew安装, IAM, IP信任, JSONLines, JSON Web Token, JWT, MFA, Python, RBAC, Streamlit, TOTP, VAPT, 一次性密码, 会话管理, 后端架构, 多因素认证, 安全中间件, 密码哈希, 微服务安全, 无后门, 时间约束, 权限管理, 模型越狱, 策略引擎, 网络安全挑战, 自适应验证, 访问控制, 逆向工具, 防御深度, 集中式策略, 零信任