11.2. Defining Users
11.2. Defining Users
This section provides guidance on how to define users in the User-based Security Model.
Clone-From Template Users
The recommended approach for defining users is to use template users for cloning. A template user is a user defined at the authoritative SNMP engine that serves as a source for cloning to create new users.
Process:
-
Define a template user at the authoritative engine with:
- Authentication protocol
- Privacy protocol
- Localized authentication key
- Localized privacy key
-
Use the
usmUserCloneFromobject to clone the template user to create a new user at either:- The same authoritative engine, or
- A non-authoritative engine
-
After cloning, use
usmUserAuthKeyChangeandusmUserPrivKeyChangeto set unique keys for the new user.
Password-Based Key Derivation
When creating users, passwords can be converted to keys using the password-to-key algorithm defined in Appendix A.2. This algorithm:
- Takes a password (arbitrary length OCTET STRING)
- Applies a hash function (MD5 or SHA) repeatedly
- Produces a key of the appropriate length
Important: Different passwords may produce the same key if they consist of repetitive patterns. For example, the passwords "maplesyrupmaples" and "maplesyrup" may produce similar intermediate hash values. Therefore:
- Avoid repetitive password patterns
- Use passwords at least 8 characters long
- Ensure password complexity
User Table Management
Users are stored in the usmUserTable. Each entry contains:
usmUserEngineID: The snmpEngineID of the SNMP engineusmUserName: The user nameusmUserSecurityName: The security nameusmUserCloneFrom: The template user to clone fromusmUserAuthProtocol: The authentication protocolusmUserAuthKeyChange: Object for changing authentication keyusmUserOwnAuthKeyChange: Object for changing own authentication keyusmUserPrivProtocol: The privacy protocolusmUserPrivKeyChange: Object for changing privacy keyusmUserOwnPrivKeyChange: Object for changing own privacy keyusmUserPublic: A publicly readable and writable objectusmUserStorageType: The storage typeusmUserStatus: The row status
Security Considerations for User Definition
-
Initial User: At least one user MUST be defined with appropriate security credentials before the SNMP engine can be used for authenticated communication.
-
Key Strength: Ensure that the keys (whether derived from passwords or randomly generated) have sufficient entropy to resist brute-force attacks.
-
User Rights: Define users with the minimum necessary privileges. Use the View-based Access Control Model (VACM) to restrict what each user can access.
-
User Lifecycle: Establish procedures for:
- Creating users securely
- Updating user credentials periodically
- Disabling or deleting users when they are no longer needed
- Auditing user activities