raisedragon / pircbotx

Automatically exported from code.google.com/p/pircbotx
0 stars 0 forks source link

Implement SASL authentication #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Option 1: Use patch provided by Jason in Issue #97
https://gist.github.com/4356024 

Option 2:
Use Java SASL libraries?
http://docs.oracle.com/javase/6/docs/technotes/guides/security/sasl/sasl-refguid
e.html

I'm not too familiar with SASL, so hopefully I could get a little bit of help 
with this one

Original issue reported on code.google.com by Lord.Qua...@gmail.com on 24 Dec 2012 at 5:38

GoogleCodeExporter commented 9 years ago
I actually wouldn't go with either, to begin with. We should actually support 
CAP as a priority, as that would reduce the amount of code needed for option 
#1. At the very least, always call CAP LS and CAP END, and call an onCap 
handler with the results of CAP LS (or don't call it at all if server doesn't 
support CAP) in the ListenerAdapter in between the two CAP calls.

Original comment by entityreborn on 24 Dec 2012 at 5:42

GoogleCodeExporter commented 9 years ago
Secondly, the IRC SASL requirements render option 2 to be over-engineered. You 
can see an example SASL sequence (And docs) here: 
https://github.com/atheme/charybdis/blob/master/doc/sasl.txt

Original comment by entityreborn on 24 Dec 2012 at 5:47

GoogleCodeExporter commented 9 years ago
I was using the working group's website:
http://ircv3.atheme.org/specification/capability-negotiation-3.1
http://ircv3.atheme.org/extensions/sasl-3.1

Since you know way more about this than I do, are you interested in working on 
this? Its going to take me much longer to figure out the mechanisms, the 
correct unit tests, and how the real world implements the standards

Original comment by Lord.Qua...@gmail.com on 24 Dec 2012 at 5:52

GoogleCodeExporter commented 9 years ago
Sure. Was planning on doing it anyway :P Should be able to get a patch in a few 
days.

Original comment by entityreborn on 24 Dec 2012 at 5:55

GoogleCodeExporter commented 9 years ago
Sorry for taking so long is getting this done. Christmas + New Years will do 
that to ya.

This patch will implement very basic CAP support. Basically this calls CAP LS 
(asking the server to list any capabilities it has) right before USER, and 
passes any resulting CAP events to any listeners. 

Implementation of applicable CAP functionality is an excercise for the reader. 
I'll attach an example using SASL as well, but it is specific to my bot's 
setup, and will require small modifications to make it compilable.

As always, basic tests are included and successfully complete.

Original comment by entityreborn on 2 Jan 2013 at 4:21

Attachments:

GoogleCodeExporter commented 9 years ago
Implemented in Revision e217161ffcc3 and Revision be8e7bef345f

Original comment by Lord.Qua...@gmail.com on 2 Jan 2013 at 9:12