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

Tokenbased authentification for slack-like webhooks? #22

Open
poVoq opened this issue Jun 12, 2021 · 3 comments
Open

Tokenbased authentification for slack-like webhooks? #22

poVoq opened this issue Jun 12, 2021 · 3 comments

Comments

@poVoq
Copy link

poVoq commented Jun 12, 2021

Hello,

I am interested in using this with Matterbridge, which recently added a way to relay messages to XMPP (spoofing users) via this Prosody module: https://modules.prosody.im/mod_slack_webhooks.html

But one of the downsides is that there is no authentication, so you can not expose this webhook endpoint anywhere.

Does this support some sort of tokenbased authentication that can be added to the webhook url?

Also, can it add messages to a MUC?

Thanks!

Edit: or is this actually a stupid question as this isn't a component and just relays messages as a bot? I guess so :(

@poVoq
Copy link
Author

poVoq commented Jun 16, 2021

Hmm looking at this guess not: https://github.com/tmsmr/xmpp-webhook/blob/master/parser/slack-compatible.go

So anyone who knows the URL can post random messages via this bot unless it it used in a local network only?

@tmsmr
Copy link
Collaborator

tmsmr commented Jun 16, 2021

Hey @poVoq.
I'm not sure about your use case. Do you want to call webhooks using Matterbridge to send XMPP messages? If yes, this would be possible with a new handler (No big deal).
You can't send messages to MUC's at the moment. But i agree, that would be useful - i'll check what has to be done for that.
I aim to keep this project as small as possible, that's why there is no authentication included. To be honest, i think it's better to use a proxy for (basic-) authentication (architecture-wise), e.g.:

@poVoq
Copy link
Author

poVoq commented Jun 16, 2021

The idea with Matterbridge is basically scrapped since I understood this appears as a bot account in XMPP (which Matterbridge supports anyways) and not as a more powerful component.

But I would still like to use this to send notifications from a Flarum.org forum via the Slack-like webhook support to a XMPP Muc. Preferrably with some shared secret so that the webhook can be less easily abused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants