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

Add SASL EXTERNAL authentication and example #48

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

Francesco149
Copy link

I've been trying to get my matrix irc relay working on an amazon ec2 server. little did i know that freenode requires sasl auth from certain ip ranges, which include ec2, to prevent abuse. so I tried setting up plain sasl auth but i could not get it to work even after applying the patched described in matrix-org/matrix-appservice-irc#689

I have however figured out that freenode will happily auth you if you use sasl EXTERNAL and attach a certificate to your conn

this PR simply adds a saslType option so you can set it to EXTERNAL if needed.

Copy link

@Half-Shot Half-Shot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just a question really

).toString('base64'));
break;
case 'EXTERNAL':
self._send('AUTHENTICATE', '+');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be clear, this is just the client saying that it doesn't need to provide a set of authentication credentials because the cert provided does that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep that should be it. the rfc says The mechanism is capable of transferring an authorization identity string. If empty, the client is requesting to act as the identity the server has associated with the client's credentials.

I implemented this looking at how weechat and other clients do it.

@Half-Shot Half-Shot merged commit 2b2a18f into matrix-org:master Aug 10, 2020
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

Successfully merging this pull request may close these issues.

2 participants