This guide walks you through configuring the Security module for user authentication, authorization, and access control. You'll create users, define permission groups, set security policies, and integrate with enterprise authentication systems.
Prerequisites:
Permission groups control what users can access in both Designer and Runtime.
Group | Designer Access | Runtime Access | Typical Use |
---|---|---|---|
Administrator | Full | Full | System management |
Engineering | Modules, no Security | Full | Solution development |
Supervisor | View only | Full operations | Shift supervisors |
Operator | None | Operations, no tools | Control room operators |
Guest | None | View only | Anonymous access |
Edit Permissions (Designer access):
Run Permissions (Runtime access):
Policies define password requirements and session behavior.
Identification (Password rules):
Setting | Default | Enhanced | Critical |
---|---|---|---|
Password Min Length | 0 | 8 | 12 |
Invalid Attempts | 0 | 5 | 3 |
Password History | 0 | 3 | 5 |
Max Password Age (hours) | 0 | 2160 (90 days) | 720 (30 days) |
E-Signature (Action confirmation):
Session (Auto-logoff):
For compliance, use these minimum settings:
Identification:
PasswordMinLength: 8
BlockOnInvalidAttempts: 5
PasswordHistory: 5
MaxPasswordAge: 2160 (90 days)
ESign:
Enabled: True
TimeoutMinutes: 10
Session:
AutoLogOff: Both
InactivityMinutes: 20
DurationHours: 12
User | Purpose | Action Required |
---|---|---|
Administrator | System management | Set password immediately |
Guest | Anonymous access | Configure permissions |
User | Generic login | Set password if using |
For multiple users, prepare CSV:
csv
Name,Permissions,Policy,ContactInfo
jsmith,Operator,Enhanced,"John Smith,jsmith@company.com"
mjones,Supervisor,Critical,"Mary Jones,mjones@company.com"
Import via Security → Users → Import
RuntimeUsers are created dynamically and stored in external databases.
In scripts, create users programmatically:
csharp
@Security.CreateUser(
"newuser",
"password123",
"Operator",
"Enhanced"
);
View active sessions and connections:
Entire Display:
Individual Elements:
Protect tag writes:
Control script execution:
csharp
if (@Client.UserName == "Administrator")
{
// Admin-only operations
}
Manual Login:
csharp
@Client.LogOn("username", "password");
Check Current User:
csharp
string user = @Client.UserName;
string group = @Client.CurrentUser.Permissions;
Logout:
csharp
@Client.LogOff(); // Returns to Guest
Monitor active sessions:
csharp
// Check session time
TimeSpan sessionTime = @Client.SessionTime;
// Force logout if needed
if (sessionTime.TotalHours > 8)
{
@Client.LogOff();
}
User Cannot Login
Permission Denied
Password Issues
Session Timeout
? Set Administrator password - Never leave default blank ? Use groups not individuals - Easier management ? Regular password changes - Enforce via policies ? Audit user accounts - Remove inactive users ? Test permissions - Verify access levels ? Document security model - Maintain access matrix ? Use external auth - Leverage enterprise systems
Track security events:
csharp
// Log security events to audit trail
@Alarm.AuditTrail.AddCustomMessage(
"User Login: " + @Client.UserName
);
// Monitor failed attempts
if (@Client.LoginAttempts > 3)
{
@Alarm.AuditTrail.AddCustomMessage(
"Multiple failed login attempts"
);
}