DCOM Configuration Guide - OPCInt PDF
DCOM Configuration Guide - OPCInt PDF
Configuration Guide
OSIsoft, LLC
777 Davis St., Suite 250
San Leandro, CA 94577 USA
Tel: (01) 510-297-5800
Fax: (01) 510-357-8136
Web: http://www.osisoft.com
OSIsoft Australia Perth, Australia
OSIsoft Europe GmbH Frankfurt, Germany
OSIsoft Asia Pte Ltd. Singapore
OSIsoft Canada ULC Montreal & Calgary, Canada
OSIsoft, LLC Representative Office Shanghai, Peoples Republic of China
OSIsoft Japan KK Tokyo, Japan
OSIsoft Mexico S. De R.L. De C.V. Mexico City, Mexico
OSIsoft do Brasil Sistemas Ltda. Sao Paulo, Brazil
Table of Contents
Chapter 1.
Introduction ............................................................................................................ 1
Chapter 2.
Chapter 3.
Chapter 4.
Troubleshooting...................................................................................................13
Logging of DCOM Errors .......................................................................................13
Common DCOM Security Errors ...........................................................................14
DCOM Errors by Numeric Code ............................................................................16
iii
Chapter 1.
Introduction
This guide tells you how to configure Microsoft Distributed Component Object Model
(DCOM) settings for OSIsoft PI OPC products, with special consideration given to security.
Although you can use firewalls to help protect your OPC server, this guide does not cover
firewall strategies. Firewall configuration is complicated by the dynamic port allocation
behavior of DCOM and is beyond the scope of this document. When configuring DCOM for
non-OSIsoft OPC products, follow all recommendations and guidelines from your vendor.
PI OPC products include the following:
PI OPC DA Interface
PI OPC Client
Introduction
The exact settings required to configure DCOM for OPC depend on operating system,
domain or workgroup configuration, firewall configuration, network architecture, and your
preferred user-account structure. This guide provides recommendations for the most common
configurations.
Note: OSIsoft discourages the use of the Windows 2000 or Windows NT operating
systems in any OPC configuration. Microsoft has announced the end of support
for both Windows NT and 2000, as follows: Unsupported products or service
packs pose a significant risk to your computer's security. Therefore, Microsoft
advises customers to migrate to the latest supported service pack and/or product
prior to the end of support.
Chapter 2.
Prerequisites
To configure DCOM, you must log into the computer with an account that has local
administrator privileges. DCOM configuration depends on the deployment of the OPC server
and OPC client:
Same computer (recommended): Configure DCOM, though OPC client and server
programs running on the same computer do not use DCOM to communicate. Disable the
ability of users to configure DCOM.
Before configuring DCOM for your OPC server and client, verify computer connectivity and
create user accounts.
Note: In this guide, computers that run a PI OPC interface (DA, HDA, A&E) or a client
program that connects to a PI OPC DA/HDA server are referred to as OPC
clients. Computers that run a PI OPC DA/HDA server or third-party OPC servers
are referred to as OPC servers.
Verify Connectivity
If the OPC server and OPC client reside on different computers, check connectivity before
configuring your OPC server and OPC client computers for DCOM:
Verify that the server and client can connect to each other on the network and that port
135 is open (use telnet).
If port 135 is not open, check for issues related to a firewall or other network restrictions.
For more information, see the OSIsoft Knowledge Base topic titled Configuring ports
for DCOM for use with the OPC Interface. NAT and Firewall considerations.
If the OPC server and client run on the same computer, any account can be used,
including a local system account.
If the OPC server and client run on separate computers in the same Windows domain, use
domain accounts.
If the OPC server and client run on separate computers in different, untrusted Windows
domains (or are not members of a domain), you must create identical local accounts
(same user name and password) on both computers. These service accounts must have
password expiration disabled. This approach is not recommended, because it requires you
to maintain multiple identical local accounts.
A recommended approach is to create highly privileged OPC administrator accounts and less
privileged user accounts, as follows:
Note: If your OPC server vendor recommends or requires other permissions, be sure to
set them.
Network access: Right-click Sharing and security model for local access and
choose Classic local users authenticate as themselves (which is the same as
simple file sharing). Click OK.
System objects (Windows XP and Server 2003 only): Default owner for objects
created by members of the Administrators group . Right-click and select
Administrators group.
3. To restrict the source of the incoming TCP connections to the OPC client node
exclusively, click Add Program or Add Port and Change scope. Select the Custom list
option, enter the OPC client nodes IP address and click OK.
d. If the OPC user account is a local user account, click the COM Security tab, and add
the account to the appropriate access control lists (ACLs) as follows: Under Access
Permissions, add the user (and the OPC administrator) to both the Limits and
Defaults ACLs. Set Access Permissions for the default users and groups as follows:
Permissions
User
Setting
Access Type(s)
Limits
Everyone
Allow
ANONYMOUS LOGIN
Allow
Local Access
SELF
Allow
SYSTEM
Allow
Local Access
Default
4. Under Launch and Activation Permissions, add the user to both the Limits and Defaults
ACLs. Set the Launch and Activation Permissions for the default users and groups as
follows:
Permissions
User
Setting
Access Type(s)
Limits
Allow
Local Launch
Remote Launch
Local Activation
Remote Activation
Everyone
Allow
Allow
INTERACTIVE
Allow
SYSTEM
Allow
Default
Note: By default, the dcomcnfg program does not display an entry for PI OSI DA
Server or PI OSI HDA Server on the 64-bit version of Microsoft Windows 7 and
Microsoft Windows Server 2008 R2. To ensure these servers are listed, issue the
following command, which launches the 32-bit version of dcomcnfg:
MMC /32 %windir%\syswow64\comexp.msc
OPC administrators:
Authentication
Authentication confirms the identity of a user (as opposed to authorization, which controls
what the user is permitted to do). For authentication, the DCOM security model uses the
Microsoft Windows extensible security provider. For Microsoft Windows NT-based
operating systems operating in a workgroup, DCOM uses NTLMSSP (NT LAN Manager
Security Support Provider). When OPC nodes are members of a domain, Active Directory for
Windows Server 2003/2008 uses Kerberos authentication protocol as the security provider.
Never enable unauthenticated communication (authentication level set to None), which
permits any user in the network to connect to the OPC server node without any type of
authentication and auditing.
DCOM supports the following levels of authentication and privacy, listed from least to most
secure:
Authentication
Packet Integrity: (Recommended) Authenticates credentials and verifies that no data has
been modified in transit. Verify that this level of authentication does not affect the
performance of your scan classes.
Packet Privacy: Authenticates credentials and encrypts the packet, including the data
and the sender's identity and signature.
Authentication levels configured using the dcomcnfg program override the authentication
level set in the system-wide settings. For communication between OPC client and OPC
server, the effective authentication level is the highest minimum. For example, if the OPC
server is configured for Packet Integrity and the OPC client is set to None, then Packet
Integrity is applied.
2.
3.
Click the Log On tab and specify the user account in the This account section.
Impersonation
Impersonation is a mechanism that enables a DCOM server to access secured objects using
the credentials associated with the client rather than those of the server itself. Impersonation
is usually not supported by OPC servers except for those that support the OPC Security
specification. If your OPC server supports this specification, consult the vendor
documentation for the required impersonation settings for both the client and server
computers.
DCOM authorization is supported by the following levels of impersonation:
10
Anonymous: The server can impersonate the client, but the identity of the user
associated with the OPC client is hidden from the OPC server.
Identify: (Recommended) The OPC server can identify the user associated with the OPC
client, and can perform actions as that user.
Impersonate: The OPC server can perform actions as the user associated with the OPC
client, but is not allowed to access other computers as that user.
Delegate: The user that runs the OPC server can act as the user associated with the OPC
client, including access to other computers as that user.
Chapter 3.
Disable all unnecessary services, including OPCEnum, which is not required for normal
OPC interface operation.
If the OPC interface and server run on the same computer, disable DCOM and remote
registry access.
User accounts:
Define a low-privilege OPC users group and add only users who need OPC access
Define a high- privilege OPC administrators group limited to specific computers
Disable Guest access
Require robust passwords
Configure firewall to limit traffic to trusted computers and create a policy based on
this configuration
Protect the Windows registry (no administrative rights for regular users, disable
remote registry editing)
DCOM configuration:
Set the minimum authentication level to Packet integrity (verify that the overhead
incurred does not interfere with the performance of the interface)
Security:
Launch: OPC administrator account only if the OPC server runs as a Windows
service.
11
Chapter 4.
Troubleshooting
The following sections list and discuss logs useful for troubleshooting, common DCOM
security errors, and errors by numeric code and category.
Description
ActivationFailureLoggingLevel
CallFailureLoggingLevel
InvalidSecurityDescriptorLoggingLevel
You must restart OPC servers and client instances before these settings take effect. After you
enable logging, DCOM security errors appear in the Windows System event log.
13
Troubleshooting
You can find security audit logs in the Security log in the Windows Event Viewer.
14
Anonymous Logon
The following event shows a failure on a Windows XP SP2 computer when the user is not in
the computer-wide limit access control list. In this case, a logon failure causes the user to
appear as Anonymous logon.
Event Type:
Error
Event Source: DCOM
Event Category:None
Event ID:
10014
Date:
10/16/2012
Time:
3:48:09 PM
User:
NT AUTHORITY\ANONYMOUS LOGON
Computer:
OPCLAND
Description:
The computer wide limit settings do not grant Remote
Activation permission for COM Server applications to the user
NT AUTHORITY\ANONYMOUS LOGON SID (S-1-5-7). This security
permission can be modified using the Component Services
administrative tool.
Failed OPC Server Activation
This event shows a failure to activate the OPC server. The server name is not included in the
log but can be determined by searching the registry for the CLSID.
Event Type:
Error
Event Source: DCOM
Event Category:
None
Event ID:
10016
Date:
10/16/2012
Time:
4:05:13 PM
User:
NT AUTHORITY\ANONYMOUS LOGON
Computer:
OPCLAND
Description:
The application-specific permission settings do not grant
Remote Activation permission for the COM Server application
with CLSID
{13486D51-4821-11D2-A494-3CB306C10000}
to the user NT AUTHORITY\ANONYMOUS LOGON SID (S-1-5-7). This
security permission can be modified using the Component
Services administrative tool.
15
Troubleshooting
Description
0x80004002
0x8000401a
Some OPC servers do not accept connections from third-party OPC clients and return this
error if such clients attempt to use the server.
The account used to run the client is not authorized by the servers own security.
The default authentication level for the client computer is set to none, or simple file sharing
is enabled, which results in an anonymous logon.
The server process could not be started because the configured identity is
incorrect.
This connection error indicates a problem with the OPC server identity settings:
The account specified for the server identity does not exist.
The password for the account specified for the server identity is incorrect or expired.
The server has been configured with an identity of Interactive user, but no user is logged
on to the console of the server computer.
Check the identity specified in the DCOM configuration for the server. Verify that the account exists,
and verify the password. Use of interactive user as the server identity is discouraged because it
requires that a user be logged on to the computer before the client attempts connection.
0x80040111
0x80040112
0x80040154
16
0x80040202
The client Limits ACL does not allow a connection from the account used as the servers
identity.
The servers authentication level is set to NONE and the client computer Limits ACL does
not allow a connection from ANONYMOUS LOGON.
0x80070005
A firewall prevents the server from initiating a connection to the client computer.
A firewall between the server and client uses network address translation (NAT).
The DNS server for the network is returning an incorrect IP address for the client computer.
The account running the client does not have required permissions to activate or launch the
OPC server.
The client account does not have remote access permission in the system-wide Limits
access control list.
The account running the client cannot be authenticated by the server computer.
The default authentication levels for both server and client computer is set to NONE or
simple file sharing is enabled, which results in an anonymous logon.
To troubleshoot access denied errors on connection, you must determine if the account that is
being used for the connection is the one you intend, and that the account has the required
permissions. First, check the Windows security log on the server computer (security auditing must be
enabled). Logon failure audits indicate problems with the client account, due to either an unknown
user or bad password. If no logon failures are recorded, check success audits to identify logons from
the client computer and note the account. If the account is ANONYMOUS LOGON, the effective
authentication level might be NONE, or simple file sharing might be enabled on the server computer.
Next, check the Windows System log for DCOM errors. If the client account is not in the default of
server-specific DCOM ACLs, an error is logged.
Advise
The account used as the server identity does not have required permissions in the system
default DCOM ACL.
The account used as the server identity does not have remote access permission in the
system-wide Limits ACL.
The account used as the server identity cannot be authenticated by the server computer.
The default authentication levels for both server and client computer is set to NONE, or
simple file sharing is enabled, which results in an anonymous logon.
Troubleshooting advise access failures follows the same steps as those for connection failures,
except that you will be looking at the client computers logs and that there are no DCOM ACLs
specific to the client process, only the system default ACLs.
17
Troubleshooting
0x8007007e
0x800706ba
0x80080005
18
Summary of the issue, including any relevant log files during the time the issue occurred
The OSIsoft Virtual Campus (vCampus) website has subscription-based resources to help you
with the programming and integration of OSIsoft products.
19
21