Getting Started – Security

Security is implemented to restrict modifying configuration parameters and limit real-time and historical data access.

The OAS Engine can have multiple security groups defined, each with a different level of access.

Each security group can have multiple users associated with it.

Users and Security Groups

Each user can only belong to one security group that is not the Default group.

In each OAS Engine there is a Default security group that is used to determine access level without a user specified.  If the feature is protected in the Default group then the security group defined to the User will be used to allow or deny access for the call made to the OAS Engine.

Security Flowchart

Following are the steps to setup security in the OAS platform.

Step 1 – Define Administrator User

An admin credential is created or reset using the AdminCreate utility located in the OAS Engine directory.

On Windows, the AdminCreate utility is automatically launched on the first attempt to login.
On Linux, an admin credential is created or reset using the AdminCreate utility found in the OAS installation directory.

To use the AdminCreate utility, execute the following:

chmod +x AdminCreate

./AdminCreate

You will then be prompted for the credential details.

NOTE: On Linux, if you used the installation script, it will create a user under which the OAS service will be running (default username of oasuser).
Running AdminCreate under the root user account will not update the security settings for the installed OASEngine. AdminCreate needs to be run while logged in as oasuser, and from within the installation path of that user.

After an admin credential has been created, select Log In from the menu and log in with the admin user you have just added.

OAS Log In

Log In

Step 2 – Set Default Security Access

Warning: Make certain to first add an Admin User in step 1 to all access and modification to the security configuration before disabling access and modification of Security in the Default Group.

The Default Security Group contains all of the security settings if a remote client application is not logged and is connected to the service.

Select Configure-Security.

Configure Security

Select the Default security group.

Select Default Security Group

All features of the Default security group are disabled by default.

Step 3 Create Additional Security Groups

Create security groups for customized access level to associate with a user or multiple users.

Change the Group Name property to the new desired security group name.

Group Name

Select Enable All Features to provide full access to all features or disable and set the desired access level for the security group under each of the tabs.

Click on the question mark next to the property to see a description of what the security property restricts.

Show Help Topic

Security Tabs

  • The Common properties are general features that are common to the entire OAS Service that can be restricted.
  • The Tags properties limit the creation, modification, removal, and browsing of tags.  Use Disable All Tags from Browsing to restrict which tags are available to users.
  • The Read Tags properties provide the feature to disable or enable real-time data access to Tags. You can either Disable All Tags From Reading and then Enable specific Tags, or leave all Tags for reading, but just Disable specific Tags.  The Read Tags properties affect real-time data access from HMI controls like OAS WPF HMI .NET, OAS WinForm HMI .NET and OAS Web HMI and also restrict real-time Trending and Data Logging on remote OAS Engines.
  • The Write Tags properties limit client applications from writing to Tags.
  • The Trends properties are for a few specific name retrieval functions for browsing trend tags and history fields.
  • The Trend RealTime properties help to limit access for real-time trending.
  • The Trend History properties allow restriction of history replay from clients.
  • The Data Log properties limit data logging configuration parameters from access and modification.
  • The Alarms properties limit obtaining the Alarm Group Names and adding alarms programmatically or editing alarm comments.
  • The Alarm Ack properties limit the ability to acknowledge alarms based on alarm priority and Alarm Groups.
  • The Alarm RealTime properties limit the ability to access the current alarms based on alarm priority and Alarm Groups.  This also restricts Alarm Logging and Alarm Notification of alarms on this OAS Engine on other remote OAS Engines.
  • The Alarm History properties limit the ability to access historical alarms from a database based on alarm priority and Alarm Groups.
  • The Alarm Log properties limit alarm logging configuration parameters from access and modification. To limit the actual alarms being logged use the Alarm RealTime properties.
  • The Alarm Notification properties limit alarm notification configuration parameters from access and modification.
  • The Dashboard properties determine what level of access is provided in the Web HMI Dashboard.
  • The Reports properties limit report configuration parameters from access and modification.
  • The Recipes properties limit the recipe configuration parameters from access and modification.
  • The Options properties limit the options configuration parameters from access and modification.
  • The Security properties limit the security configuration parameters from access and modification.

Select Add Group to add the new security group.

Add Group

Note: To define multiple security groups you can use CSV Export / Import.

CSV Import and Export

Step 4 Define Additional Users

Define Security Users with Configure-Users to assign a Security Group to each User. You cannot define the Default Security Group to a User.

Configure Users

Similar to Step 1 above with different user names, unique passwords, and the desired security group to use for each user.

Note: To define multiple users you can use CSV Export / Import.

CSV Import and Export

Step 5 Implement User Credentials in Client Applications

LogIn Method in .NET Applications

Each of the OAS .NET Assemblies have a LogIn method to call within your application to provide authentication to data in the OAS Engine.  If the Read Tags security feature is restricted and the LogIn is not specified the data quality on the client applications will be bad quality.  Other features may be restricted to acknowledge alarms or receive with the alarm control, view live or historical trend data, history, or access or set configuration properties in the OAS Engine.

Example use the OPCWPFDashboard assembly:

C#

OPCWPFDashboard.OPCWPFLogIn oasLogIn = new OPCWPFDashboard.OPCWPFLogIn();
oasLogIn.LogIn("UserName", "Password");
// Alternatively use the ShowUserLogIn method to prompt the user for a user name and password.
oasLogIn.ShowUserLogIn();

VB

Dim oasLogIn As New OPCWPFDashboard.OPCWPFLogIn
oasLogIn.LogIn("UserName", "Password")
' Alternatively use the ShowUserLogIn method to prompt the user for a user name and password.
oasLogIn.ShowUserLogIn()

Use the LogOff() method to clear the user credentials.

The above methods are applicable for the following assemblies and components.

  • OPCWPFDashboard.OPCWPFLogIn visualization in WPF .NET Framework applications.
  • OPCWPFDashboard.OPCWPFTrend for realtime and historical trending in WPF .NET Framework applications.  There is also a LogIn icon on the toolbar.
  • OPCWPFDashboard.OPCWPFAlarm for realtime and historical alarming in WPF .NET Framework applications.  There is also a LogIn icon on the toolbar.
  • OPCControls.OPCControlsLogin visualization in WinForm .NET Framework applications.
  • OPCTrendControl for realtime and historical trending in WinForm .NET Framework applications.  There is also a LogIn icon on the toolbar.
  • OPCAlarmControl for realtime and historical alarming in WinForm .NET Framework applications.  There is also a LogIn icon on the toolbar.
  • OPCSystems.OPCSystemsComponent for programmatic server configuration in .NET Framework applications.
  • OASConfig for programmatic server configuration in .NET Core, .NET 5, and .NET 6 applications.
  • OPCSystemsDataConnector.OPCSystemsDataLogin for programmatic data access in .NET Framework applications.
  • OASData for programmatic data access in .NET Core, .NET 5, and .NET 6 applications.
  • OPCTrendDataOnly for programmatic live and historical trend data in .NET Framework applications.
  • OASTrends for programmatic live and historical trend data in .NET Core, .NET 5, and .NET 6 applications.
  • OPCAlarmDataOnly for programmatic live and historical alarms in .NET Framework applications.
  • OASAlarms for programmatic live and historical alarms in .NET Core, .NET 5, and .NET 6 applications.

REST Authenticate

Use the Authenticate call with a user name and password of the OAS REST API to return a clientID and token from the OAS Engine.  the clientID and token are used in all subsequent calls to the OAS Engine.

Note: A blank user name and password cannot be used in the REST API for any of the configuration calls.

Web Authentication

Refer to Web UI Programming-Authentication Overview and Examples of how to return a token from the OAS Engine.

Remote Service Credentials

For all remote OAS Engines that will communicate to this OAS Engine go to Configure-Options-Remote Services for the remote nodes and set the Security User Name and Security Password.

Configure Options

Remote OAS Engine Security

These properties will allow the OAS Engine to run under this defined user account to give remote client access privileges for Read Tags for Calculations and Data Logging, and for Realtime Alarms for Alarm Logging and Alarm Notification. This is important if the remote OAS Engines have Security restrictions for these features.

OPCSystems.NET DA OPC Server Credentials

To set the user name and password credentials of the classic OPC DA OPC Server OPCSystems.NET edit the file DANSrv.exe.config at set the UserName and Password properties.

<add key="UserName" value=""/>
<add key="Password" value=""/>

OAS OPC UA Server Access

To provide authentication to remote OAS Engines of the OPC UA Server go to Configure-Options and set the OPC UA Security Access to either OASServiceUser or OPCClientUser.

Configure Options

You can view the OAS Security video to familiarize yourself with the following steps to setup security.

  • 00:00 – Introduction
  • 00:19 – What Security is implemented for?
  • 00:27 – Security Groups
  • 00:44 – Creating an Admin User
  • 01:18 – Security Configuration
  • 01:44 – Configuring the Default Security Group
  • 02:29 – Creating a New Security Group
  • 04:26 – Set Up Alarms
  • 05:13 – Dashboard Tab
  • 05:22 – Reports Tab
  • 05:29 – Recipes Tab
  • 05:34 – UDP Broadcast Tab
  • 05:39 – Live Data Cloud
  • 05:46 – Security Tab
  • 05:57 – Options Tab
  • 06:03 – New Security Group
  • 06:43 – Saving the Configuration File
  • 07:31 – Restrict Tag Access
  • 010:59 – Implementing Security in a Client Application
  • 011:57 – Logins Methods
  • 012:08 – Tag Access Demonstration
  • 013:18 – Login Method
  • 014:15 – Log Off Method
  • 014:28 – Logging into Rest API
  • 015:12 – Web Applications
  • 015:34 – Provide Security to a remote OAS Service
  • 016:05 – Pass Security to the OAS OPC Server
  • 016:25 – Copy the file out of the directory
  • 017:05 – OAS Excel Security Option
  • 017:23 – More Information

Overview – Security

Security is included for free with all of the product features of Open Automation Software. However, there are several security considerations you need to review to ensure your data is not improperly accessed or modified.


Hardware Security

At its most basic, hardware security means ensuring your server infrastructure cannot be physically accessed by unauthorized users, and has redundant power supplies for uninterrupted operation. This can be accomplished either on site or by utilizing 3rd party hosting facilities.


File System and OS Security

At the next level above hardware security are the servers’ file system and operating system.

  • Whether you are using Windows or Linux, be sure to only allow access to log in and configure the operating system with a valid account.
  • Never distribute the system administrator or root user account credentials to anyone who is not managing server installations or performing maintenance on the server.
  • Disable remote logins in your operating system by unauthorized administrators

OAS stores server configuration files in directories of your choosing. Be sure only OAS server administrators have access to these directories and files. You can locate where these files are stored in the OAS Configuration Application under Configure > Options and selecting Default Files.


Network Security

At the most basic transport level, be sure to only allow access to the OAS server ports from only authorized systems and users. This can be done using built-in operating system firewalls or external firewalls on your company network. The following are default ports used by OAS which can be changed in the OAS Configuration Application under Configure > Options, then select Networking:

  • 58724 : Legacy server administration and server-to-server WCF communications
  • 58725 : Web product and REST API communications
  • 58727 : Server administration and server-to-server TCP communications
  • 58728 : OAS OPC UA Server Port

For secure one-way communications between OAS servers, see our documentation on setting up a Unidirectional Network Gateway.

For secure Web and REST API communications, enable SSL within OAS and apply a certificate on the HTTP listener. Learn more here.

Securing communications drivers can be done using the specific settings of each, utilizing either secure credentials as well as 3rd party issued certificates, or both.


Vulnerability Protection

Open Automation Software incorporates several protection safeguards within the software routines and verification with Security Code Scan to analyze vulnerability patterns.

Secure Data Transport

  • All service to service and client to service communications from .NET assemblies use a custom packet encryption that is not publicly known to protect against threats exposed to open encryption libraries.
  • Packets are additionally compressed to a binary stream.

SAST – Static Application Security Testing

OAS utilizes Security Code Scan on all code used to create the OAS Engine and applications before deployment. Security Code Scan detects vulnerability patterns and has a comprehensive list of rules to follow when coding. This helps enforce good coding practice to protect against security risks.


Database Security

When logging OAS Tag data to an external database, it is recommended that you use a unique credential for each database and to not use the database administrator credential (e.g. ‘sa’ on MS SQL Server). In this way you can limit OAS Data Logging Groups from reading and writing to only the databases and tables required for your desired functionality.

See documentation on Data Logging Groups for more information.


Feature Security and Authorization

Every feature within OAS can be secured, even down to the individual Tags and Tag Groups. This is accomplished using the OAS Security Groups and Users features. In a production system, always create the groups, users, and access rules you require, then disable all features on the Default Security Group.

View the Getting Started section on Configure Security to follow simple steps.

Frequently Asked Questions – Recipe

MS Access Error microsoft.ace.oledb.12.0 provider is not registered
MS Access Class not Registered System Error

For Office 2010, the following update will correct this issue.

https://www.microsoft.com/en-us/download/details.aspx?id=39664

For Office 365 (please note, by default Office365 installs the 32-bit version regardless of your system), use:

https://www.microsoft.com/en-us/download/details.aspx?id=54920

If my Recipe is not working how can I find the solution?
Go to Configure-Options-System Logging. Enable the Recipe Transaction Log and the details of each recipe execution will be logged within the file.
How can I return aggregate results of the last 24 hours of a database table?
Set the field names to use your desired aggregate functionsExample: AVG(myField), MIN(myField), MAX(myField), and SUM(myField). In the Query String property enter the following: WHERE DateAndTime <= CURRENT_TIMESTAMP AND DateAndTime > DATEADD(hh,-24,CURRENT_TIMESTAMP)

Videos – Recipe

Recipe – Database Connector

Transfer data from SQL Server, Oracle, Access, MySQL, Azure SQL, PostgreSQL, Cassandra, MongoDB, MariaDB, and SQLite to Industry 4.0 data and IIoT application.

Recipe Setup

How to transfer data from a database to a PLC or OPC server.

Recipes Programmatic Interface

Use the OPC Systems component in your Visual Studio application to programmatically modify recipe groups. Refer to the FormConfigureRecipes Form in the WinForm Example Code example for an example and how to add and modify recipe groups.

Refer to the Programmatic Access Recipe Groups|topic=Programmatic Access Recipe Groups section in the Programmatic Interface – .NET Programmatic Configuration topic for all of the method syntax.

Recipes CSV Export and Import

All recipe groups can be exported to a CSV file by right clicking on the Local service and select Export CSV.

Note: You cannot have Excel open with the CSV file during the import as Excel will lock the file for exclusive use. First close the file in Excel, and then proceed with the import.

Save & Load Recipes

Save Recipes

If modifications are made to the current Recipes configuration for the Service, make sure to save the changes if you want the changes to be retentive when the Service restarts. Use Configure Options to specify the default Recipe configuration.

Load Recipes

Use this selection to load a previously stored Recipes configuration. Use Configure Options to set the default Recipes configuration to load when the Service first starts.

Recipe Database Properties

Recipe Database Configuration

Recipe Provider

Database provider to use:

  • SQLServerDesktop_MSDE: Use SQL Server 2014 Desktop or MSDE database engine.
  • SQLServer: Use SQL Server or SQL Server Express.
  • MSAccess: Use Microsoft Access Jet Database engine.
  • Oracle: Use Oracle engine. Does not automatically create database. You must create the database schema first to use this provider.
  • ODBC: Use ODBC data source. Does not automatically create database, table, or field names. You must create database, table, and all fields with the proper names and data types first to use this provider.

Recipe Server

The name of the Server to use when the Provider is set to SQL Server Desktop or SQL Server.

Recipe Set Server Name with Tag

When enabled the Server name can be dynamically set with a Tag Parameter value when the Provider (see above) is set to SQL Server Desktop or SQL Server.

Recipe Database

The name of the Database to connect to. When using Microsoft Access specify the full path of the database. Example: C:DatabaseName.mdb.

Recipe Set Database Name with Tag

When enabled the Database name can be dynamically set with a Tag Parameter value.

Recipe Table

The name of the database Table to read the data from.

Recipe Set Table Name with Tag

When enabled the Table name can be dynamically set with a Tag Parameter value.

Use WinNT Authentication

Use Windows Logon Security Authentication when the Provider (see above) is set to SQL Server Desktop or SQL Server.

Recipe User Name

User Name for database security.

Recipe Password

Password for database security.

Recipe Query String

This text is appended to end of the database query to retrieve the data.  It can also be dynamically be set from an OPC Systeme.NET Tag of a String data type. An example: WHERE [BATCH_NUMBER] = 5 ORDER BY [LOT_NUMBER].

Recipe Set Query String with Tag

When enabled the Query String parameter is automatically set from the defined Open Automation Software Tag. This allows dynamic assignment of the additional Query String to apply addition query and sorting arguments based on real-time data. Typically a Tag with a data type of String is used that has the data source defined as Calculation. This way real-time data automatically determines the additional Query String.

Recipe Tags Properties for Multiple Records

For Multiple Record type Recipes the target Tags and data values and defined in the database table of choice with unlimited number of records. The Table must contain two fields, one for the Tags and one for the values.

Multiple Records Properties

Tag Name Field

The field name that contains the Tags to write to when using a Multiple Record Recipe Type.

Value Field

The field name that contains the values to write to when using a Multiple Record Recipe Type.

Recipe Tags Properties for Single and Queued Records.

For Single Record and Queued Recipes the target Tags are associated with field names in the database. The values are simply contained in the first record returned from the table for the defined fields.

Recipe Single Field

Add Field

Add a data field and specify the Tag Parameter, field name, and field data type use the Add Button.

Recipe Value01

Delete Field

Delete field(s) by selecting the field(s) and select the Delete button or right click in the Field Name List and select Delete or Delete All.

Recipe Delete

Edit Field

Edit a data field to specify the field name and field data type. Use the Edit Field Button or right click in the Field Name List and select Edit.

Recipe Edit

Field CSV Import/Export

Right click in the Tags List to select CSV Export with one or more Tags in the list, or CSV Import to add/modify fields in the existing list.

Recipe CSV Import