Opened 13 years ago

Closed 13 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: Ralph Meijer 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 13 years ago.
patch for anonymous sasl support and small test
anon1.diff (9.0 KB) - added by twonds 13 years ago.
fixes review comments

Download all attachments as: .zip

Change History (12)

comment:1 Changed 13 years ago by Ralph Meijer

Cc: Ralph Meijer 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 13 years ago by twonds

Attachment: anon.diff added

patch for anonymous sasl support and small test

comment:2 Changed 13 years ago by twonds

Status: newassigned

comment:3 Changed 13 years ago by twonds

Keywords: review added
Owner: changed from twonds to Ralph Meijer
Status: assignednew

the patch is against trunk

comment:4 Changed 13 years ago by Ralph Meijer

Keywords: review removed
Owner: changed from Ralph Meijer 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 13 years ago by twonds

Attachment: anon1.diff added

fixes review comments

comment:5 Changed 13 years ago by twonds

Keywords: review added
Owner: changed from twonds to Ralph Meijer

comment:6 Changed 13 years ago by Ralph Meijer

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

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

comment:7 Changed 13 years ago by Ralph Meijer

(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 13 years ago by Ralph Meijer

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 13 years ago by Ralph Meijer

Resolution: fixed
Status: assignedclosed

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

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

comment:10 Changed 11 years ago by <automation>

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