Using the Configure Security Command
The Configure Security command creates Security users, adds users to groups, removes users from groups, and changes passwords at runtime. It works with the users, groups, and account policies in Workbench Security, so you can build a display for managing users without opening Workbench.
Configure Security is a global command. Besides a GraphWorX display, you can configure it wherever global commands are available, such as in commands on assets. The following procedure uses a button in a GraphWorX display.
The command shows nothing in runtime when it fails. To show the operator whether the command succeeded, see Creating a Display That Adds Security Users.
To add a Configure Security command to a button:
-
In GraphWorX, add a button to the desired display.
-
In its Dynamics panel, set the following:
-
In the Dynamic Behavior section, select Command, expand the drop-down list, scroll to the Global Commands section, and select Configure Security.
-
In CommandParameters, in Action, select what the command does:
-
CreateUser creates a Security user.
-
AddUser adds an existing user to a group.
-
RemoveUser removes a user from a group.
-
ChangePassword changes the password of a user.
-
-
In CommandParameters, enter the parameters for the action.
The command shows only the parameters that the selected action uses.
Parameter
Used by
Value
UserName
All actions
The name of the Security user.
Group
CreateUser, AddUser, RemoveUser
A group that exists in Workbench Security. Matching ignores case. For CreateUser, you can leave it blank to create the user in no group.
Policy
CreateUser
The account policy for the new user, by the name that appears under Security > Policies in Workbench. Matching ignores case. Leave it blank to give the user the default account policy. The command does not accept a name for the default account policy, including the name Default policy that Workbench shows.
CreateUser, ChangePassword
The password, as plain text or as a hash. For a hashed password, click
and select a data source for the hash.IsPasswordHash
CreateUser, ChangePassword
True when the password contains a hash. Set to False for entering the password as plain text.
Use a hashed password. Before the command runs, anyone who can read the tag or another location that contains a plain-text password can read the password.
-
-
For a hashed password in CreateUser and ChangePassword, add a Data Entry process point where the operator enters the password, and set the following in its Dynamics panel:
-
In DataSource, select the same data source as for the Password value in the command button's CommandParameters.
-
In the Dynamic Behavior section, set the following properties:
Property
Value
Password
True
PasswordHashing
Password-Based Key Derivation Function 2
For a complete example, see Creating a Display That Adds Security Users.
-
-
To verify the settings, switch to the runtime mode and click the button to run the command.
When the command fails, the Workbench Point Manager trace on the server logs the reason, such as a security policy that the server cannot find.