Securely store credentials and secrets.
Reference → Modules → Security → UI → RuntimeUsers | Users | Permissions | Policies | Secrets | Monitor
Security Secrets (Reference): Securely store and manage sensitive credentials such as passwords, API keys, and connection strings without exposing plain-text values in your configuration.
Security Secrets provide:
Access at: Security → Secrets
Property | Description | Required | Access Control |
---|---|---|---|
Name | Unique identifier for the secret | Yes | All users |
SecretType | Type of credential (Password, APIKey, Token) | Yes | All users |
SecretValue | Encrypted credential value | Yes | Administrators only |
Description | Documentation of usage/purpose | No | All users |
Important: Only administrators can view or edit SecretValue. Standard users can reference secrets in configurations but cannot see the actual values.
Type | Use Case | Example |
---|---|---|
Password | Database connections, user authentication | SQL Server password |
APIKey | Web service authentication | REST API key |
Token | Bearer tokens, OAuth tokens | JWT token |
Certificate | SSL/TLS certificates | Client certificate |
ConnectionString | Full connection strings | MongoDB connection |
When configuring database connections:
Example:
Database: RuntimeUsers
Authentication: SQL Server Auth
Username: dbuser
Password: [Secret: DBRuntimePass]
For MQTT, OPC UA, and other protocols:
/secret-<SecretName>
Example:
MQTT Broker Authentication:
Username: mqttuser
Password: /secret-MQTTBrokerPass
Secrets can be referenced in scripts:
csharp
// Get secret value (requires admin permission)
string password = @Security.GetSecret("DBPassword");
// Use in connection string
string connStr = $"Server=localhost;User={user};Password={password}";
Name | SecretType | SecretValue | Description |
---|---|---|---|
DBProductionPass | Password | ******** | Production SQL Server |
MQTTBrokerKey | APIKey | ******** | MQTT cloud broker API |
OPCServerCert | Certificate | ******** | OPC UA client certificate |
AzureStorageKey | Token | ******** | Azure blob storage access |
RuntimeUsersDBPass
Password
[encrypted]
RuntimeUsers SQL authentication
[Secret: RuntimeUsersDBPass]
Action | Administrator | Engineer | Guest |
---|---|---|---|
Create Secret | Yes | Yes | Yes |
Edit SecretValue | Yes | No | No |
View SecretValue | No | No | No |
Reference in Config | Yes | Yes | Yes |
View Secret List | Yes | Yes | Yes |
Pattern | Example | Use For |
---|---|---|
DB<System>Pass | DBHistorianPass | Database passwords |
API<Service>Key | APIWeatherKey | API keys |
MQTT<Broker>Pass | MQTTAzurePass | MQTT credentials |
OPC<Server>Cert | OPCPlantCert | OPC certificates |
ProductionSQLPass
Secret1
DevDBPass
, ProdDBPass
When exporting solutions:
For containerized deployments:
FRAMEWORKX_SECRET_DBPassword=actualpassword
FRAMEWORKX_SECRET_MQTTKey=actualkey
Issue | Cause | Solution |
---|---|---|
"Secret not found" | Typo in reference | Check exact secret name |
"Access denied" | Insufficient permissions | Use administrator account |
Connection fails | Wrong secret value | Verify and re-enter value |
Secret list empty | Filter applied | Check module filter settings |
Test secret configuration:
Secret operations are logged: