LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI security login across applications

Hello,
 
We are developing several LabVIEW executables to run on a computer.  When a user logs into the NI security domain from within one of the executables we would like the user to be effectively logged in to all the executables on that computer.  NI security login changes do not, however, appear to transmit across executables.  Is it possible to acheive the effect of a single security login across multiple executables using NI security tools?  Presently, we are using the Application Method "NI Security.Login" to programmatically login.  We are using the Application Property "NISec.User" and Application Event: "NI Security User Change" to check for user changes.  This approach works in LabVIEW across multiple VIs but does not work across multiple executables.  Thanks in advance.
 
Version:  LV 8.2.1
 
Chris White
ThinkG Consulting LLC
0 Kudos
Message 1 of 5
(4,035 Views)
Hi Chris,
 
I don't have any experience of using the NI security login, but perhaps one suggestion would be to put the user information into a shared variable which could then be monitored actoss your multiple applications.
You may be able to set-up an event for this shared variable within each of the applications to alert you when the information changes.
 
Regards,
Andy
0 Kudos
Message 2 of 5
(4,016 Views)
Chris--

     I am going to assume that you are using an open automation reference and wiring that to the invoke node.  With nothing wired it should, by defualt, open a local reference to the executable in question.  On that open automation ref. vi there is an input to the port that the program is listening on.  If you set each VI to use a different port (done when you build the exe) then in the main login VI you could have a list of those ports and use a for loop to iterate through each and login to all of them that way.

      What Andy said is also a valid work around or different way to do this.  Unfortunately for security purposes there is not a way to login to all of the exe's at once directly.  With a little programming though you can make something that works like that though.

     Just let me know if you have any questions

Regards,

John H
Applications Engineer
National Instruments
0 Kudos
Message 3 of 5
(3,993 Views)

 

Thank you Andy and John for your helpful suggestions.  We have decided to go with a third approach that is inspired by both of your suggested approaches.  There will be a "top-level" executable, "Index.exe", that will be used for logging in and out and for launching the other executables.  Each of the other executables will use VI Server to monitor a hidden indicator on Index.exe to find out the currently logged in domain/user.  This approach does require a slow poll, however, there is an added advantage:  The executables can be programmed such that should the Index.exe close or be abruptly ended through the Windows Task Manager, the other executables will revert to (Nobody) being logged in.

Unfortunately, the suggested approach of using VI Server to programmatically log in to another application does not appear to work, at least not in LV 8.2.1 from LabVIEW to an executable.  We were able to access non-security application properties such as "App.Kind" and "App.Name" but the security properties and methods appear not to be accessible between applications.  Such attempts result in Error 1032, "VI Server access denied."

A suggested improvement to the NI security model would include a domain setting in the NI Domain Account Manager such that an NI domain login could have a computer-wide scope and not just an application-wide scope.  Such an improvement would facilitate the ability to develop modular applications that involve multiple executables interacting with one another and in a secure environment.

Thanks again for the help.

Chris White, ThinkG Consulting LLC

0 Kudos
Message 4 of 5
(3,977 Views)
Chris--

      I also just tried the vi server method and ran into the same issues that you did.  I really like the way that you are thinking about doing it.  Seems to be a pretty creative approach that should work great.

      I just wanted to reply and let you know that I will be passing along your suggestion to RnD.  We certainly value your feedback.  Each suggestion is carefully considered and may get implemented in a future version. If you'd like to submit that or any other ideas, on the "Contact NI" page there is place that you can submit feedback if you are interested. 

   Anyway, let us know if you have any questions or other good ideas.

Regards,

John H.
0 Kudos
Message 5 of 5
(3,955 Views)