Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make non-standard SCRAM SHA alogos as opt-in #22

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

rufferson
Copy link
Collaborator

It sits on big pile of other patches hence far in the queue. Unless prioritized to rebase.

Closes #15

rufferson and others added 30 commits March 15, 2021 21:56
 - Make auth_registry reusable by cleaning up the handler after
   successful authentication.
 - add _peeck_stanza_async call to wocky_xmpp_connection to be able
   to wait for certain stanza but do not consume it from the reader's
   queue.
 - add _resume_async call to wocky_connector which resets connector
   state, sets sm-resumption vector and launches connect_async
 - add _continue_async call to wocky_connector to be able to continue
   normal connection (bind/session) after sm-resume failure.
  The resumption is triggered by non-XMPP error (eg. IO) or XMPP EOS
  To resume it discards current connection, raises `sending` flag
  (to prevent write attempts) and calls wocky_connector_resume_async
  on currently stashed connector. When resume_async completes with
  WockyXmppConnection it clears the `sending` flag and calls receive_stanza
  which now supposed to read `<resumed/>` nonza, move unacked_queue to
  sending_queue and flush the sending_queue (and as a side effect resume
  reading operations). sending_queue flush in turn resumes writing
  operations.
  Should reconnection (not resumption) fail it clears `sending` flag
  which together with absence of connection will trigger reconnection
  attempt on next heartbeat.
  Should resumption fail (not-found) the porter then resets porter state
  (discards queues) and calls _continue_async which completes normal (new)
  connection vector.
  If connector appears unset in any of the resumption steps - the step is
  abandoned - giving upper level control back over the resumption.
  Add new signals for each state of resume vector: resuming, resumed,
  resume-done, resume-failed, reconnected; add new api call
  wocky_c2s_porter_resume. Signal `resuming` allows handler to prevent
  automatic resumption vector via connector by returning FALSE. This
  signal emits resume stanza to allow handler to start resume vector
  over wocky-connector. Once done - should call wocky_c2s_porter_resume
  to capture resumed nonza, resync and continue. If left to auto-resume
  the next checkpoint is resume-fail signal - a recoverable soft-fail
  where handler may stop auto-recovery by returning FALSE. Handler then
  need to call wocky_connector_reconnect and create a new session/porter
  and discard (free) existing. If left to auto-reconnect - the emission
  of the `reconnected` signal will carry the new connection SID, also
  change of the full-jid andconnection properties will be `notify::`ed.
 h is specified as 32bit unsigned integer while gsize is long thus
 might be 64bit. Also reset snt_count on resumption and add some
 debugging to track unacked queue.
 This is required to allow gabble-connection to replace connection=
 bound managers in existing connector if resume fails and we want to
 continue reusing the connector for future resumptions.
 * use portable integer format specifiers:
   - tests/wocky-sm-test.c
   - wocky/wocky-c2s-porter.c
   - wocky/wocky-sasl-scram.c
 * tests/wocky-test-sasl-auth-server.c:
   - avoid non init warning
   - add missing define statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider removing SCRAM-SHA-384,512
2 participants