Skip to content

Fixed Generic WebHook API Key not working correctly - #1673

Merged
J12934 merged 2 commits into
mainfrom
fix/generic-webhook-apikey
Apr 4, 2023
Merged

J12934 merged 2 commits into
mainfrom
fix/generic-webhook-apikey

Conversation

@Ilyesbdlala

@Ilyesbdlala Ilyesbdlala commented Apr 3, 2023 •

Copy link
Copy Markdown
Member

Description

closes #1664
Renamed the values.yaml API key authentication to correspond to the name of the key of the secret instead of the value. Changed template and hook.js accordingly

POC:
Create secret:

kubectl create secret generic generic-webhook-credentials -n integration-tests \
--from-literal=headerName='X-Example-Header' \
--from-literal=headerValue='ThisIsAnAPIkeyValue'

Webhook Event:

{
  "event": {
    "method": "POST",
    "path": "/",
    "query": {},
    "client_ip": "192.168.0.1",
    "url": "https://redacted.m.pipedream.net/",
    "headers": {
      "host": "redacted.m.pipedream.net",
      "content-length": "4057",
      "accept": "application/json, text/plain, */*",
      "content-type": "application/json",
      "x-example-header": "ThisIsAnAPIkeyValue",
      "user-agent": "axios/0.27.2"
    },
    "body": {...}
    }
}

Checklist

  • Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
  • Make sure that all your commits are signed-off and that you are added to the Contributors file.
  • Make sure that all CI finish successfully.
  • Optional (but appreciated): Make sure that all commits are Verified.

Renamed the values.yaml api key authentication to correspond to the name of the key of the secret instead of the value.
changed template and hook.js accordingly

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
@Ilyesbdlala Ilyesbdlala added the bug Bugs label Apr 3, 2023
@Ilyesbdlala Ilyesbdlala self-assigned this Apr 3, 2023
@Ilyesbdlala Ilyesbdlala changed the title #1664 Fixed Generic WebHook API Key not working correctly Fixed Generic WebHook API Key not working correctly Apr 3, 2023
@Ilyesbdlala
Ilyesbdlala requested a review from J12934 April 3, 2023 18:55
@github-actions

github-actions Bot commented Apr 3, 2023 •

Copy link
Copy Markdown

MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
⚠️ JAVASCRIPT eslint 1 1 0.75s
✅ SPELL misspell 2 0 0.05s
✅ YAML prettier 1 0 0.57s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

…bhook

Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
@J12934
J12934 merged commit 322dfad into main Apr 4, 2023
@J12934
J12934 deleted the fix/generic-webhook-apikey branch April 4, 2023 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bugs

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Generic WebHook API Key is not working as intended

2 participants