Hi,
Blazor, anvil alternative - C# instead of Python, just release Protected browser storage
Is there a way to achieve the same thing with Anvil at the moment?
Any hint is really appreciated.
Hi,
Blazor, anvil alternative - C# instead of Python, just release Protected browser storage
Is there a way to achieve the same thing with Anvil at the moment?
Any hint is really appreciated.
I don’t see much on the link about the protected browser storage. Do you have more details?
My understanding is that most modern browsers use a sandboxed environment for each tab. Chrome did this very early and Edge has picked it up (or really appropriated by using Chromium). This is baked into the browser and not the framework necessarily.
I’m not an expert though.
Thanks @robert, I updated the link, it was wrong.
When loading all data to the browser, the data is visible to users who can modify, copy it. Using service worker might have the same issue.
Protected browser storage might solve that
Ah very interesting. I’m not seeing how it is actually “protected” here. Perhaps what they mean is that they want to see if it has been tampered with.
You might be able to do this in Anvil by calculating a checksum in the client and comparing that to a checksum on the server-side. If they match, the data is good, otherwise, it has been changed. You could then re-use this data to prevent a longer server call for large data.
But I still wouldn’t use it as a trusted place to store data the client shouldn’t have in the first place, and it’s not clear that protected storage in Blazor does this either.
Thanks @robert, it seems that it is not really “protected”. The recommended way is to use AES 256-bit encryption. But you are right, client should not be trusted to store data even though it is encrypted.
It might be possible in the future not now.