Panagiotis Maroulas Posted January 15, 2021 Report Share Posted January 15, 2021 Hello, I would like to create an applications for students in a laboratory that will write data acquired from sensors directly to a MySQL server. I am using Data Link tool to create a data link to the database. I need to hide Server credentials from a user (such as a student) that will have access to code. Any suggestions ? thank you Quote Link to comment
kosist90 Posted January 18, 2021 Report Share Posted January 18, 2021 Better approach would be not to hide credentials from a user, but to create such user at MySQL server which will have limited rights. And then, even if user will know his credentials - then he can't make any harm to server due to limited access rights. Do you create connection via popup window of Data Link all the time when application is used? If so, then you don't have to - it is enough to create it once, and store to file. Will users have access to source code? If yes, then create VI which will connect to server, and have credentials stored inside. Then, the easiest way will be to password-protect such VI (but be aware that password-protected VIs could be easily opened anywayt), or could be built into PPL - so user can not access its block diagram. But PPLs have its own constraints. If users will use application as exe, then store connection string directly in the application - so users even will not know that there is used some Data Link for that. Quote Link to comment
Bryan Posted January 18, 2021 Report Share Posted January 18, 2021 (edited) You could also create your own VI that establishes a connection to the database where the credentials are stored as constants and remove the block diagram. To do this, you have to create a project, then source distribution with that VI (always included). Then, in the settings for that VI in the distribution, you select the option to remove the block diagram. This is currently the most secure method of hiding LabVIEW source that I'm aware of. The only problem is that if the credentials ever need to be changed, you have to change it in the source VI, re-build the source distribution and then send the new VI to your students. Edited January 18, 2021 by Bryan Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.