Add: Prompt for secure connection choice#6409
Add: Prompt for secure connection choice#6409vadi2 merged 20 commits intoMudlet:developmentfrom mpconley:mssp_ssl
Conversation
Improve: StickMUD default listing to secure port
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
|
Cool idea! Thanks for implementing it @mpconley 🎉 🔒 🎉 I would also be curious if you or the Mudlet developers have thought about adding RFC 2941 support for using
I don't know how tightly specified MSSP is but I'd love to see Mudlet also respect a This would introduce the complication of having to decide what to do if a server's MTTS info contains both keys. It seems reasonable to prefer the TLS key in that case. WDYT? |
Source: https://en.wikipedia.org/wiki/Transport_Layer_Security Better rename SSL to TLS. |
I've thought about this problem, did not know there was a spec already for it. Would be very happy to see this supported in Mudlet.
Agreed!
Also agreed. |
I will add a |
If you'd consider implementing it in your MUD and LDMud 2.4.5 code, I may be able to do the Mudlet side of the equation. I could do the MUD side too (and perhaps will!) but you've got the mad skills and it will take me longer :)
Were you thinking a |
👍 - I'll take a look at doing that. I think Gnomi contributed the hard parts but hasn't wired them up in the 2.4.5 example game.
@mpconley I was thinking that in the Mud Server Status Protocol I'd like to support sending |
OK, cool. The latest build here supports |
|
Test cases passed on: |
|
I don't have MSSP setup on |
|
Worked for me! Nice login controls once you get inside the game to lock people down to the TLS port, @cpu ! |
|
Great stuff. Just highlighting that #6409 (comment) has up to date links with dev builds that you can unzip and run. |
|
🤦♂️ That option in the preferences should be a Also please call the widget in the form/dialogue something beginning with Also also, can you check that if you are multi-playing (have another profile already open, can be to a different MUD) that the |
|
I put my IP address and unencrypted port into a new profile, connected. It brings up the question. I click Yes. It reconnects, brings up the profile preferences window, "The host name did not match any of the valid hosts for this certificate", which is completely appropriate, as my certificate is issued for the domain name and not IP address. On the preferences window there are options to "Accept self-signed certificates", "Accept expired certificates", "Accept all certificate errors". Nothing sounds like accept this specific certificate (which is outside the scope of this PR, but perhaps something to consider later). 172.105.4.154 7680 for StickMUD does the same thing. MSSP does usually have "HOSTNAME". Perhaps offer to change both the port and also the hostname if it does not match the stored hostname, with an updated message that mentions this. Then I tried 192.99.10.40 3000 for Cheeseworld, clicked yes, and it went straight into it. At first I figured maybe their certificate is configured different than me and StickMUD and includes the IP and I should be doing the same on mine? I look in the connection tab and it says issued to coremud.org. I look in Chrome and https://coremud.org uses a certificate that says Certificate Subject Alternative Name has coremud.org, cheeseworld.wtf, and core.evilmog.io. I guess because the reverse lookup of the 192.99.10.40 returns coremud.org, that's what made it working match? Mudlet connected with Anyway, after I have connected to Cheeseworld with the secure port and saved my profile and then closed and reopened client, that profile comes up saying 192.99.10.40 3022 with secure checked, with the connect button disabled and a warning saying SSL connections require URL. So they'd benefit from utilizing HOSTNAME even though their switching over worked initially. |
|
You needed the latest |
@demonnic could you take another look now? This is now a QCheckBox. I had my reasons on Mac for doing what I did, but your comments provided insight that needed addressed for other platforms - so thank you! |
@SlySven this naming conflict is resolved. |
@SlySven QMessageBox is also used with downloading a map in Mudlet, and things keep happening in the background during that dialog being open, so that is evidence that the main event loop is not halted completely. I took the advice of the article you shared, which uses a QPointer and uses a |
demonnic
left a comment
There was a problem hiding this comment.
functions as it says it does, and now the option looks cleaner in the settings dialog for me. Thanks =)
Thank you @atari2600tim. This inspired some more changes. I limited this from prompting if there are any scenarios out there that could lead to confusion for non-technical users. For now, this will filter out prompting profiles that are using an IP address as their host name. Also, decided not to prompt if a HOSTNAME is define by MSSP, but that does not match the host name in Mudlet. That could be an indicator that a game has not updated their MSSP information over time and provides the slightest reason not to prompt. |
|
Handled known comments to date and no more changes planned from my side. |
vadi2
left a comment
There was a problem hiding this comment.
Fantastic stuff and works great!
|
Try out "Issued to" is probably enough for a geeky type to figure out what's going on, someone who is setting up their own game or something I mean. |
Cool. Tested and I did not see anything I did not expect there. |
|
LGTM, thanks! |
…6606) #### Brief overview of PR changes/additions Do not build `promptTlsConnectionAvailable` in ctelnet if `QT_NO_SSL` is set. #### Motivation for adding to Mudlet Tried to build using Qt built without SSL support and noticed the changes from #6409 do not check if `QT_NO_SSL` is defined. #### Other info (issues closed, discussion etc)
Brief overview of PR additions
To encourage enhanced data transfer protection and privacy, respond to detection of the
TLS(orSSLlegacy) key of MSSP (Mud Server Status Protocol) and prompt a user not on a TLS connection with a choice to reconnect with the advertised TLS port from MSSP.If the user selects
Yes, automatically update the port with theTLSvalue gathered from MSSP, check-mark theSecurecheckbox on the connection dialog, then reconnect. If the user selectsNo, automatically update a profile preference so they are not asked again for the current profile, then reconnect. This preference may be controlled on the Settings->Connection menu. This preference is enabled by default.TLSkey values of-1or0are indicators the game does not offer a TLS port.TLS(or legacySSL) key/value pair does not exist, nothing happens.Motivation for adding to Mudlet
Data protection and privacy.
Other info (issues closed, discussion etc)
Closes Issue #5075 Make use of MSSP's secure connection flag
Release Notes
To encourage enhanced data transfer protection and privacy, users will be prompted for a choice to switch to an encrypted port when this is advertised by their game via the Mud Server Status Protocol (MSSP).
TLSkey of MSSP among game runners will be needed.Wiki Updated
How to Test
stickmud.comport:7680with theSecurecheckbox unchecked. If you use the default game button in Mudlet, be sure to make the appropriate updates specified previously.Yes, then verify you receive the secure connection confirmations.7670and theSecurecheckbox is checked. There should be no prompt and you will continue to the logon screen of StickMUD.7680and uncheck theSecurecheckbox, then connect to StickMUD.No, then connect to StickMUD without receiving the secure connection confirmations.Allow secure connection reminderis unchecked.Allow secure connection reminderand hit theSavebutton.7680, then connect to StickMUD.Design Decisions
Although it would be preferred to not reconnect when the user selects
No, the buffer would not continue writing without hitting the return key afterward. Since this scenario only happens once per profile, the approach to reconnect was selected.This PR could be followed up with an enhancement to test the TLS port before activating this scenario, but the control offered by the profile preference should offer a good work-around to solve any outlier edge cases and that may never be needed.
Miscellaneous
At the time of submitting this PR, there was an issue with timestamps appearing upon the second profile load which is reported in Issue #6408.