Opened 6 years ago

Last modified 6 years ago

#79 assigned enhancement

Server side client support

Reported by: ralphm Owned by: ralphm
Priority: normal Milestone:
Component: generic Keywords:
Cc:

Description

This should cover:

  • Accepting client connections (c2s).
  • SASL Authentication using Twisted Cred.
  • Resource binding.
  • A session manager for managing a domain with (extensible?) business logic for:
    • Users
    • Sessions
    • Roster and presence exchange/broadcast.
    • IQ / Message routing
  • Protocol support for rosters and stanza exchange.

Change History (2)

comment:1 in reply to: ↑ description Changed 6 years ago by ralphm

  • Status changed from new to assigned

I am implementing this in Mercurial patch queues.

Current status:

Replying to ralphm:

This should cover:

  • Accepting client connections (c2s).
  • SASL Authentication using Twisted Cred.
  • Resource binding.
  • A session manager for managing a domain with (extensible?) business logic for:
    • Users
    • Sessions

Mostly done.

  • Roster and presence exchange/broadcast.

Presence exchange is mostly done. Only static roster support for now. Roster pushes are not yet implemented and the subscription management presence stanza are passed through without affecting the roster.

  • IQ / Message routing
  • Protocol support for rosters and stanza exchange.

Done except for roster pushes.

The easiest way to test what's there:

hg qclone https://bitbucket.org/ralphm/wokkel-patches wokkel
cd wokkel
hg qselect c2s
hg qgoto c2s_example.patch
twistd -ny doc/examples/client_service.tac

This sets up an XMPP server that accept client connections on 127.0.0.1 port 5222 for users alice and bob with password secret where the domain part of their JID is the hostname of the machine the example is run on.

There is also client_service_anon.tac for SASL Anonymous authentication.

comment:2 Changed 6 years ago by ralphm

Something along the lines of the following would add (dialback) server-to-server support to the examples. You need to use an addressable domain instead of DOMAIN = socket.gethostname() and probably set up DNS records to have other servers connect:

# [..] contents of doc/example/client_service.tac [..]

from wokkel import server

S2S_PORT = 'tcp:5269'
SECRET = 'secret'

serverService = server.ServerService(router, domain=DOMAIN, secret=SECRET)
serverService.logTraffic = LOG_TRAFFIC

s2sFactory = server.XMPPS2SServerFactory(serverService)
s2sFactory.logTraffic = LOG_TRAFFIC
s2sService = strports.service(S2S_PORT, s2sFactory)
s2sService.setServiceParent(application)
Last edited 6 years ago by ralphm (previous) (diff)
Note: See TracTickets for help on using tickets.