-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
TLS with ASP.Net Core 2.1 #464
Comments
I do it as follows on ASP.NET Core 2.1 and it works. I can add this in formation to the wiki if @chkr1011 agrees.
Note that I use a pfx certificate. The way of loading/exporting the certificate showed in the examples never worked for me (and I have still to understand why). Also, |
This does not work for me, here is my Configure Services stuff.
|
Currently I'm able to achieve ws, wss, mqtt but not mqtts (using tcp) It feels like I'm missing an option to add tls to the tcp ? |
The call to |
unfortunately it is not working |
services.AddMqttTcpServerAdapter(); is the old api that works on .net sockets services.AddMqttConnectionHandler(); is the new api for AspnetCore.Connections.Abstractions but it doesnt support tls yet |
Your other option, dependent on how you are deploying, may be to terminate TLS with HAProxy or Nginx, then just have an unecrypted connection from there to the backend service be unencrypted. |
When will this be available? I need this as well. |
this depends on |
@JanEggers: Thank you for the information. Hopefully, NetCore 3.0 (Initial release) will be there in August or so... |
@JanEggers The issue from AspNetCore is fixed now. Just for information. |
@SeppPenner I will wait some more until 3.0 is released. and im not sure if we can update because 3.0 does not have .net framework support. |
@JanEggers Yeah, that's a good idea. |
Hi, Could you please help me with setting up MQTTNet server/broker with both TCP and WS. TLS is not required right now. I tried with both ASP.NET Core 20 and 2.1, but dud not succeed. |
Dear Sir, can you please share your code? |
@JanEggers What is needed here? I would like to fix this issue and #756 with one feature branch (Now that I have more time due to home office because of Corona :D). |
there is no official tls middleware yet so you could start with and create your own that is plugged in the pipeline. |
Well, I just need to start the server in the pipeline and allow to set options with the builder. Anything else? This shouldn't be so difficult, I would say. |
Turns out there a couple things that more complicated that might be expected:
|
I already expected that.
Ok, good to know. I will check and see what I can do here. |
this is blocked by davidfowl/BedrockFramework#52 and davidfowl/BedrockFramework#56 |
how's the progress |
@JanEggers @SeppPenner @chkr1011 |
I have no idea about the status... |
@behroozbc I actually did not look at the status of bedrock. @davidfowl maybe there will be some new bits to play with when .net 6 releases |
Closing this due to inactivity. If the issue is not solved or closing is a mistake please feel free to reopen it. |
hi @chkr1011, |
hi @JanEggers , Is new update about the status of this issue after .net 6 was released? |
Hey, there. |
@riccardogas it works just fine like before. but there is still no "optimized tls middleware for tcp connections" from the dotnet team. project bedrock seems to be stale |
@JanEggers So can we close this issue then or is there something to do? |
Please see samples Run_Server_With_Self_Signed_Certificate. "ASP.Net Core 2.1" is no longer supported. |
Would it be possible to extend the documentation for ASP.Net Core 2.1 on how to add an encrypted endpoint. I have tried the approaches in the document but does not seem to work with the ASP.Net Core approach.
How can I add an mqtts endpoint listening on 8883?
The text was updated successfully, but these errors were encountered: