Skip to content

Commit

Permalink
Install lua-resty-jwt from source
Browse files Browse the repository at this point in the history
So we can use the fix for authentication bypass.

See: cdbattags/lua-resty-jwt#62
  • Loading branch information
tkan145 committed Feb 3, 2025
1 parent 7ad24bf commit 46e8ffe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ ENV PATH="./lua_modules/bin:/usr/local/openresty/luajit/bin/:${PATH}" \
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/pintsized/lua-resty-http-0.17.1-0.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/kikito/router-2.1-0.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/kikito/inspect-3.1.1-0.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/cdbattags/lua-resty-jwt-0.2.3-0.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/3scale/lua-resty-url-0.3.5-1.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/3scale/lua-resty-env-0.4.0-1.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/3scale/liquid-0.2.0-2.src.rock
Expand All @@ -63,6 +62,14 @@ RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/man
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/membphis/lua-resty-ipmatcher-0.6.1-0.src.rock
RUN luarocks install --deps-mode=none --tree /usr/local https://luarocks.org/manifests/fffonion/lua-resty-openssl-1.5.1-1.src.rock

# Install lua-resty-jwt from source due to Authentication Bypass bug
# See https://github.com/cdbattags/lua-resty-jwt/issues/61
RUN cd /tmp \
&& git clone --recurse-submodules https://github.com/cdbattags/lua-resty-jwt \
&& cd lua-resty-jwt \
&& git reset --hard d1558e2 \
&& luarocks make --tree /usr/local lua-resty-jwt-dev-0.rockspec

RUN yum -y remove libyaml-devel m4 openssl-devel git gcc luarocks && \
rm -rf /var/cache/yum && yum clean all -y && \
rm -rf ./*
Expand Down

0 comments on commit 46e8ffe

Please sign in to comment.