From df3684eed7caf861c95ccfb87bd7c8be26ce0731 Mon Sep 17 00:00:00 2001 From: DanielRailean Date: Fri, 20 Oct 2023 09:56:41 +0200 Subject: [PATCH 1/4] Added simple check, not starting with http:// or https:// --- ...0.3-3.rockspec => kong-aws-request-signing-1.0.4-3.rockspec | 2 +- kong/plugins/aws-request-signing/handler.lua | 2 +- kong/plugins/aws-request-signing/schema.lua | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) rename kong-aws-request-signing-1.0.3-3.rockspec => kong-aws-request-signing-1.0.4-3.rockspec (97%) diff --git a/kong-aws-request-signing-1.0.3-3.rockspec b/kong-aws-request-signing-1.0.4-3.rockspec similarity index 97% rename from kong-aws-request-signing-1.0.3-3.rockspec rename to kong-aws-request-signing-1.0.4-3.rockspec index f6ef7dd..82db4c2 100644 --- a/kong-aws-request-signing-1.0.3-3.rockspec +++ b/kong-aws-request-signing-1.0.4-3.rockspec @@ -1,6 +1,6 @@ local plugin_name = "aws-request-signing" local package_name = "kong-" .. plugin_name -local package_version = "1.0.3" +local package_version = "1.0.4" local rockspec_revision = "3" local github_account_name = "LEGO" diff --git a/kong/plugins/aws-request-signing/handler.lua b/kong/plugins/aws-request-signing/handler.lua index 5f77ed1..f708dd0 100644 --- a/kong/plugins/aws-request-signing/handler.lua +++ b/kong/plugins/aws-request-signing/handler.lua @@ -175,6 +175,6 @@ function AWSLambdaSTS:access(conf) end AWSLambdaSTS.PRIORITY = 110 -AWSLambdaSTS.VERSION = "1.0.3" +AWSLambdaSTS.VERSION = "1.0.4" return AWSLambdaSTS diff --git a/kong/plugins/aws-request-signing/schema.lua b/kong/plugins/aws-request-signing/schema.lua index e081b82..4e3426a 100644 --- a/kong/plugins/aws-request-signing/schema.lua +++ b/kong/plugins/aws-request-signing/schema.lua @@ -33,7 +33,8 @@ return { required = true, } }, { override_target_host = { - type = "string" + type = "string", + not_match = "^https?://" } }, { override_target_port = { type = "number" From 906721f5a73f7e9fdeb6ceae6e22f5c4383a1c93 Mon Sep 17 00:00:00 2001 From: DanielRailean Date: Mon, 19 Feb 2024 13:56:08 +0100 Subject: [PATCH 2/4] Update publish-rock.yml --- .github/workflows/publish-rock.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-rock.yml b/.github/workflows/publish-rock.yml index c4a80d8..8fda637 100644 --- a/.github/workflows/publish-rock.yml +++ b/.github/workflows/publish-rock.yml @@ -5,7 +5,7 @@ on: paths: - "*.rockspec" workflow_dispatch: - + jobs: build_rock: @@ -19,14 +19,18 @@ jobs: - name: luarocks pack run: luarocks pack $(find . -maxdepth 1 -name "kong-aws-request-signing-*.rockspec" -print | sed 's/.\///g' | sed 's/.rockspec//g' | sed 's/signing-/signing /g') - + + - name: get version + id: version + run: echo "version=$(luarocks show aws-request-signing --mversion)" >> "$GITHUB_OUTPUT" + - name: Get token to commit id: get_token uses: peter-murray/workflow-application-token-action@v2.1.0 with: application_id: ${{ secrets.APP_GITHUB_100101_ID }} #Org app id application_private_key: ${{ secrets.APP_GITHUB_100101_PRIVATE_KEY }} #Org app secret - + - name: Commit the rock env: GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} @@ -42,4 +46,10 @@ jobs: --field content="$CONTENT" \ --field encoding="base64" \ --field branch="$DESTINATION_BRANCH" \ - --field sha="$SHA" \ No newline at end of file + --field sha="$SHA" + + - name: Create a GitHub release + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.version.outputs.version }} + name: Release ${{ steps.version.outputs.version }} From 897f355e4242f9a5cb20cca539b044cef2f04cb9 Mon Sep 17 00:00:00 2001 From: DanielRailean Date: Mon, 19 Feb 2024 13:59:40 +0100 Subject: [PATCH 3/4] Update build.yml --- .github/workflows/build.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1773a32..b9397b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: with: args: kong spec unit-tests: - needs: linting + needs: linting name: Running unit tests. runs-on: ubuntu-latest steps: @@ -40,4 +40,13 @@ jobs: - run: luarocks make - name: luarocks pack - run: luarocks pack $(find . -maxdepth 1 -name "kong-aws-request-signing-*.rockspec" -print | sed 's/.\///g' | sed 's/.rockspec//g' | sed 's/signing-/signing /g') \ No newline at end of file + run: luarocks pack $(find . -maxdepth 1 -name "kong-aws-request-signing-*.rockspec" -print | sed 's/.\///g' | sed 's/.rockspec//g' | sed 's/signing-/signing /g') + + - name: get version + id: version + run: echo "version=$(luarocks show aws-request-signing --mversion)" >> "$GITHUB_OUTPUT" + + - name: Echo version + env: + VERSION: ${{ steps.version.outputs.version }} + run: echo $VERSION From fc83df550f1145665f3be12304c2ff8807cde062 Mon Sep 17 00:00:00 2001 From: DanielRailean Date: Mon, 19 Feb 2024 14:02:25 +0100 Subject: [PATCH 4/4] Update publish-rock.yml --- .github/workflows/publish-rock.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-rock.yml b/.github/workflows/publish-rock.yml index 8fda637..8faf9f8 100644 --- a/.github/workflows/publish-rock.yml +++ b/.github/workflows/publish-rock.yml @@ -53,3 +53,4 @@ jobs: with: tag: ${{ steps.version.outputs.version }} name: Release ${{ steps.version.outputs.version }} + token: ${{ steps.get_token.outputs.token }}