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 · 6 comments
Open

Using Skipper for implementing webhooks #2920

cloudcompute opened this issue Feb 11, 2024 · 6 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";

@cloudcompute
Copy link
Author

cloudcompute commented Jun 6, 2024

Thanks @szuecs for the answer. I was looking for the full-fledged webhook solution. I think Skipper does not serve that purpose.

I have few questions

a. How can i integrate Skipper with Zitadel for authentication purposes?

b. Does Skipper has the API gateway functionality .. splitting a request to multiple backends / microservices and then aggregating the API responses, Or can I add a a Graphql aggregation/gateway plugin?

c. Traefik is very popular than Skipper. I don't think Traefik offers those many features like Skipper does, is it simply because of hype?

Regards

@szuecs
Copy link
Member

szuecs commented Jun 7, 2024

Thanks @szuecs for the answer. I was looking for the full-fledged webhook solution. I think Skipper does not serve that purpose.

I don't know what you mean by "full-fledged webhook solution".

I have few questions

a. How can i integrate Skipper with Zitadel for authentication purposes?

I don't know how Zitadel works. You have to understand what protocols they offer to integrate with applications.
We can do OAuth2 auth code grant flow and OpenID Connect, both are standards.

b. Does Skipper has the API gateway functionality .. splitting a request to multiple backends / microservices and then aggregating the API responses, Or can I add a a Graphql aggregation/gateway plugin?

No we are not an API gateway.
If you really want you can create lua filter that calls multiple endpoints and aggregate the results, but I think that would be a poor solution.

c. Traefik is very popular than Skipper. I don't think Traefik offers those many features like Skipper does, is it simply because of hype?

From my side we are of course better suited to all http related services than everyone else including Traefik.
From availability point of view you can DoS Traefik and skipper has protection for it.
From usability point of view I think skipper beats any other proxy, because of our route definitions are simple and you can compose features.

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