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

Chainhook is not forwarding the auth header to webhook url for stacks predicates #438

Closed
BLuEScioN opened this issue Oct 10, 2023 · 2 comments · Fixed by #444
Closed

Chainhook is not forwarding the auth header to webhook url for stacks predicates #438

BLuEScioN opened this issue Oct 10, 2023 · 2 comments · Fixed by #444
Assignees
Labels
bug Something isn't working released

Comments

@BLuEScioN
Copy link

BLuEScioN commented Oct 10, 2023

@micaiah There is a customer who is saying their auth header is not being added to the requests to their webhook url
Here is what platform is sending to chainhook api

{
    "name": "For localhost",
    "chain": "stacks",
    "version": 1,
    "networks": {
        "testnet": {
            "if_this": {
                "scope": "contract_call",
                "method": "create-gig",
                "contract_identifier": "ST2GW18TVQR75W1VT53HYGBRGKFRV5BFYNAYRBHF4.Cerulean-marketplace-v1"
            },
            "end_block": null,
            "then_that": {
                "http_post": {
                    "url": "https://update-zero.vercel.app/api/chainhook/updateGig",
                    "authorization_header": "abcdefg"
                }
            },
            "start_block": 107542,
            "decode_clarity_values": true,
            "expire_after_occurrence": null
        }
    }
}

Here is the customer's predicate json, which I uploaded using the file upload feature

{
  "name": "For localhost",
  "chain": "stacks",
  "version": 1,
  "networks": {
    "testnet": {
      "if_this": {
        "scope": "contract_call",
        "method": "create-gig",
        "contract_identifier": "ST2GW18TVQR75W1VT53HYGBRGKFRV5BFYNAYRBHF4.Cerulean-marketplace-v1"
      },
      "end_block": null,
      "then_that": {
        "http_post": {
          "url": "https://update-zero.vercel.app/api/chainhook/updateGig",
          "authorization_header": "abcdefg"
        }
      },
      "start_block": 107542,
      "decode_clarity_values": true,
      "expire_after_occurrence": null
    }
  }
}

It seems like platform is sending the data correctly. Can you check this from your side please?
Here is the link to the thread in Discord - https://discord.com/channels/621759717756370964/1086336958546071666/1161310372700110879
cc @sabby

@BLuEScioN BLuEScioN converted this from a draft issue Oct 10, 2023
@MicaiahReid
Copy link
Contributor

It looks like we only forward the authorization_header field for bitcoin hooks and not for stacks.

@MicaiahReid MicaiahReid added the bug Something isn't working label Oct 10, 2023
@MicaiahReid MicaiahReid changed the title Chainhook is not forwarding the auth header to webhook url Chainhook is not forwarding the auth header to webhook url for stacks predicates Oct 11, 2023
MicaiahReid added a commit that referenced this issue Oct 11, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in DevTools Oct 11, 2023
github-actions bot pushed a commit that referenced this issue Oct 11, 2023
## [1.1.1](v1.1.0...v1.1.1) (2023-10-11)

### Bug Fixes

* add auth header for stacks hook ([#444](#444)) ([8c4e5ea](8c4e5ea)), closes [#438](#438)
* don't evaluate transactions for block predicates ([#445](#445)) ([0e84fe7](0e84fe7))
* redis conn ([#442](#442)) ([80737ad](80737ad))
@github-actions
Copy link

🎉 This issue has been resolved in version 1.1.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

vabanaerytk added a commit to vabanaerytk/chainhook that referenced this issue Aug 7, 2024
## [1.1.1](hirosystems/chainhook@v1.1.0...v1.1.1) (2023-10-11)

### Bug Fixes

* add auth header for stacks hook ([#444](hirosystems/chainhook#444)) ([3d0ad07](hirosystems/chainhook@3d0ad07)), closes [#438](hirosystems/chainhook#438)
* don't evaluate transactions for block predicates ([#445](hirosystems/chainhook#445)) ([ac3d726](hirosystems/chainhook@ac3d726))
* redis conn ([#442](hirosystems/chainhook#442)) ([5e6d704](hirosystems/chainhook@5e6d704))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants