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

Improved configuration parameter validation #36

Merged
merged 4 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
args: kong spec
unit-tests:
needs: linting
needs: linting
name: Running unit tests.
runs-on: ubuntu-latest
steps:
Expand All @@ -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')
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
19 changes: 15 additions & 4 deletions .github/workflows/publish-rock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
paths:
- "*.rockspec"
workflow_dispatch:


jobs:
build_rock:
Expand All @@ -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/[email protected]
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 }}
Expand All @@ -42,4 +46,11 @@ jobs:
--field content="$CONTENT" \
--field encoding="base64" \
--field branch="$DESTINATION_BRANCH" \
--field sha="$SHA"
--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 }}
token: ${{ steps.get_token.outputs.token }}
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion kong/plugins/aws-request-signing/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,6 @@ function AWSLambdaSTS:access(conf)
end

AWSLambdaSTS.PRIORITY = 110
AWSLambdaSTS.VERSION = "1.0.3"
AWSLambdaSTS.VERSION = "1.0.4"

return AWSLambdaSTS
3 changes: 2 additions & 1 deletion kong/plugins/aws-request-signing/schema.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ return {
required = true,
} },
{ override_target_host = {
type = "string"
type = "string",
not_match = "^https?://"
} },
{ override_target_port = {
type = "number"
Expand Down
Loading