Opened 11 years ago

Closed 11 years ago

#4067 enhancement closed fixed (fixed)

sasl anonymous support in twisted.words.protocol.jabber

Reported by: twonds Owned by:
Priority: normal Milestone:
Component: words Keywords:
Cc: ralphm Branch: branches/xmpp-sasl-anonymous-4067
branch-diff, diff-cov, branch-cov, buildbot
Author: twonds, ralphm

Description

There are other SASL authentication methods supported in t.w.p.jabber but not sasl anonymous.

There is a start of some code on github

http://github.com/twonds/twisted_helper/blob/master/anon.py

It needs to be moved into twisted and tests written etc.

I will try and upload the patches to this ticket.

Attachments (2)

anon.diff (3.1 KB) - added by twonds 11 years ago.
patch for anonymous sasl support and small test
anon1.diff (9.0 KB) - added by twonds 11 years ago.
fixes review comments

Download all attachments as: .zip

Change History (12)

comment:1 Changed 11 years ago by ralphm

Cc: ralphm added

For clarity, the implementation in anon.py looks more complicated than the actual changes to Words. I estimate no more than 20 lines of code. I talked to twonds and offered to review the code when there are tests.

Changed 11 years ago by twonds

Attachment: anon.diff added

patch for anonymous sasl support and small test

comment:2 Changed 11 years ago by twonds

Status: newassigned

comment:3 Changed 11 years ago by twonds

Keywords: review added
Owner: changed from twonds to ralphm
Status: assignednew

the patch is against trunk

comment:4 Changed 11 years ago by ralphm

Keywords: review removed
Owner: changed from ralphm to twonds

Thanks for this simple and straightforward patch.

  • SASLInitiatingInitializer.setMechanism currently has no tests. Your patch doesn't change that, and subsequently fails to show the mistakes in:
    raise sasl.SASLNoAccetableMechanisms()
    
    These are:
    • We are in the sasl module, so the prefix can be dropped.
    • The typo in the name of the exception class.

Could you include tests for this method, preferably for all possible paths, but at least the ones for the cases associated with the ANONYMOUS mechanism.

  • Docstrings in Twisted have the summary on a line of its own. Please adjust Anonymous for that (see Plain).
  • AnonymousTest does not have a docstring, please refer to the class the test is for, using the L{} epytext construct.

Changed 11 years ago by twonds

Attachment: anon1.diff added

fixes review comments

comment:5 Changed 11 years ago by twonds

Keywords: review added
Owner: changed from twonds to ralphm

comment:6 Changed 11 years ago by ralphm

Author: ralphm
Branch: branches/xmpp-sasl-anonymous-4067

(In [27388]) Branching to 'xmpp-sasl-anonymous-4067'

comment:7 Changed 11 years ago by ralphm

(In [27391]) Adjust copyright statement, and spacing, docs, tests to coding standard.

This also splits and simplifies the test for the unacceptable SASL mechanism cases.

Re #4067.

comment:8 Changed 11 years ago by ralphm

Author: ralphmtwonds, ralphm
Keywords: review removed
Status: newassigned

This looks great now. I cleaned up some stuff (see comment:7). Thanks.

I'm proceeding to merge this to trunk.

comment:9 Changed 11 years ago by ralphm

Resolution: fixed
Status: assignedclosed

(In [27392]) Add ANONYMOUS SASL support for XMPP clients.

Author: twonds. Reviewer: ralphm. Fixes #4067.

comment:10 Changed 10 years ago by <automation>

Owner: ralphm deleted
Note: See TracTickets for help on using tickets.