feat: add encryption option for broadcasting - #13285
Conversation
|
There is a user confirmation, that this PR works: #8301 (comment) |
| default: // Required | ||
| result = shout_set_tls(m_pShout, SHOUT_TLS_AUTO_NO_PLAIN); | ||
| break; | ||
| } |
There was a problem hiding this comment.
We have these values:
#define SHOUT_TLS_DISABLED ( 0) /* Do not use TLS at all */
#define SHOUT_TLS_AUTO ( 1) /* Autodetect which TLS mode to use if any */
#define SHOUT_TLS_AUTO_NO_PLAIN ( 2) /* Like SHOUT_TLS_AUTO_NO_PLAIN but does not allow plain connections */
#define SHOUT_TLS_RFC2818 ( 11) /* Use TLS for transport layer like HTTPS [RFC2818] does. */
#define SHOUT_TLS_RFC2817 ( 12) /* Use TLS via HTTP Upgrade:-header [RFC2817]. */
Since SHOUT_TLS_AUTO seems to be broken, we should not offer it. How is the situation with the explicit mode selection, does it work? How does "Auto" work?
There was a problem hiding this comment.
Is it still broken? It seems to be working fine on 2.4.6.
Explicit mode works well as well, but it require the user to know which RFC/implementation the server is using (startTLS vs full TLS), which depends of how the broadcast server is configured. Reading #8301, I don't think we want the user to have to know/care about this level of details
During my test, I tried edge/ingress level TLS (RFC2818), and container level (RFC2817), explicit option worked well as long as you picked the right one. Auto was able to detect the right setup nicely.
There was a problem hiding this comment.
@daschuer Are you sure, that this is still broken in 2.4.6 ?
There was a problem hiding this comment.
I don't have tested this. We can merge this PR once we have version guards for 2.4.6.
I am really concerned for regressions form this PR so let's move forward with this safety net.
Once a version guard shout_version() is in place we can merge this.
There was a problem hiding this comment.
I am really concerned for regressions form this PR so let's move forward with this safety net.
There is no regression risk in this PR.
Before, TLS was explicitly disabled.
Now it can be explicitly enabled or disabled.
Only risk is for a user to experience regression when enabling TLS, but they have the option to get back to TLS being explicitly disabled.
Are you asking to force user with <2.4.6 to stay stuck with TLS disabled?
| #ifdef SHOUT_TLS | ||
| // Libshout defaults to SHOUT_TLS_AUTO if build with SHOUT_TLS | ||
| // Sometimes autodetection fails, resulting into no metadata send | ||
| // https://github.com/mixxxdj/mixxx/issues/9599 |
There was a problem hiding this comment.
We should keep the reference to the bug.
There was a problem hiding this comment.
This comment is now irrelevant since we've agreed not to use SHOUT_TLS_AUTO
| case EncryptionMode::Disabled: | ||
| m_encryptionMode = EncryptionMode::Disabled; | ||
| break; | ||
| default: |
There was a problem hiding this comment.
What is the migration path? I think we should keep "Disabled" after upgrade. We may consider to keep the "not set" state that we have the chance to ask the user in pop up box in a later PR (or in this if you like)
There was a problem hiding this comment.
I think that's a fair approach, not sure how to deal with the prompt tho. Do we want to consider adding a version attribute on the BroadcastProfile document root?
There was a problem hiding this comment.
I don't mind, my idea was to just check if this new option exists or not.
There was a problem hiding this comment.
Updated - the migration path will now default to disable, which is the current behaviour as we don't support TLS in 2.6
It sound like we should enable the code only for libshout-idjc 2.4.6 and above, right? |
|
Yes, I consider this PR depending on libshout-idjc 2.4.6, and on the TLS RFC being correctly detected on this version |
|
OK, so you need to check |
|
Did you consider to add the version check to make this mergeable dependently? |
|
Yes, and I consider this a dead end. |
|
I have not understand what you propose. Why not add the version guard and have this PR from our to do list. Main user with the latest libshout-idjc version can benefit from it. |
Please tell me how to do that on Ubuntu 24.04. |
|
With the version guard an Ubuntu 24.04 user can still build main. In short Ubuntu 25.04 LTS will be released and users will automatically benefit from this feature here. By the way, can you explain the issue you had:
Which version did you test? What was the faulty behaviour? |
|
It is probably this: |
This is exactly my point.
This was 18 months ago, but I believe this would have been 2.4.1. |
|
Ah ok. So we have a common agreement to get this one merged as soon as possible. If you add the version guard now, I consider this ready for merge. A final test is missing if cause. |
daschuer
left a comment
There was a problem hiding this comment.
Is there a reason to not add a version guard? I think this will remove the deadlock with this PR.
| default: // Required | ||
| result = shout_set_tls(m_pShout, SHOUT_TLS_AUTO_NO_PLAIN); | ||
| break; | ||
| } |
There was a problem hiding this comment.
I don't have tested this. We can merge this PR once we have version guards for 2.4.6.
I am really concerned for regressions form this PR so let's move forward with this safety net.
Once a version guard shout_version() is in place we can merge this.
| </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> | ||
| <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:10pt;"> </span></p> | ||
| <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Lucida Grande';"><br /></p></body></html></string> | ||
| </style></head><body style=" font-family:'Fira Sans Semi-Light'; font-size:10pt; font-weight:400; font-style:normal;"> |
There was a problem hiding this comment.
This seems to be an unrelated change.
Yes - as per our policy, we will drop support for Ubuntu 24.04 in less than two months, so this extra work, as well as extra branching risk which is expected to even be removed before the beta starts.
IMO, removing the deadlock with this solution, means keeping the deadlock in #4723 so this will leave a lot of user waiting for #8301 behind (many user will still be on 24.04 and won't migrate till summer Point Release or even more, some are still on 22.04 - e.g PopOS pre-cosmic). |
|
All this discussion is also extra work. Isn't it only a runtime call in addition to
Not TLS due to the version guard? With runtime version guard:
Without the version guard:
|
Agreed. The best would be to merge #4723 then this PR.
Since we refuse to update our already vendored deps, TLS won't be available. This also means we would need to keep the branch in place in our code.
Calling unencrypted traffic - including broadcaster credentials - a "reliable broadcasting" experience is quite controversial. I certainly do not register myself, and wouldn't want to broadcast with Mixxx.
With this guard, we give another reason not to update this version, which has been live for years and hasn't show any regression. Here is my proposal:
Happy to quickly get a post ready on Discourse (maybe we even have survey enabled?) to remove the deadlock. |
|
Ah got it. You think our vendored version has no TLS. This is not true. It has. That's why the compile time version guard is not sufficient. The compile time version guard only detects which headers have been used during compiling. This may not match the *.so the user has. That's why we need the runtime version guard as well, in any case, independent from the rest of the update strategy. |
It does, but it suffers from an issue that have lead us to disable it.
Appreciate I often get confused with our CMakeFile, but in this case, I believe it is clear that, in some case that we have decided due to two issues, we ship our vendored fork of the lib The whole reason I am pushing for vendoring 2.4.6 is that we can simplify that to:
This means that our theoretical 24.04 backport will be shipped with the vendor lib, but the 26.04 won't, tho will have the version constrain in the .deb manifest. |
|
I think your latest post is unrelated to the runtime version guard. Let me explain. We have here: This does check if the header used at compile time has SHOUT_TLS defined. Unfortunately this is not enough for a working encryption support, because we need in addition a certain version. Something similar to this pseudo code. This is my only demand here, because is behaves rock solid under all conditions with only a minimal change. |
|
Thanks, I understood what you ask and I know how to implement it. But this does not address my concern. Again. doing this means that this feature would result in a no-op, except for user building Mixxx themselve with libshout > 2.4.6. Let's please stop discussing about bringing any guards to this PR. |
|
Your concerns are a compete different topic. We need the guard in any case if we want to release before all < 2.4.6 have disappeared. This is because distros sometime rip of libraries in our lib folder. It is just a safety guard that died not hard IMHO her. The no opt behaviour is desired for libshout >= 2.4.6 If users are left behind or not is a business decision. We should be first technically correct here. |
This attempts to address #8301 and #8706
Couple of notes:
SHOUT_TLSseems hardcoded to1so I was tempted to remove the flag entirely