Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update Lua tree generation script & patch file for Kong 3.1.0-0 Luarock #35

Closed
wants to merge 6 commits into from

Conversation

omegabytes
Copy link
Contributor

No description provided.

@omegabytes omegabytes requested a review from a team as a code owner December 7, 2022 20:48
@omegabytes
Copy link
Contributor Author

Need to add support for/replace ngx.base64 (probably alias it like we did with ngx.re.match)


local sha256_bin
do
local digest = require "resty.openssl.digest"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This relies on ffi and will need to be removed/replaced (see https://github.com/Kong/goks/blob/main/patches/lua-tree.patch#L68)

@omegabytes omegabytes marked this pull request as draft December 7, 2022 23:07
@omegabytes
Copy link
Contributor Author

Need to add support for/replace ngx.base64 (probably alias it like we did with ngx.re.match)

I'm not so sure about this after looking at how base64 us being used across the project. Why is decode_base64 imported directly but decode_base64url imports ngx.base64 first? If I update the imports to match then things work correctly. One example here

  local decode_base64    = ngx.decode_base64
  local decode_base64url = require "ngx.base64".decode_base64url

To resolve, we could fix the import in kong, or I can patch it in goks. I wrote some throwaway logic that aliases decode_base64 and decode_base64url methods using the go encoding lib here.

@omegabytes
Copy link
Contributor Author

I moved this to draft since there's some patching or package overriding required in order to push this over. I don't have a complete list yet, the two I've noticed are the sha256 methods and patching/replacing of ngx.base64.decode_base64* methods.

@mikefero
Copy link
Contributor

mikefero commented Feb 7, 2023

@omegabytes With 3.2.0 on the horizon I am going to close this PR in favor of grabbing the newest updates after that release occurs.

@mikefero mikefero closed this Feb 7, 2023
@omegabytes omegabytes deleted the feat/kong-v31 branch April 13, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants