kanywst/awesome-authorization

GitHub: kanywst/awesome-authorization

一份授权与访问控制工具、框架与标准的精选清单,解决如何选型与理解授权体系的问题。

Stars: 0 | Forks: 0

# Awesome 授权 [![Awesome](https://awesome.re/badge.svg)](https://awesome.re)
Awesome Authorization
## 目录 - [策略引擎与框架](#policy-engines--frameworks) - [标准与规范](#standards--specifications) - [授权即服务](#authorization-as-a-service) - [访问控制模型](#access-control-models) - [实际应用](#real-world-implementations) - [安全性](#security) - [文章与教程](#articles--tutorials) - [视频与演讲](#videos--talks) - [书籍](#books) ## 策略引擎与框架 ### 通用型 - [OPA (Open Policy Agent)](https://www.openpolicyagent.org/) - CNCF 毕业项目。带有自身语言(Rego)的通用策略引擎。 - [Cedar](https://www.cedarpolicy.com/) - AWS 提供的策略语言与引擎,设计上具备可分析性和表达性。 - [Casbin](https://casbin.org/) - 支持 ACL、RBAC、ABAC 等。拥有多种语言和存储后端的适配器。 - [Cerbos](https://cerbos.dev/) - 自托管授权层。策略使用 YAML/JSON 定义,并内置测试支持。 - [Oso](https://www.osohq.com/) - 附带 Polar,一种用于应用级授权的声明式策略语言。 - [Open Policy Administration Layer (OPAL)](https://github.com/permitio/opal) - 实时保持各策略引擎中的数据与策略同步。 ### 基于 Zanzibar 的实现 灵感来源于 Google Zanzibar,即 Google 围绕基于关系访问控制的全球授权系统。 - [SpiceDB](https://github.com/authzed/spicedb) - 由 Authzed 提供的用于细粒度权限的 Zanzibar 风格数据库。 - [OpenFGA](https://github.com/openfga/openfga) - 细粒度授权引擎,最初来自 Auth0。处于 CNCF 孵化阶段。 - [Permify](https://github.com/Permify/permify) - Zanzibar 风格的细粒度访问控制服务。2025 年被 FusionAuth 收购。 - [Ory Keto](https://github.com/ory/keto) - Go 实现的 Zanzibar。属于 Ory 生态的一部分。 - [Topaz](https://github.com/aserto-dev/topaz) - 将 Zanzibar 模型与 OPA 结合。由 Aserto 提供。 - [Warrant](https://github.com/warrant-dev/warrant) - 细粒度授权引擎,灵感来自 Zanzibar。 ### Kubernetes 原生 - [OPA Gatekeeper](https://github.com/open-policy-agent/gatekeeper) - 使用 OPA 策略的 Kubernetes 准入控制器。 - [Kyverno](https://kyverno.io/) - Kubernetes 原生策略引擎,用于验证、修改和生成。 - [Kubewarden](https://www.kubewarden.io/) - 使用 WebAssembly 的 Kubernetes 策略引擎。 - [jsPolicy](https://www.jspolicy.com/) - 使用 JavaScript/TypeScript 编写 Kubernetes 策略。 ### AuthZEN 实现 - [OPA AuthZEN Plugin](https://github.com/kanywst/opa-authzen-plugin) - 实现 OpenID AuthZEN 授权 API 的 OPA 插件。 - Cerbos - 支持 AuthZEN PDP API。参见 [通用型](#general-purpose)。 - [Topaz](https://www.topaz.sh/) - 支持 AuthZEN 评估 API。参见 [基于 Zanzibar 的实现](#zanzibar-based)。 ### 语言特定库 - [Spring Security](https://spring.io/projects/spring-security) - Java/Spring 的安全框架,同时处理认证与授权。 - [Apache Shiro](https://shiro.apache.org/) - Java 安全框架,涵盖认证、授权、加密和会话管理。 - [Pundit](https://github.com/varvet/pundit) - 使用纯 Ruby 对象为 Ruby on Rails 提供简单授权。 - [CanCanCan](https://github.com/CanCanCommunity/cancancan) - Ruby on Rails 授权,定义用户可以或不可以做什么。 - [CASL](https://casl.js.org/) - 同构的 JavaScript/TypeScript 授权,支持 ABAC。 - [Authzed 客户端库](https://github.com/authzed) - SpiceDB 的官方客户端,支持 Go、Python、Java、Ruby 和 Node.js。 - [django-rules](https://github.com/dfunckt/django-rules) - 使用可组合谓词为 Django 提供对象级权限。 - [Laravel Authorization](https://laravel.com/docs/authorization) - Laravel 中的授权门与策略。 ## 标准与规范 ### OpenID AuthZEN - [AuthZEN 规范](https://openid.net/wg/authzen/) - OpenID 工作组标准化的用于授权决策的 REST API(PDP/PEP)。 - [AuthZEN 互操作性](https://github.com/openid/authzen) - AuthZEN 实现之间的互操作性测试。 ### 身份与联邦 - [OAuth 2.0 (RFC 6749)](https://datatracker.ietf.org/doc/html/rfc6749) - 委托授权的标准框架。 - [OAuth 2.1 (草案)](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-11) - 将 OAuth 2.0 及其最佳实践 RFC 合并为一个规范。 - [OpenID Connect (OIDC)](https://openid.net/developers/how-connect-works/) - 位于 OAuth 2.0 之上的身份层。 - [UMA 2.0(用户管理访问)](https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-grant-2.0.html) - 基于 OAuth 的协议,允许用户控制对其资源的访问。 - [GNAP](https://datatracker.ietf.org/doc/html/draft-ietf-gnap-core-protocol) - 授权协商与授权协议。OAuth 的下一代继任者。 ### 工作负载身份 - [SPIFFE](https://spiffe.io/) - 为每个人提供安全生产身份框架。为工作负载提供加密身份(CNCF)。 - [SPIRE](https://spiffe.io/docs/latest/spire-about/) - 生产就绪的 SPIFFE 运行时。 - [SPIFFE/SPIRE 文档](https://spiffe.io/docs/) - 官方文档。 ### 策略标准 - [XACML](https://en.wikipedia.org/wiki/XACML) - 基于 XML 的 ABAC 策略标准。成熟但冗长。 - [ALFA](https://en.wikipedia.org/wiki/ALFA_\(authorization\)) - 用于编写 XACML 策略的可读性领域特定语言。 ### 云原生 - [CNCF TAG-Security](https://github.com/cncf/tag-security) - 负责授权、策略与安全的 CNCF 技术咨询组。 ## 授权即服务 - [Auth0 Fine Grained Authorization](https://auth0.com/fine-grained-authorization) - 由 Auth0/Okta 提供的托管 OpenFGA。 - [Authzed](https://authzed.com/) - 托管的 SpiceDB。Zanzibar 风格的细粒度权限。 - [Permit.io](https://www.permit.io/) - 全栈授权,包含策略管理 UI 和 OPAL。 - [Aserto](https://www.aserto.com/) - 基于 Topaz(OPA + Zanzibar)的云原生授权。 - [Oso Cloud](https://www.osohq.com/oso-cloud) - 使用 Polar 策略语言进行托管授权。 - [Cerbos Hub](https://www.cerbos.dev/product-cerbos-hub) - 托管的 Cerbos 策略部署与测试。 - [Amazon Verified Permissions](https://aws.amazon.com/verified-permissions/) - 由 AWS 提供的基于 Cedar 的托管授权服务。 - [Axiomatics](https://www.axiomatics.com/) - 企业级 ABAC 平台。 - [PlainID](https://www.plainid.com/) - 企业级基于策略的访问控制。 ## 访问控制模型 - [RBAC](https://en.wikipedia.org/wiki/Role-based_access_control) - 基于角色的访问控制。权限分配给角色,角色分配给用户。 - [ABAC](https://en.wikipedia.org/wiki/Attribute-based_access_control) - 基于属性的访问控制。根据用户、资源与上下文属性进行决策。 - [ReBAC](https://en.wikipedia.org/wiki/Relationship-based_access_control) - 基于关系的访问控制。访问取决于实体间的关系(参见 Zanzibar)。 - [PBAC](https://csrc.nist.gov/glossary/term/policy_based_access_control) - 基于策略的访问控制。策略动态评估访问请求。 - [DAC](https://en.wikipedia.org/wiki/Discretionary_access_control) - 自主访问控制。资源所有者决定谁获得访问权限。 - [MAC](https://en.wikipedia.org/wiki/Mandatory_access_control) - 强制访问控制。基于安全标签,由系统强制执行。 - [ACL](<_URL_66/>) - 访问控制列表。定义每个对象允许谁执行什么操作。 ## 实际应用 公司如何进行大规模授权。 - [Google Zanzibar (Paper)](https://research.google/pubs/pub48190/) - Google 的全局一致授权系统。 - [Airbnb Himeji](https://medium.com/airbnb-engineering/himeji-a-scalable-centralized-system-for-authorization-at-airbnb-341664924574) - 集中式授权系统,基于 Zanzibar。 - [Netflix ABAC on SpiceDB](https://netflixtechblog.com/abac-on-spicedb-enabling-netflixs-complex-identity-types-c118f374fa89) - Netflix 如何使用 SpiceDB 处理复杂的身份类型。 - [How Netflix Is Solving Authorization Across Their Cloud](https://www.youtube.com/watch?v=R6tUNpRpdnY) - 关于 Netflix 云端授权方案的演讲。 - [Carta AuthZ](https://medium.com/building-carta/authz-cartas-highly-scalable-permissions-system-782a7f2c840f) - 可扩展的权限系统,同样基于 Zanzibar。 - [Uber ABAC](https://www.uber.com/blog/attribute-based-access-control-at-uber/) - 跨微服务的集中式 ABAC。 - [LinkedIn Authorization at Scale](https://engineering.linkedin.com/blog/2019/03/authorization-at-linkedins-scale) - 高性能的微服务授权。 - [Reddit Advertising Authorization](https://www.reddit.com/r/RedditEng/comments/13vttm8/evolving_authorization_for_our_advertising/) - 广告平台的细粒度授权。 - [Figma Custom Permissions DSL](https://www.figma.com/blog/how-we-rolled-out-our-own-permissions-dsl-at-figma/) - Figma 构建的权限专用领域语言。 - [Intuit AuthZ](https://medium.com/intuit-engineering/authz-intuits-unified-dynamic-authorization-system-bea554d18f91) - 基于 XACML 的统一授权系统。 - [Lyft Airflow DAG-Level Access](https://eng.lyft.com/securing-apache-airflow-ui-with-dag-level-access-a7bc649a2821) - Airflow 的 DAG 级访问控制。 - [AppsFlyer Microservices Authorization](https://medium.com/appsflyerengineering/authorization-solution-for-microservices-architecture-a2ac0c3c510b) - 微服务中的授权模式。 - [Ubicloud ABAC Learnings](https://www.ubicloud.com/blog/learnings-from-building-a-simple-authorization-system-abac) - 构建简单 ABAC 系统的经验。 ## 安全性 - [OWASP Top 10 - Broken Access Control](https://owasp.org/Top10/A01_2021-Broken_Access_Control/) - #1 网络安全风险(2021)。 - [OWASP Authorization Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html) - 授权最佳实践。 - [OWASP API Security Top 10](https://owasp.org/www-project-api-security/) - 主要的 API 安全风险,包括被破坏的授权。 - [Insecure Direct Object References (IDOR)](https://portswigger.net/web-security/access-control/idor) - 最常见的访问控制漏洞之一。 - [CISA/NSA IDOR Advisory](https://www.theregister.com/2023/07/29/cisa_nsa_idor_australia/) - 关于 IDOR 普遍性的联合公告。 - [Building a Modern Zero Trust Strategy](https://thenewstack.io/ebooks/security/trust-no-one-and-automate-almost-everything-building-a-modern-zero-trust-strategy) - 由 The New Stack 提供的零信任概述。 ## 文章与教程 - [API Tokens: A Tedious Survey](https://fly.io/blog/api-tokens-a-tedious-survey/) - API 安全方法的概览。 - [Authorization in a Microservices World](https://www.alexanderlolis.com/authorization-in-a-microservices-world) - 微服务中的授权模式。 - [AWS - AuthZ for SaaS Multi-Tenant Apps](https://docs.aws.amazon.com/prescriptive-guidance/latest/saas-multitenant-api-access-authorization/welcome.html) - 如何在 AWS 上的多租户应用中设置授权。 - [Permissions Systems: Category Notes](https://kojo.blog/permissions-sytems/) - 权限系统的全景概览。 - [What Do Authentication and Authorization Mean in Zero Trust?](https://thenewstack.io/what-do-authentication-and-authorization-mean-in-zero-trust/) - 零信任中的认证与授权区别。 - [Feature Flags and Authorization Abstract the Same Concept](https://ntietz.com/blog/feature-flags-and-authorization/) - 对两者相似概念的有趣比较。 - [How To Structure Permissions In A SaaS App](https://heap.io/blog/structure-permissions-saas-app) - SaaS 中的 RBAC、ACL 等权限结构设计。 - [Why Google Zanzibar Shines at Building Authorization](https://workos.com/blog/google-zanzibar-authorization) - 为什么 Google Zanzibar 适合应用授权。 - [MCP and Zero Trust: Securing AI Agents With Identity and Policy](https://www.cerbos.dev/blog/mcp-and-zero-trust-securing-ai-agents-with-identity-and-policy) - 通过 MCP 将授权应用于 AI 代理。 ## 视频与演讲 - [Hashicorp - Microservice Authentication and Authorization (2019)](https://www.youtube.com/watch?v=ZjPF8yZ83Wo) - 微服务的认证与授权模式。 - [Deloitte - Zero Trust with ABAC (2022)](https://www.youtube.com/watch?v=-XFn85HtVDA) - ABAC 在零信任架构中的应用。 - [Zanzibar at @Scale 2019](https://www.facebook.com/atscaleevents/videos/scale-2019-zanzibar-googles-consistent-global-authorization-system/524366141717632/) - Google 介绍 Zanzibar。 - [Zanzibar Academy](https://zanzibar.academy/) - 由 Auth0 提供的关于 Zanzibar 的学习资源。 ## 书籍 - [Solving Identity Management in Modern Applications](https://link.springer.com/book/10.1007/978-1-4842-8261-8) - 身份认证、授权与身份管理模式(Apress)。 - [OAuth 2 in Action](https://www.manning.com/books/oauth-2-in-action) - OAuth 2.0 深入详解(Manning)。 ## 贡献 欢迎贡献!请先阅读 [贡献指南](CONTRIBUTING.md)。
标签:ABAC, ACL, AWS, CNCF, DPI, Groq API, IAM, JS文件枚举, RBAC, Rego, Streamlit, web渗透, Zanzibar, 关系型访问控制, 子域名突变, 安全, 实现, 开源, 授权, 教程, 数据可视化, 日志审计, 服务, 权限管理, 模型越狱, 策略引擎, 策略语言, 细粒度权限, 网络安全挑战, 视频, 认证与授权, 访问控制, 访问控制模型, 超时处理, 身份与访问管理, 逆向工具