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

Remove headers from signature verification if gitlab invocation method #29

Merged

Conversation

omby8888
Copy link
Contributor

@omby8888 omby8888 commented Aug 5, 2024

Description

What - Remove headers from signature verification if gitlab invocation method
Why - Gitlab invocation method doesn't send other headers than port's headers

Type of change

Please leave one option from the following and delete the rest:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Non-breaking change (fix of existing functionality that will not change current behavior)
  • Documentation (added/updated documentation)

Copy link
Contributor

@Tankilevitch Tankilevitch left a comment

Choose a reason for hiding this comment

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

I would rather add CONTRIBUTING.md on how to test it with environment variables

@@ -295,8 +297,12 @@ def validate_incoming_signature(self, msg: dict) -> bool:
return False

# Remove the headers to avoid them being used in the signature verification
Copy link
Contributor

Choose a reason for hiding this comment

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

lets update the comment

Comment on lines 15 to 16
load_dotenv()

Copy link
Contributor

Choose a reason for hiding this comment

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

I would do it if specific env variable is specified . e.g. if ENV_RUNTIME='DEBUG'

Copy link
Member

@matan84 matan84 left a comment

Choose a reason for hiding this comment

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

left 1 comment

app/invokers/webhook_invoker.py Outdated Show resolved Hide resolved
Copy link
Member

@matan84 matan84 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Tankilevitch Tankilevitch left a comment

Choose a reason for hiding this comment

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

love that, great job with the CONTRIBUTING.md

@omby8888 omby8888 merged commit 0ee3af6 into main Aug 8, 2024
2 checks passed
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.

3 participants