登录 注册

lua-resty-openidc

去点 Star
网络与基础设施
1,073
Stars
—
Forks
0
Watchers
—
Open Issues
待补全
许可证
Lua
语言
—
创建时间
最近更新

项目能做什么

基于 Lua 实现的 NGINX / OpenResty OpenID Connect 与 OAuth 2.0 认证组件。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
[![CI Status](https://github.com/zmartzone/lua-resty-openidc/actions/workflows/docker-ci.yml/badge.svg)](https://github.com/zmartzone/lua-resty-openidc/actions/workflows/docker-ci.yml)
[<img width="184" height="96" align="right" src="http://openid.net/wordpress-content/uploads/2016/04/oid-l-certification-mark-l-rgb-150dpi-90mm@2x.png" alt="OpenID Certification">](https://openid.net/certification)

# lua-resty-openidc

**lua-resty-openidc** is a library for [NGINX](http://nginx.org/) implementing the
[OpenID Connect](http://openid.net/specs/openid-connect-core-1_0.html) **Relying Party (RP)**
and/or the [OAuth 2.0](https://tools.ietf.org/html/rfc6749) **Resource Server (RS)** functionality.

When used as an OpenID Connect Relying Party it authenticates users against an OpenID Connect
Provider using [OpenID Connect Discovery](http://openid.net/specs/openid-connect-discovery-1_0.html)
and the Basic Client Profile (i.e. the Authorization Code flow). When used as an OAuth 2.0
Resource Server it can validate OAuth 2.0 Bearer Access Tokens against an Authorization Server or, in
case a JSON Web Token is used for an Access Token, verification can happen against a pre-configured secret/key .

It maintains sessions for authenticated users by leveraging `lua-resty-session` thus offering
a configurable choice between storing the session state in a client-side browser cookie or use
in of the server-side storage mechanisms `shared-memory|memcache|redis`.

It supports server-wide caching of resolved Discovery documents and validated Access Tokens.

It can be used as a reverse proxy terminating OAuth/OpenID Connect in front of an origin server so that
the origin server/services can be protected with the relevant standards without implementing those on
the server itself.

## Dependencies

**lua-resty-openidc** depends on the following packages:

- [NGINX](http://nginx.org/) and [`ngx_devel_kit`](https://github.com/simpl/ngx_devel_kit)
- [Lua](http://www.lua.org/) or [LuaJIT](http://luajit.org/luajit.html)
- [`lua-nginx-module`](https://github.com/openresty/lua-nginx-module)
- [`lua-cjson`](http://www.kyne.com.au/~mark/software/lua-cjson.php)
- [`lua-resty-string`](https://github.com/openresty/lua-resty-string)

The dependencies above come automatically with [OpenResty](http://openresty.org/). You will need
to install two extra pure-Lua dependencies that implement session management and HTTP client functions:

- [`lua-resty-http`](https://github.com/pintsized/lua-resty-http)
- [`lua-resty-session`](https://github.com/bungle/lua-resty-session)

Typically - when running as an OpenID Connect RP or an OAuth 2.0 server that consumes JWT
access tokens - you'll also need to install the following dependency:

- [`lua-resty-jwt`](https://github.com/cdbattags/lua-resty-jwt)

The `lua-resty-jwt` dependency above is *not* required when running as an OAuth 2.0 Resource Server (only) using remote
introspection for access token validation.

## Installation

Using `luarocks` execu
阅读完整原文

项目深度分析 AI 生成

开箱即用的声明式 OIDC 安全反向代理网关(Turnkey Auth Gateway Appliance)

产品构想基于 OpenResty 和该项目封装一个无需编写 Lua 脚本的轻量级 Docker 镜像,通过 YAML 或环境变量声明即可为后端服务挂载 OIDC/OAuth2 认证防护。
核心功能环境变量/YAML 快速配置主流 IdP(Google、Okta、Keycloak 等)、内置 Redis 分布式会话与自动重试、下游用户信息 Header 自动映射与剥离、Prometheus 监控指标与健康检查端点。
目标用户中小型团队 DevOps、希望快速为内部 Web 工具(如 Grafana、内网后台)添加 SSO 的工程师。
难度/周期中等 · 3-5 周 · 成本:低(基础云服务器用于 CI/CD 与镜像构建测试)
收费模式核心开源 + 针对企业提供定制镜像打包/技术支持订阅或商业授权管理面板(Open-core)。
竞争风险Go 生态中已有成熟的 oauth2-proxy 等竞品,需突出 NGINX 底层性能与高并发优势以形成差异化。
依据 数据支持的判断

企业级 NGINX 身份接入与 SSO 改造咨询服务

产品构想依托该项目的 OpenID 官方认证背景与配置实践,为企业提供传统架构上云、微服务网关对接现代 IdP 的架构咨询、安全审计与调优实施。
核心功能JWKs 缓存与 Discovery 机制性能调优、分布式会话一致性方案设计、Token 动态注入与细粒度访问控制定制开发、生产环境排错支持。
目标用户有存量 NGINX/OpenResty 资产、需要打通企业 SSO/统一认证中心的大中型企业 IT/安全部门。
难度/周期低至中等 · 按项目交付(1-4 周/单) · 成本:极低(主要是时间成本)
收费模式按人天/项目的技术咨询费、定制交付实施费、年度保驾护航运维支持费。
竞争风险获客依赖个人专业网络与销售线索,服务难以规模化复制。
依据 已验证事实

基于 OpenResty 的增强型 API 安全扩展套件(商业插件包)

产品构想围绕 lua-resty-openidc 构建增强型中间件包,支持细粒度 RBAC/ABAC 权限校验、JWT 动态转换、以及多 IdP 路由策略。
核心功能基于 Claims 的请求动态阻断与路由、跨 IdP Token 交换与降级容灾、集成 Open Policy Agent (OPA) 决策引擎、企业审计日志导出。
目标用户自建 API 网关的技术团队、云原生应用平台工程团队。
难度/周期高 · 2-3 个月 · 成本:低
收费模式商业源码授权销售、企业节点席位订阅许可(Commercial License)。
竞争风险目标用户多为技术自研能力极强的开发者,可能选择基于开源库自行手写业务逻辑。
依据 AI推测
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
ElvinEfendi/ingress-nginx-openidc 中文介绍暂未生成
Integration of lua-resty-openidc to ingress-nginx using ingr
24 Lua
kg0r0/lua-resty-openidc-example 中文介绍暂未生成
:traffic_light: Implementation of NGINX as relying party for
11 Dockerfile
revomatico/docker-openresty-oidc 中文介绍暂未生成
Openresty + luarocks + lua-resty-openidc in a minimal Alpine
2 Dockerfile
moxoff/lua-resty-openidc-docker 中文介绍暂未生成
1 Dockerfile
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建时间待补全,最近推送 ,发布过 29 个 Release
社区活跃Star 1,073 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。