Add support for SASL v3.2

Review Request #3723 — Created Jan. 2, 2025 and submitted

Information

ibis/ibis
default

Reviewers

This just means that we try to re-authenticate when the sasl capability is
advertised via CAP NEW.

I also added some logic to ignore the wait counters outside of the initial capability negotiation.

Connected to a local ergo server with authentication turned on and made sure everything worked as expected.

I then disabled authentication and verified the CAP DEL message was received but we don't do anything with it.

I then re-enabled authentication and verfied we received CAP NEW and attempt SASL authentication again.

I also connected to the same server when authentication disabled and re-enabled it and verfied that we negotiated SASL properly.

Summary ID
Add support for SASL v3.2
This just means that we try to re-authenticate when the sasl capability is advertised via CAP NEW.
f863f7e94c8d8fe6b281df7a92116a1f16aa2aae
Description From Last Updated

I created IBIS-46 for an issue that looks like it's in this code but I didn't think it was at …

grimgrim

This is a bit troublesome, as if someone calls ibis_capabilities_add_wait before finished, the wait counter won't increment, but if they …

QuLogicQuLogic

s/This/this/

QuLogicQuLogic

Ditto.

QuLogicQuLogic

Should we break here, or should this be called multiple times in succession?

QuLogicQuLogic

This comment appears wrong now?

QuLogicQuLogic
grim
  1. 
      
  2. Show all issues

    I created IBIS-46 for an issue that looks like it's in this code but I didn't think it was at first.

  3. 
      
QuLogic
  1. 
      
  2. ibis/ibiscapabilities.c (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    This is a bit troublesome, as if someone calls ibis_capabilities_add_wait before finished, the wait counter won't increment, but if they then call ibis_capabilities_remove_wait after finish, it will be decremented. This means the wait counter will be one (or more!) lower than it should be.

    I have no idea when these are called and could make that happen, but there's currently nothing preventing that situation in here.

    1. This should be fixed via the new negotiating flag.

    2. I still don't understand how ibis_capabilities_add_wait can't be called while negotiating, since that's not public. Are waits only added after some other event?

    3. It shouldn't do anything when it's not negotiating as the wait is to keep the negotiation going and delay the sending of CAP END.

    4. Ah, I did not see the new documentation. So these functions should only be called before the done signal, and the done signal cannot happen until an equal number of add/remove have been called. OK, I don't see anything wrong with it now.

  3. ibis/ibiscapabilities.h (Diff revision 1)
     
     
    Show all issues

    s/This/this/

  4. ibis/ibiscapabilities.h (Diff revision 1)
     
     
    Show all issues

    Ditto.

  5. ibis/ibissasl.c (Diff revision 1)
     
     
    Show all issues

    Should we break here, or should this be called multiple times in succession?

  6. 
      
grim
grim
QuLogic
  1. 
      
  2. ibis/ibissasl.c (Diff revision 3)
     
     
     
     
    Show all issues

    This comment appears wrong now?

  3. 
      
grim
QuLogic
  1. Ship It!
  2. 
      
grim
Review request changed
Status:
Completed