Example name : SecurityExample.java
Location :
<Web NMS Home>/examples/Security/authorization directory
This example is designed to give a complete picture of Security
Services' administrative features. Here a user is created, a group is then assigned to that user, the
group is then associated to a view and the operations are specified to that view and other administrative functions are performed. If the process is explained step by step,
then the steps involved in this example are :
Step : 1 Create a user
Step : 2 Assign an operation to view
Step : 3 Get the Hashtable of Operations for a View
Step : 4 Assign the view to a group
Step : 5 Change the password for an existing user
Step : 6 Set and Get the password age for the user
Step : 7 Set and Get the user expiry time
Step : 8 Set the status for a user
Step : 9 Get all the attributes for a user
Step : 10 Get the entire operations in the operation tree
Methods used in this example are listed below :
Note : The source code will have comment statements in it which will explain to you the different segments of the program.
The steps given below will help you in integrating this example with Web NMS. If any of the steps given below are not followed properly, then the example might not function in a desired manner.
- java com.adventnet.nms.example.security.authorization.SecurityExample "create user"
- java com.adventnet.nms.example.security.authorization.SecurityExample "change password"
- java com.adventnet.nms.example.security.authorization.SecurityExample "password age"
- java com.adventnet.nms.example.security.authorization.SecurityExample "user expiration"
- java com.adventnet.nms.example.security.authorization.SecurityExample "remove user"
- java com.adventnet.nms.example.security.authorization.SecurityExample "get attributes"
- java com.adventnet.nms.example.security.authorization.SecurityExample "operations tree"
- java com.adventnet.nms.example.security.authorization.SecurityExample "user status"
- java com.adventnet.nms.example.security.authorization.SecurityExample "create user" <username> <group name> <view name> <operation name>
- java com.adventnet.nms.example.security.authorization.SecurityExample "change password" <username> <new password>
- java com.adventnet.nms.example.security.authorization.SecurityExample "password age" <username> <password age in days>
- java com.adventnet.nms.example.security.authorization.SecurityExample "user expiration" <username> <user age in days>
- java com.adventnet.nms.example.security.authorization.SecurityExample "remove user" <username> <remove trace i.e. true or false>
- java com.adventnet.nms.example.security.authorization.SecurityExample "get attributes" <username>
- java com.adventnet.nms.example.security.authorization.SecurityExample "operations tree"
- java com.adventnet.nms.example.security.authorization.SecurityExample "user status" <username> <user status>
Note : Ensure that the double quotes (" ") are specified appropriately, as mentioned above.
On successful execution of this example, based on the above mentioned command line arguments, each of the administrative functionalities of the Security Services is exhibited appropriately.
After you have tried this example, to remove its association with Web NMS, you must remove the class file SecurityExample.class from <Web NMS Home>/classes/com/adventnet/nms/example/security/authorization directory.
Copyright © 1996-2002, AdventNet Inc. All Rights Reserved.