Jump to content

Hide Server credentials

Recommended Posts


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

Link to comment

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.

Link to comment

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 by Bryan
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.