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

Using Skipper for implementing webhooks #2920

Open
cloudcompute opened this issue Feb 11, 2024 · 4 comments
Open

Using Skipper for implementing webhooks #2920

cloudcompute opened this issue Feb 11, 2024 · 4 comments

Comments

@cloudcompute
Copy link

Can we use Skipper to connect our application with other applications using Webhook protocol?

My 'triggering' application serializes data and send it to a webhook URL to another 'processing' application let's say CRM. The CRM application can then send a message (with an HTTP status code like 302) to let the triggering application know if the data was received successfully or 404 if not followed by the response.

Skipper must be queuing the HTTP requests (including the webhook requests) somewhere.. in a store like Redis or etcd or some other?

Could you please elaborate this in little detail?

Thanks

@szuecs
Copy link
Member

szuecs commented Feb 11, 2024

Can you draw a picture to clarify communication paths and steps?
In general it sounds like you could construct some routes to do what you want, but maybe you need to build a special filter for that. Skipper is a first class library to build proxies so it seems that you can also do very complex things that are not yet part of the binary offering.

@szuecs
Copy link
Member

szuecs commented Apr 8, 2024

@cloudcompute ?

@cloudcompute
Copy link
Author

Hi @szuecs

I somehow missed your messages, sorry for that.

My application (sends a request to Skipper to create a webhook for a CRM application) -------> Skipper (receives this request and the Webhook functionality built into Skipper further creates the webhook on my application behalf and sends it to the target CRM application) ---------> CRM application (processes the request and sends the result back to Skipper)

So I want to use Skipper's Webhook functionality (without writing my own) as an intermediate between my application and the other apps. I don't know whether Skipper exposes API for the same.

@szuecs
Copy link
Member

szuecs commented Apr 21, 2024

I am not sure if you and I have the same meaning for the term "webhook".
A picture would make it simpler for us to understand each other.

For me your description could achieved by pure routing instead of a webhook. For example

api: PathSubtree("/api") -> "http://my-api.example";
webhook: PathSubtree("/cms") -> "http://my-crm.example";

Interesting would be what the webhook would do and what should skipper do with the response from the webhook.

There's an example webhook() filter that allows the webhook target to enforce authnz for the http request:

api: PathSubtree("/api") -> webhook("http://my-auth.example/auth") -> "http://my-api.example";

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

No branches or pull requests

2 participants