auto-ssl / auto-ssl/lua-resty-auto-ssl

Replace sockproc based approach of calling shell commands with ngx.pipe

Open
#164 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Lua
Stars
2k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

This functionality isn't available in stable OpenResty yet, but I believe it should be bundled in the upcoming 1.15.x release. The next version will include 2 things that could simplify some things for us:

- [ngx.pipe](https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/pipe.md#readme)
- https://github.com/openresty/lua-resty-shell

Both of these offer a built-in way to call shell scripts in a non-blocking fashion, which could replace our current reliance on sockproc and juce/lua-resty-shell. This would simplify various internal mechanics, and also allow for us to publish the package to OPM (https://github.com/GUI/lua-resty-auto-ssl/issues/45).

A lot of the reasons this would be nice are outlined in the issue about a pure Lua ACME protocol implementation (https://github.com/GUI/lua-resty-auto-ssl/issues/132). While I still think a pure lua-resty ACME protocol would be nice longer-term, I haven't quite found the time for tackling that (but I'm still hoping to get to it some day). This new OpenResty functionality would represent a much smaller change to lua-resty-auto-ssl (since we could still rely on the dehydrated shell script for most of the actual work), but would still offer some pretty nice benefits in terms of simplifying things.

Anyway, I just stumbled upon these new features, so I wanted to make note of it here as something to consider once the new version of OpenResty is released. We may also still want to keep compatibility with the old sockproc approach (since I know not everyone may be able to upgrade immediately), but it would at least be nice to move towards this cleaner and more officially supported way of calling shell scripts once it's out.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked ngx.pipe and lua-resty-shell documentation, then inspect the current sockproc and dehydrated integration. Review issues #45 and #132 for context; the issue does not define a test, file, migration boundary, or compatibility decision, so those would need to be established before work can be considered done.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx, shell
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.