Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Configuring Web Services Security (Real-Time, Windows)

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Parent Topic: Hosting and Monitoring Published Web Services

You can use Secure Sockets Layer (SSL) encryption, user and group permissions, and API keys to establish secure communication between Web clients and LabVIEW Web services.

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

Note Note  
  • Access NI Web-based Configuration & Monitoring and click Help on the Security Configuration page for information about establishing additional methods of Web services security.
  • For more information about concepts in this topic, refer to the Web services introduction and tutorial. LabVIEW Web services are available only in the LabVIEW Full Development System and the LabVIEW Professional Development System.

Assigning Permissions to Web Service Files

You can require a specific permission for the following types of files:

  • HTTP method VIs—Set permissions that apply to individual VIs.
  • Public static files—Set permissions that apply to all public static files in the Web service.

Complete the following steps to configure a Web service to accept only HTTP requests from Web clients with valid permissions:

  1. Right-click the Web service project item in the project tree and select Properties to display the Web Service Properties dialog box.
  2. Browse to the page that applies to the type of file you want to configure:
    • For HTTP method VIs, browse to the HTTP Method VI Settings page, select a VI from the Web Service VI table, and click the Security tab in the Web Service VI Properties.
    • For public static files, browse to the Service Settings page and the Static Documents section.
  3. In the Required permissions table, add the name of a permission you previously created in the Security Configuration page of NI Web-based Configuration & Monitoring.

Accessing Web Service Files with Permissions

A Web client must provide a valid username and password whenever the client submits an HTTP request for a file protected by permissions. The username and password must correspond to a user in the NI Web-based Configuration & Monitoring utility that has been granted the same permission added for the HTTP method VI or public static file.

Use the OpenHandle VI to provide a username and password for HTTP requests made by a Web client built in LabVIEW.

Related Information

NI Web-based Configuration & Monitoring


Configuring API Key Security

You also can use API keys to restrict which clients can send HTTP requests to HTTP method VIs. An API key is a string of seemingly random characters that consists of two parts, an access ID and a secret ID. The access ID works similarly to a username, and the secret ID works similarly to a password intended only for authorized clients.

You can configure a single API key that applies to all Web services running on any web server, including the Application Web Server, web servers for embedded applications, and the Web service debugging server. You first must configure an access ID and secret ID for the Web Server to generate API keys. Then you must enable API key security for each URL mapping that you want to protect.

Configuring API Key Security on the Web Server

To establish an access ID and secret ID on the Application Web Server, launch the NI Web-based Configuration & Monitoring utility and navigate to the Web Server Configuration page. Use the Web Services API Key tab to generate, apply, and reset API keys.

Securing URL Mappings with API Key Security

Complete the following steps to enable API key security for an HTTP method VI in a Web service:

  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 HTTP Method VI Settings page, select a VI from the Web Service VI table.
  3. Place a checkmark in the Require API key checkbox.

Accessing URL Mappings with API Key Security

When you establish an API key and enable that API key for an HTTP method VI, any HTTP request from a Web client that corresponds to the VI must contain the correct API key. You can use the SetAPIKey VI to configure a Web client built in LabVIEW to provide an API key when making HTTP requests.

Related Information

NI Web-based Configuration & Monitoring


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit