mosquitto icon indicating copy to clipboard operation
mosquitto copied to clipboard

Support delayed auth with extended authorization

Open nickajacks1 opened this issue 3 months ago • 1 comments

Support MOSQ_ERR_AUTH_DELAYED for extended auth. Added mosquitto_complete_extended_auth, which optionally sends auth data. Sadly, there's a bit of code duplication between this and handle__auth. I wasn't sure if it was worth splitting out into a shared segment of code or not. Added two client states, mosq_cs_delayed_ext_auth and mosq_cs_delayed_ext_reauth. This seemed to be cleaner than trying to use existing client states. Updated the delayed_auth plugin example to support extended auth.

I commandeered contexts_by_id_delayed_auth a bit. My understanding is that previously, that table was disjoint with contexts_by_id, but that won't work well for reauthentication. Since the same hash handle can't be used for more than one table, I added a new handle.

Maintainers, feel free to modify/discard any portion of this changeset as necessary.

  • [x] Have you signed the Eclipse Contributor Agreement, using the same email address as you used in your commits?
  • [x] Do each of your commits have a "Signed-off-by" line, with the correct email address? Use "git commit -s" to generate this line for you.
  • [x] If you are contributing a new feature, is your work based off the develop branch?
  • [x] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [x] Have you successfully run make test with your changes locally?

Fixes #3357

nickajacks1 avatar Oct 09 '25 00:10 nickajacks1

I will be available to resolve conflicts only after Nov 1 at the earliest

nickajacks1 avatar Oct 15 '25 15:10 nickajacks1