Skip to content

Add support for SASL EXTERNAL - #352

Merged
SilverRainZ merged 2 commits into
SrainApp:masterfrom
progval:sasl-external
Mar 22, 2022
Merged

SilverRainZ merged 2 commits into
SrainApp:masterfrom
progval:sasl-external

Conversation

@progval

@progval progval commented Jan 22, 2022 •

Copy link
Copy Markdown
Member

Closes GH-246.

Tested on Ergo.Chat.

This might be a little confusing, as it requires a method configured in the user section of the config, and the certificate configured in the server section. (Though it works with only the latter on some servers, but this is called CertFP, not SASL EXTERNAL.)

I was not able to do otherwise without refactoring all the configuration handling.

Additionally, the reason for adding this new server->certificate field is that this is a TLS cert, not an ECDSA cert like the existing user->certificate field. (btw, ECDSA authentication is deprecated by IRCv3 (including the original author))

@ljrk0

ljrk0 commented Jan 24, 2022

Copy link
Copy Markdown

I can successfully login with this code, however the GUI "login method" dropdown doesn't seem to be updated yet. Also, I cannot join channels, but this may be due to the non-standard setup of the specific internal server.

@progval

progval commented Jan 24, 2022

Copy link
Copy Markdown
Member Author

however the GUI "login method" dropdown doesn't seem to be updated yet.

Indeed, I forgot. Done.

Also, I cannot join channels

Yeah, doesn't seem related

@ljrk0

ljrk0 commented Jan 24, 2022

Copy link
Copy Markdown

Great work, thanks for digging into this!

<widget name="login_password_entry"/>
<widget name="remember_login_password_check_button"/>
<widget name="login_cert_file_chooser_button"/>
<widget name="client_cert_file_chooser_button"/>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The client_cert name is coufusing, how about rename the login_cert to ecdsa_cert and this to another better name? such as sasl_external_cert?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I agree, but I wanted to keep the names here consistent with the name already in use in the config for ecdsa. Should I also change login.certificate to something like login.ecdsa_certificate?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, we can add a new confval like login.ecdsa_certificate, but keep it compatible with the old login.certificate confval.

Comment thread src/sirc/sirc.c
}
g_tls_connection_set_certificate(G_TLS_CONNECTION(tls_conn), cert);
LOG_FR("Using client TLS certificate");
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I thinks this is why we have to configure cert in server section? Keep status quo is fine. We can expose a SIRC_EVNET in future.

@SilverRainZ
SilverRainZ merged commit 59fe54a into SrainApp:master Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SASL External

3 participants