Answered Advice on automatic update method

theawesomerb

New member
Joined
Jun 8, 2020
Messages
1
Programming Experience
Beginner
Hello,

Well the question seems basic, I would like to integrate a "dynamic" content to my application, like a tab in my app that has some content (Images for example) which changes weekly without user intervention, I would like to know what is the most simple and effective way to do this.

I thought of a mechanism like this: 1- the administrator app sends the image and generates an xml file on a web server via ftp.
2-the client app checks the web server every week, opens the most recent xml file and downloads the content and displays it to the user.

it may be archaic, what do you think? is there simpler and more effective methods? if you have a project or a source code that would accelerate my process you would save me!
thank you in advance.
 
Yup. K.I.S.S. Keep It Simple Stupid. Good plan!

Having done this before, the only extra that thing you need is to beware of man-in-the-middle attacks. The way I cutdown on that attack surface was to use HTTPS or SFTP for downloads, and the important part: digitally sign the XML. The .NET Framework has built in classes and methods that simplify digitally signing XML. Inside the XML not only have the URLs of the new content, but the hashes of the content.

I know that most people nowadays would suggest JSON instead of XML, but I don't think there is a standard yet for digitally signed JSON. XML has an RFC.

Wish I could share code with you, but the code belongs to a former employer.
 
Skydiver, I would favor Json and you can use JWS for signing.

You can also sign using a x509 certificate, but be warned about these, as they can be terribly buggy and a real pain in the ass to work with.

My flavor here would be Json and JWS.
 
The RFC covering JSON Web Signatures:
 
Back
Top Bottom