5.2 UserManagementType

5.2.1 UserManagementType definition

The UserManagement Object defined in 5.3 is a UserManagementType which is formally defined in Table 21.

Table 21 – UserManagementType definition
Attribute Value
BrowseNameUserManagementType
IsAbstractFalse
References Node Class BrowseName DataType TypeDefinition Modelling Rule
Subtype of BaseObjectType defined in OPC 10000-5
HasPropertyVariableUsersUserManagementDataType[]PropertyTypeMandatory
HasPropertyVariablePasswordLengthRangePropertyTypeMandatory
HasPropertyVariablePasswordOptionsPasswordOptionsMaskPropertyTypeMandatory
HasPropertyVariablePasswordRestrictionsLocalizedTextPropertyTypeOptional
HasComponentMethodAddUserDefined in 5.2.5.Mandatory
HasComponentMethodModifyUserDefined in 5.2.6.Mandatory
HasComponentMethodRemoveUserDefined in 5.2.7.Mandatory
HasComponentMethodChangePasswordDefined in 5.2.8.Mandatory
Conformance Units
Security User Management Server

The Property Users and the Methods AddUser, ModifyUser and RemoveUser contain sensitive security related information and shall only be readable and callable by authorized administrators through an encrypted channel.

The the ChangePassword Method requires an encrypted channel and can be called by the Session user if the user token type for the Session is USERNAME.

The Users Property specifies the currently configured users and their settings as array of UserManagementDataType Structure defined in 5.2.4.

The Property PasswordLength defines the minimum and maximum length requirement for setting the password. A value of 0 for low indicates no limit for minimum and 0 for high indicates no limit for maximum password length. The Range DataType is defined in OPC 10000-8.

The Property PasswordOptions defines the password features and requirements for setting a password in a bit mask defined by the PasswordOptionsMask DataType. If the Server does not define any special requirements nor does not support enhanced features for the password management, all bits in the bit mask are set to false.

The Property PasswordRestrictions allows a Server to provide additional explanations about the rules applied to new passwords accepted by the Server.

5.2.2 PasswordOptionsMask

The DataType PasswordOptionsMask is formally defined in Table 22.

Table 22 – PasswordOptionsMask values
Value Bit No. Description
SupportInitialPasswordChange0Indicates if the server supports the feature to require a password change after the creation of the user.
SupportDisableUser1Indicates if the server supports to disable a user.
SupportDisableDeleteForUser2Indicates if the server supports the configuration NoDelete for a user.
SupportNoChangeForUser3Indicates if the server supports the configuration NoChangeByUser for a user.
SupportDescriptionForUser4Indicates if the server supports to management of a description for the user.
RequiresUpperCaseCharacters5Indicates if an upper case ASCII character is required in a password.
RequiresLowerCaseCharacters6Indicates if a lower case ASCII character is required in a password.
RequiresDigitCharacters7Indicates if a digit ASCII character is required in a password.
RequiresSpecialCharacters8Indicates if a special character is required in a password.

The PasswordOptionsMask representation in the AddressSpace is defined in Table 23.

Table 23 – PasswordOptionsMask definition
Attribute Value
BrowseNamePasswordOptionsMask
IsAbstractFalse
References Node Class BrowseName DataType TypeDefinition Others
Subtype of UInt32 defined in OPC 10000-5
HasPropertyVariableOptionSetValuesLocalizedText []PropertyType
Conformance Units
Security User Management Server

5.2.3 UserConfigurationMask

The DataType UserConfigurationMask is formally defined in Table 24.

Table 24 – UserConfigurationMask values
Value Bit No. Description
NoDelete0The user cannot be deleted.
Disabled1

The user is disabled.

For ActivateSession, a disabled user behaves like a user that does not exist.

NoChangeByUser2The user cannot change the password.
MustChangePassword3

The user must change the password to get the assigned roles.

The Method ChangePasssword is used to set a new password. The Method and the behaviour of ActivateSession are defined in 5.2.8.

The MustChangePassword bit set is invalid if the NoChangeByUser bit is set.

The UserConfigurationMask representation in the AddressSpace is defined in Table 25.

Table 25 – UserConfigurationMask definition
Attribute Value
BrowseNameUserConfigurationMask
IsAbstractFalse
References Node Class BrowseName DataType TypeDefinition Others
Subtype of UInt32 defined in OPC 10000-5
HasPropertyVariableOptionSetValuesLocalizedText []PropertyType
Conformance Units
Security User Management Server

5.2.4 UserManagementDataType

This Structure DataType is used to provide the metadata for a field in a DataSet. The UserManagementDataType is formally defined in Table 26.

Table 26 – UserManagementDataType structure
Name Type Description
UserManagementDataTypeStructure

userName

StringName of the user.

userConfiguration

UserConfigurationMaskThe configuration mask for the user.

description

StringA description for the user.

Its representation in the AddressSpace is defined in Table 27.

Table 27 – DataSetMetaDataType definition
Attributes Value
BrowseNameUserManagementDataType
IsAbstractFalse
Subtype of Structure defined in OPC 10000-5.
Conformance Units
Security User Management Server

5.2.5 AddUser Method

This Method is used to add a user to the user management of the Server.

The Client shall use an encrypted channel and shall provide user credentials with administrator rights like SecurityAdmin Role when invoking this Method on the Server.

Signature

	AddUser (
		[in]	String 			UserName,
	[in]	String 			Password,
	[in]	UserConfigurationMask	UserConfiguration,
	[in]	String 			Description
		);
	
Argument Description
UserNameThe name of the user to add.
PasswordThe password for the user.
UserConfigurationThe configuration mask for the user.
DescriptionA description for the user.

Method Result Codes

ResultCode Description
Bad_AlreadyExists The user does already exist.
Bad_OutOfRangeThe password is outside the valid range of accepted length and characters.
Bad_NotSupportedThe UserConfiguration has flags set that are not supported by the Server. See PasswordOptions for flags supported by the Server.
Bad_ConfigurationErrorThe UserConfiguration has invalid combinations of flags set.
Bad_UserAccessDeniedThe caller does not have the necessary Permissions.
Bad_SecurityModeInsufficientThe communication channel is not using encryption.
Bad_ResourceUnavailableThe Server does not have enough resources to add the user.

The AddUser Method representation in the AddressSpace is formally defined in Table 28.

Table 28 – AddUser Method AddressSpace definition
Attribute Value
BrowseNameAddUser
References Node Class BrowseName DataType TypeDefinition Other
0:HasPropertyVariable0:InputArguments0:Argument[] 0:PropertyTypeM
ConformanceUnits
Security User Management Server

5.2.6 ModifyUser Method

This Method is used to modify a user in the user management of the Server.

If the UserConfiguration bit Disabled is changed to TRUE, all Sessions and Subscriptions associated with the disabled user shall be closed by the Server. If the user of the Session used to call the Method is to be disabled, the Method shall fail with Bad_InvalidSelfReference.

The Client shall use an encrypted channel and shall provide user credentials with administrator rights like SecurityAdmin Role when invoking this Method on the Server.

Signature

	ModifyUser (
		[in]	String 			UserName,
	[in]	Boolean 			ModifyPassword,
	[in]	String 			Password,
	[in]	Boolean 			ModifyUserConfiguration,
	[in]	UserConfigurationMask	UserConfiguration,
	[in]	Boolean 			ModifyDescription,
	[in]	String 			Description
		);
	
Argument Description
UserNameThe name of the user to modify.
ModifyPasswordFlag indicating if the password should be changed.
PasswordThe password for the user. The password is set to a null or empty string if ModifyPassword is false. The argument is ignored if ModifyPassword is false.
ModifyUserConfigurationFlag indicating if the user configuration should be changed.
UserConfigurationThe configuration mask for the user. The argument is ignored if ModifyUserConfiguration is false.
ModifyDescriptionFlag indicating if the user description should be changed.
DescriptionA description for the user. The argument is ignored if ModifyDescription is false.

Method Result Codes

ResultCode Description
Bad_NotFoundThe user was not found in the user management.
Bad_OutOfRangeThe password is outside the valid range of accepted length and characters.
Bad_NotSupportedThe UserConfiguration has flags set that are not supported by the Server. See PasswordOptions for flags supported by the Server.
Bad_ConfigurationErrorThe UserConfiguration has invalid combinations of flags set.
Bad_UserAccessDeniedThe caller does not have the necessary Permissions.
Bad_SecurityModeInsufficientThe communication channel is not using encryption.
Bad_InvalidSelfReferenceThe user to be disabled is the user of the Session calling the Method.

The ModifyUser Method representation in the AddressSpace is formally defined in Table 29.

Table 29 – ModifyUser Method AddressSpace definition
Attribute Value
BrowseNameModifyUser
References Node Class BrowseName DataType TypeDefinition Other
0:HasPropertyVariable0:InputArguments0:Argument[] 0:PropertyTypeM
ConformanceUnits
Security User Management Server

5.2.7 RemoveUser Method

This Method is used to remove a user from the user management of the Server.

All Sessions and Subscriptions associated with the removed user shall be closed by the Server.

The Client shall use an encrypted channel and shall provide user credentials with administrator rights like SecurityAdmin Role when invoking this Method on the Server.

If the user of the Session used to call the Method is to be removed, the Method shall fail with Bad_InvalidSelfReference.

Signature

	RemoveUser (
		[in]	String 		UserName
		);
	
Argument Description
UserNameThe name of the user to remove.

Method Result Codes

ResultCode Description
Bad_NotFound The specified user does not exist.
Bad_UserAccessDeniedThe caller does not have the necessary Permissions.
Bad_NotSupportedThe user cannot be deleted due to NoDelete user configuration mask setting.
Bad_SecurityModeInsufficientThe communication channel is not using encryption.
Bad_InvalidSelfReferenceThe user to remove is the user of the Session calling the Method.

The RemoveUser Method representation in the AddressSpace is formally defined in Table 30.

Table 30 – RemoveUser Method AddressSpace definition
Attribute Value
BrowseNameRemoveUser
References Node Class BrowseName DataType TypeDefinition Other
0:HasPropertyVariable0:InputArguments0:Argument[] 0:PropertyTypeM
ConformanceUnits
Security User Management Server

5.2.8 ChangePassword Method

This Method is used to change the password of the user for the Session used to call the Method. The Method shall fail with Bad_InvalidState if the user token type for the Session is not USERNAME.

The bit MustChangePassword in the UserConfigurationMask defined in 5.2.3 indicates if the Server requires that the user changes the password.

If the user that is used to activate a Session is required to change the password, the Service ActivateSession shall return Good_PasswordChangeRequired and the activated Session shall have only the Role Anonymous. In this state, the Session shall be allowed to call ChangePassword for the user that activated the Session. After a successful call of ChangePassword, the Client is required to call ActivateSession with the user and the new password to apply the change and to get the Roles configured for the user. The successful change of the password sets the MustChangePassword for the user to FALSE.

Even if the Method is not browseable through a hierarchy for the Session user, it shall be accessible and callable by the Session user with the well defined NodeIds for the UserManagement Object and the ChangePassword Method.

This Method affects security and shall only be browseable and callable through an encrypted channel. It shall be callable by the Session user if the user token type for the Session is USERNAME, even if the Role for the user is Anonymous.

Signature

	ChangePassword (
		[in]	String 		OldPassword,
	[in]	String 		NewPassword
		);
	
Argument Description
OldPasswordThe old password for the Session user.
NewPassword

The new password for the Session user. It is recommended that the user interface for entering the new password requires to enter the password twice to avoid typos.

The Server can apply additional restrictions to the accepted password in addition to the one indicated by PasswordOptionMask.

Method Result Codes

ResultCode Description
Bad_IdentityTokenInvalid The old password is not valid.
Bad_OutOfRangeThe new password is outside the valid range of accepted length and characters.
Bad_InvalidStateThe caller is not authenticated with a USERNAME user token.
Bad_NotSupportedThe password cannot be changed due to NoChangeByUser user configuration mask setting.
Bad_SecurityModeInsufficientThe communication channel is not using encryption.
Bad_AlreadyExistsThe new password matches the old password.

The ChangePassword Method representation in the AddressSpace is formally defined in Table 31.

Table 31 – ChangePassword Method AddressSpace definition
Attribute Value
BrowseNameChangePassword
References Node Class BrowseName DataType TypeDefinition Other
0:HasPropertyVariable0:InputArguments0:Argument[] 0:PropertyTypeM
ConformanceUnits
Security User Management Server