02-23-2016 03:33 AM
Hi All,
I would like to create a signup / login managment using the DSC module OR other prfer soultion, It will be great if you can help me for following questions
1. For DSC I am not prfer to use Windows user account login, can we make it independent of windows user accounts ?
2. Which database to use ? (I plan to store Username, Password, Email Id and Security question)
3. How to Create/Read/Write above database programtically ?
4. As this database is on the disk, how to make it secure ?
Thank you for help.
References:
http://forums.ni.com/t5/LabVIEW/user-login-system/m-p/1585732/highlight/true#M579245
https://decibel.ni.com/content/docs/DOC-21163
02-23-2016 03:58 AM
Ok, so my understanding is that you can either:
1) Write your own login/authentication system in LabVIEW - you can do whatever you like with that and/or store the users table however you like. You can even get information like the currently logged in Windows User. The second link you posted I think does all of the authentication etc. in LabVIEW.
2) I think as part of the DSC module you get the 'Domain Account Manager' (look in Tools -> Security). This will allow you to create users, assign permissions etc. You can then 'Login', 'Change Password', 'Logout' from that menu. I believe you can also do it all programmatically using VI Server methods/property nodes. This way, the storing of credentials etc. is all done for you.
As for the database to use - it doesn't really matter - SQLite would be fine for a local lightweight user database. There's an SQLite toolkit on the Tools Network (VI Package Manager). You could even just use a text / binary file.
The key to making it secure is to use an appropriate salting/hashing algorithm so that you never store the plain-text password in the database. In short, you use a one-way encryption/hashing algorithm on the password and store that. Then when the user logs in, you perform the same algorithm and compare the encrypted passwords, rather than the plain-text ones. More sophisticated algorithms involve adding in a salt to add additional randomness to the hash. Google will give you lots of different methods / suggested encryption algorithms - there are some encryption/hashing algorithms that have been implemented in LabVIEW (e.g. SHA-1).