SignalR - Security - Encryption?

Anthony 1 Reputation point
2022-03-22T16:04:22.993+00:00

Hello there!
So currently I am working on a Blazor-Serverside-project. Since I needed to transfer sensitive data from the Server to the client and back, I asked myself how secure SignalR is handling such data. Turns out, not that well. Actually, I was able to read out the data directly in Chrome (Network tool) - so no encryption or something else.
Now I was wondering if there is a very simple trick to maybe enable such security features. Since Balzor does all the job around SignalR, I am a total noob in terms of SignalR.
Yes, I know there is something called SSL, but that is currently no option for me.
Does anyone have an Idea?
Thanks in advance!

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,530 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,561 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,460 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,860 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 64,566 Reputation points
    2022-03-22T16:18:03.38+00:00

    Your site needs to be SSL (https), for the Signal/r traffic to be encrypted.

    with SSL, the browser does the encryption/decryption, so the network tools see the unencrypted data.

    as always you should never send hidden html data to the client, if you do not want them to have access.

    note: you use SSL so network sniffers (public wifi, etc), can not intercept the client data. It does not protect your data from the client. your code must do that. if you pass PMI data (personal data) without SSL, you may be legally liable for a data breach from a sniffer.

    2 people found this answer helpful.

  2. Jose Zero 576 Reputation points
    2022-03-28T23:22:49.077+00:00

    Yes, I know there is something called SSL, but that is currently no option for me.

    Perhaps you don´t know or even search for, but since free LetsEncrypt certificate there is no need to buy a certificate, give a try docs

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.