Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define options to Web Socket Secure (TlsFeatureNotEnabled) #99

Open
fernandodelucca opened this issue Mar 13, 2025 · 2 comments
Open

Define options to Web Socket Secure (TlsFeatureNotEnabled) #99

fernandodelucca opened this issue Mar 13, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@fernandodelucca
Copy link

Cannot connect Z2M instance with Web Socket Secure:

2025-03-13T01:17:39.453Z INFO bifrost::backend::z2m > [z2m00] Connecting to wss://10.0.0.100/api?token=your-secret-token
2025-03-13T01:17:39.455Z ERROR bifrost::backend::z2m > [z2m00] Connect failed: Url(TlsFeatureNotEnabled)

@chrivers
Copy link
Owner

Welcome to Bifrost :)

Thank you for reporting this issue.

It's true, Bifrost currently does not support TLS for z2m websockets.

While it's possible to enable the "tls" feature for the websocket crate (and I'll probably do that in a future update), it's only part of the puzzle.

Since z2m certificates are (very commonly) self-signed, we'd also need a way for the user to specify the security criteria. For instance, if self-signed certificates are accepted, and if not, what certificates that are trusted.

Without certificate-based authentication of servers, there's not that much advantage to running TLS, from a security point of view.

I assume enabling the regular, non-TLS websocket is not an option for you?

@chrivers chrivers added the enhancement New feature or request label Mar 16, 2025
@fernandodelucca
Copy link
Author

Hello, my friend, and thank you for the response.

Right, my entire automation environment today uses valid certificates issued by a certification authority.

Even my local environment is fully resolved via FQDN (subdomain.domain.com), including mqtt, homeassistant, and z2m, without the need for a reverse proxy.

With valid certificates, in most cases, the certificate chain embedded in operating systems itself resolves the handshake.

Because of this, I find it a bit difficult to use without support for Web Socket Secure.

But I’ll keep following along and eagerly awaiting the improvement. ;)

Amazing work on this project. Congratulations!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants