Skip to content

Conversation

@tmolitor-stud-tu
Copy link
Contributor

This is my proposed PR resulting from the discussions at standards@.

The rendered HTML.

@Flowdalic feel free to call me out on anything you don't like and I'll be happy to change it :)

@tmolitor-stud-tu tmolitor-stud-tu force-pushed the 0440-update-01 branch 3 times, most recently from 9d94061 to cbd560d Compare October 26, 2025 05:02
@tmolitor-stud-tu
Copy link
Contributor Author

I've cleaned it up a bit and removed unnecessary SCRAM references. The new rendered version:
xep-0440.html

@tmolitor-stud-tu tmolitor-stud-tu marked this pull request as draft October 26, 2025 05:05
@tmolitor-stud-tu tmolitor-stud-tu marked this pull request as ready for review October 26, 2025 05:05
@tmolitor-stud-tu tmolitor-stud-tu force-pushed the 0440-update-01 branch 2 times, most recently from 14fc837 to dd52abe Compare October 28, 2025 10:31
@tmolitor-stud-tu
Copy link
Contributor Author

@Flowdalic Daniel commented, that "(or just randomly pick a channel-binding and hope for the best)" sounds weirdly untechnical, so I force pushed a small change here.

Copy link
Contributor

@Flowdalic Flowdalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But please use "SASL mechanisms with channel-binding support" instead of "*-PLUS".

I would have also welcomed not mixing trivial fixes within the same commit as the big rewording change. And some rationale for the rewording in the commit message.

Besides that, please feel free to add yourself as author of the document, if you want to.

xep-0440.xml Outdated
Clients SHOULD implement tls-server-end-point and use it if no other
(stronger) channel-binding method is supported by both sides.</li>
<li>If the client doesn't support channel-binding, it MUST send "n" in the GSS-header (see &rfc5802;).</li>
<li>If the client supports channel-binding, but the server announced neither '*-PLUS' nor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implies that only SASL mechanisms ending with -PLUS support channel-binding. This may be true now, but may not hold in the future.

Suggested change
<li>If the client supports channel-binding, but the server announced neither '*-PLUS' nor
<li>If the client supports channel-binding, but the server announced no SASL mechanisms supporting channel binding nor

xep-0440.xml Outdated
<li>If the client supports channel-binding, but the server announced neither '*-PLUS' nor
channel-binding types (via this specification), it MUST send "y" in accordance to &rfc5802;.</li>
<li>If the client is using SASL2 (&xep0388;) to authenticate and received announcements
for '*-PLUS' from the server, but no channel-binding types, it MUST abort the authentication
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dito

xep-0440.xml Outdated
This condition is undefined with SASL1 (&rfc6120;), but the client MAY also abort authentication
in this case (or just randomly pick a channel-binding and hope for the best).</li>
<li>If the client is using SASL2 to authenticate and it receives channel-binding announcements,
from the server, but no '*-PLUS' methods are announced, it MUST abort authentication
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dito

xep-0440.xml Outdated
from the server, but no '*-PLUS' methods are announced, it MUST abort authentication
(this is an implementation error or ongoing MITM attack). It SHOULD do the same when using SASL1.</li>
<li>If the client is using either SASL1 or SASL2 to authenticate and receives announcements for
'*-PLUS' methods and channel-binding types, but none of these announced channel-binding types are
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dito

xep-0440.xml Outdated
in this case (or just randomly pick a channel-binding and hope for the best).</li>
<li>If the client is using SASL2 to authenticate and it receives channel-binding announcements,
from the server, but no '*-PLUS' methods are announced, it MUST abort authentication
(this is an implementation error or ongoing MITM attack). It SHOULD do the same when using SASL1.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(this is an implementation error or ongoing MITM attack). It SHOULD do the same when using SASL1.</li>
(this is an implementation error or ongoing MITM attack where SASL mechanisms are stripped). It SHOULD do the same when using SASL1.</li>

</ol>

<p>The RFC explains, that sending "y" when the server advertised channel-binding
support is to be used as a MITM-detection. An attacker stripping out all *-PLUS variants can be detected this way:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dito

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this talks exclusively about SCRAM, so *-PLUS is fine here.

<p>A client following the rules above and seeing a server-advertised list without
tls-sever-end-point, immediately knows, that some attacker tampered with the list of channel-binding types
and can abort the authentication. It never needs to send "n" even though it supports channel-binding and
can still safely send "y" if it doesn't see any '*-PLUS' variants and channel-bindings announced.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dito

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this talks exclusively about SCRAM, so *-PLUS is fine here.

@tmolitor-stud-tu
Copy link
Contributor Author

Good point regarding the -PLUS stuff!
Regarding the trivial fixes: I can split them into a separate commit, if you want met too. That's an easy fix :)

@Neustradamus
Copy link

@tmolitor-stud-tu: Thanks for your work on the XEP-0440.

But why have you removed the RFC 5056 part?

The "RFC 5056: On the Use of Channel Bindings to Secure Channel" is not obsolete:

cc: @nicowilliams (Nicolas Williams, author of RFC 5056, RFC 5801, RFC 5802, RFC 5929 and a lot others).

@Neustradamus
Copy link

Linked to:

@tmolitor-stud-tu
Copy link
Contributor Author

@Neustradamus Please don't spam and try to understand the file format before posting!

@Neustradamus
Copy link

To add clearer guidance on what to do as a client developer, this update adds a new Business Rules section referencing to the new XEP-0440 Business Rules.

As author, I obviously approve this, but it should only be merged after merging the XEP-0440 changes.

@tmolitor-stud-tu
Copy link
Contributor Author

Ah, upon revisiting the -PLUS stuff, I'm not sure anymore, if using "SASL mechanisms supporting channel-bindin" instead of *-PLIUS is a good fit, since the y and n things are only defined in the SCRAM RFC and other SASL methods might have some other mechanism to signal these conditions. Tying it to SCRAM makes sense imho, to not confuse implementors into trying to send y in places were it doesn't belong (some future PAKE mechanism for example) and instead of doing the right things.

We could add some pointer that the y and n are SCRAM specific into the paragraph above the list of rules, though. That paragraph already tries to make clear, that this is for SCRAM, but maybe we could make that even stronger/clearer.

@tmolitor-stud-tu
Copy link
Contributor Author

Okay, I removed the *-PLUS reference, and additionally amended the rules introduction paragraph regarding other SASL mechanisms supporting channel-binding.
I'll force push that to make that change available in github, but will do another force-push factoring out the trivial changes into their own commit shortly. :)

This update addresses a possible MITM attack vector by making the
tls-server-end-point channel-binding mandatory to implement. This
significantly raises the bar for such MITM attackers.

The new Business Rules section explains the details how to remedy the
attack vector, while the Security Considerations section gives a
detailed explanation for these rules.
This also adds a new SASL2 example alongside the SASL1 one.
@tmolitor-stud-tu
Copy link
Contributor Author

Okay, I've split also the commit now :)

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.

3 participants