Configuring Web Services Security when Using the NI Web Server (Windows)

Parent Topic: Hosting Web Services

You can use HTTPS and privilege-based authorization to establish secure communication between Web clients and LabVIEW Web services.

Note  In this topic, you configure the security settings for the NI Web Server. If you use the Application Web Server to host Web services, refer to Configuring Web Services Security when Using the Application Web Server for detailed instructions.

Complete the following procedures to establish the different methods of Web services security:

Enabling HTTPS on the NI Web Server

You can enable Secure Sockets Layer (SSL) encryption on the NI Web Server for Web services. Use SSL encryption to create secure, encrypted connections when sending data between clients and the web server.

Complete the following steps to enable HTTPS connections:

  1. Launch NI Web Server Configuration using the following steps:
    1. In the Project Explorer window, select Tools»Options to display the Options dialog box.
    2. On the Web Server page, click Configure NI Web Server.
  2. On the HTTPS tab in NI Web Server Configuration, choose one of the HTTPS settings. Refer to Choosing an HTTPS Setting in the NI Web Server Manual for more information about each HTTPS setting.
  3. Follow the instructions to generate a self-signed certificate or to install a certificate from a certification authority.
  4. Configure the Server HTTPS port number.
  5. Click Apply and Restart. The NI Web Server uses HTTPS to communicate with clients after it restarts.
Note  LabVIEW automatically updates the HTTP Method URL according to the changes in the settings for HTTP connection and port of the NI Web Server.

Assigning User Roles and Privileges

You can define user roles and assign different privileges to each role so that you can control each client's access to each HTTP Method VI and NI Web Server applications.

Defining User Roles and Privileges for NI Web Server Application

Refer to Defining User Roles and Privileges in the NI Web Server Manual for information on defining user roles and assign privileges for NI Web Server applications in NI Web Server Configuration.

Assigning User Roles and Privileges to LabVIEW Web Services

Complete the following steps in LabVIEW to configure an HTTP Method VI to accept only requests from Web clients with valid privileges:

  1. Right-click the Web service project item in the project tree and select�Properties�to display the�Web Service Properties�dialog box.
  2. On the NI Web Server Privileges page, customize and enter a name for the new privilege under the Privilege column to create a privilege.
  3. Under the Role column, select a user role or enter a customized role that you create in NI Web Server Configuration to assign the privilege to the user role you specify. For example, you can assign writedata privilege to only admin user role.
  4. On the�HTTP Method VI Settings�page, select a VI from the�Web Service VI�table and click the�NI Web Server tab in Web Service VI Properties.
  5. Select a privilege from the Required Privilege pull-down menu.
  6. Click OK to apply the changes.

Accessing HTTP Method VIs with Privileges

A Web client must provide a valid username and password whenever the client submits an HTTP request for a VI protected by privileges. Refer to Choosing an Authentication Setting in the NI Web Server Manual and configure settings on the Authentication tab in NI Web Server Configuration to group users into different roles.