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

Support webhook signature header #168

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Support webhook signature header #168

merged 1 commit into from
Sep 5, 2024

Conversation

chaoyaji-cb
Copy link
Contributor

@chaoyaji-cb chaoyaji-cb commented Aug 27, 2024

What changed? Why?

  • Added the signature header attribute when create webhook
  • Adjusted the unit tests and added a webhook factory

Qualified Impact

pry(main)> Coinbase::Webhook.create(network_id:"base-mainnet", notification_uri:"https://realtest.com", event_type:"erc20_transfer", event_filters: [{ contract_address: "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"}], signature_header: 'example_header')
=> Coinbase::Webhook{id: '66ce48aafa6291d3192f170f', network_id: 'base-mainnet', event_type: 'erc20_transfer', notification_uri: 'https://realtest.com', event_filters: '[{"contract_address":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"}]', signature_header: 'example_header'}

pry(main)> tmp.update(notification_uri: 'https://updatedrealtest.com')
=> Coinbase::Webhook{id: '66ce48aafa6291d3192f170f', network_id: 'base-mainnet', event_type: 'erc20_transfer', notification_uri: 'https://updatedrealtest.com', event_filters: '[{"contract_address":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"}]', signature_header: 'example_header'}
image

@cb-heimdall
Copy link

cb-heimdall commented Aug 27, 2024

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@chaoyaji-cb chaoyaji-cb changed the title Support webhook signature Support webhook signature header Aug 27, 2024
@chaoyaji-cb chaoyaji-cb marked this pull request as ready for review August 27, 2024 23:39
cb-davidlai
cb-davidlai previously approved these changes Aug 27, 2024
@cb-heimdall cb-heimdall dismissed cb-davidlai’s stale review August 29, 2024 17:25

Approved review 2264655996 from cb-davidlai is now dismissed due to new commit. Re-request for approval.

add signature header to webhook.rb

ut with factory

lint
@alex-stone alex-stone merged commit f190b69 into master Sep 5, 2024
15 of 17 checks passed
@alex-stone alex-stone deleted the webhook-signature branch September 5, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants