|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This is the interface which provides the framework for Authorization.
It will be required to implement this interface for providing
Authorization (access control).
Authorization mechanism uses an Access Control policy, where
a user(connecting to NMS server) belonging to a particular group
has a view defined(also called authorized view) that specifies the
operations he is allowed to perform. Also, the client(UI) wishing to
provide customized views for each user/group can associate a
namedView to the set of authorizedViews.
The set APIs provided can be classified as :
// Accessing AuthorizationEngine via RMI
try
{
AuthorizationEngine authEngine = (AuthorizationEngine) Naming. lookup ("//[NMSServer]/NmsAuthEngineAPI");
System.out.println ( "Successfully got the handle for AuthorizationEngine");
}
catch (Exception remoteException)
{
System.out.println ( "Error in getting the handle for AuthorizationEngine");
}
boolean result = authEngine.isAuthorized( "userName" , "operationName" );
// Accessing AuthorizationEngine from the same JVM
AuthorizationEngine authEngine = (AuthorizationEngine) NmsUtil.getAPI ("NmsAuthEngineAPI");
boolean result = authEngine.isAuthorized( "userName" , "operationName" );
// Accessing AuthorizationEngine via RMIAccessAPI in the NMS RMI secure mode
try
{
RMIAccessAPI rmiApi = (RMIAccessAPI) Naming.lookup ("//[NMSServer]/RMIAccessAPI");
AuthorizationEngine authEngine = (AuthorizationEngine) rmiApi.getAPI ( "userName" , "passWord" , "NmsAuthEngineAPI" );
boolean result = authEngine.isAuthorized( "userName" , "operationName" );
}
catch (Exception remoteException)
{
System.out.println ( "Error in getting the handle for AuthorizationEngine");
}
| Method Summary | |
java.util.Vector |
getAllGroupNames(java.lang.String userName)
Gets a list of group names to which the user belongs. |
java.util.Vector |
getAuthorizedOperations(java.lang.String userName,
java.lang.String namedViewName)
Retrieves a list of authorized operations for a user with the specified list of namedView. |
java.util.Vector |
getAuthorizedOperations(java.lang.String userName,
java.util.Vector namedViewNameList)
Retrieves a list of authorized operations for a user with the specified list of namedView. |
java.util.Hashtable |
getAuthorizedViewAndNamedView(java.lang.String userName)
Gets all the AuthorizedViewNames and NamedViewNames for a given user. |
java.util.Vector |
getAuthorizedViewNames(java.lang.String userName)
Gets a list of AuthorizedViewNames for a given user. |
java.util.Vector |
getAuthorizedViewNames(java.lang.String userName,
java.lang.String namedView)
Gets a list of authorizedView names for a given user name and namedView. |
java.util.Vector |
getAuthorizedViewObjects(java.lang.String userName)
Gets a list of AuthorizedViewObjects for a given user. |
java.util.Vector |
getAuthorizedViewObjectsForView(java.lang.String AuthorizedViewName)
Gets a list of AuthorizedViewObjects for a given AuthorizedViewName. |
java.util.Vector |
getOperationsForUser(java.lang.String userName)
This method is used to get a List of operations authorized for this specified user name. |
void |
init(java.lang.Object obj)
This Method is used for initialization, if any. |
boolean |
isAuthorized(java.lang.String userName,
java.lang.String operationName)
Performs access verification for a particular user who wants to perform a set of operations. |
boolean |
isAuthorized(java.lang.String userName,
java.lang.String operationName,
boolean isAuditNeeded)
|
boolean |
isAuthorized(java.lang.String userName,
java.lang.String operationName,
java.util.Properties viewProperties)
Performs access verification for a particular user, who wants to perform a particular operation, on an object with the specified properties. |
boolean |
isAuthorized(java.lang.String userName,
java.lang.String operationName,
java.util.Properties viewProperties,
java.lang.String namedViewName)
Performs access verification for a particular user,who wants to perform a particular operation,on an object with the specified properties.If the user is Authorized, then the namedViewName is associated with all AuthorizedViewNames (common for UserName,Operation, and Properties) in NamedViewToAuthorizedViewTable. |
boolean |
isAuthorized(java.lang.String userName,
java.lang.String operationName,
java.lang.String namedViewName)
Performs access verification for a particular user who wants to perform a particular operation, having the specified namedViewName.If the user is Authorized, then the namedViewName is associated with all AuthorizedViewNames (common for UserName and Operation) in NamedViewToAuthorizedViewTable. |
boolean |
isAuthorized(java.lang.String userName,
java.util.Vector operationNameList,
java.util.Properties viewProperties)
Performs access verification for a particular user who wants to perform a set of operations, on an object with the specified properties. |
boolean |
isAuthorized(java.lang.String userName,
java.util.Vector operation,
java.lang.String namedViewName)
Performs access verification for a particular user who wants to perform a set of operations, having the specified namedViewName. |
boolean |
isPropertyPresent(java.lang.String groupName,
java.util.Properties viewProperties)
Checks whether the given properties are subset of the properties for a group name or not. |
| Method Detail |
public void init(java.lang.Object obj)
throws java.rmi.RemoteException,
AuthorizationException
obj - Object used for initializationjava.rmi.RemoteException - In case of RMI.AuthorizationException - In case of any exception.
public boolean isAuthorized(java.lang.String userName,
java.lang.String operationName,
java.util.Properties viewProperties)
throws java.rmi.RemoteException,
AuthorizationException
userName - The name of the user who is performing the operation.operationName - The name of the operation that the user performs.viewProperties - The set of properties(propertyName,
propertyValue pair) of the object on which the operation is to be
performed.AuthorizationException - If there is any exception
during access verifications.java.rmi.RemoteException - In case of RMI.
public boolean isAuthorized(java.lang.String userName,
java.lang.String operationName,
java.util.Properties viewProperties,
java.lang.String namedViewName)
throws java.rmi.RemoteException,
AuthorizationException
userName - :The name of the user who is performing the operation.operationName - :The name of the operation that the user performs.viewProperties - :The set of properties(propertyName,
propertyValue pair) of the object on which the operation is to be
performed.namedViewName - :The name of the namedView for which the
operation is to be authorized.java.rmi.RemoteException - :In case of RMI.AuthorizationException - :If there is any exception
during access verifications.
public boolean isAuthorized(java.lang.String userName,
java.lang.String operationName)
throws java.rmi.RemoteException,
AuthorizationException
userName - The name of the user who is performing the operation.operationName - The name of the operation that the
user wishes to perform specified as a string.AuthorizationException - if there is any
error during database operation.java.rmi.RemoteException - In case of RMI
public boolean isAuthorized(java.lang.String userName,
java.lang.String operationName,
boolean isAuditNeeded)
throws java.rmi.RemoteException,
AuthorizationException
public boolean isAuthorized(java.lang.String userName,
java.util.Vector operationNameList,
java.util.Properties viewProperties)
throws java.rmi.RemoteException,
AuthorizationException
userName - The name of the user who is performing the operation.operationNameList - The list of operations that the
user wishes to perform.viewProperties - The set of properties(propertyName,
propertyValue pair) of the object on which the operation is to be
performed.AuthorizationException - If there is any exception
during access verifications.java.rmi.RemoteException - In case of RMI.
public boolean isAuthorized(java.lang.String userName,
java.lang.String operationName,
java.lang.String namedViewName)
throws java.rmi.RemoteException,
AuthorizationException
userName - The name of the user who is performing the operation.operationName - The name of the operation that the user performs.namedViewName - The name of the namedView for which the
operation is to be authorized.AuthorizationException - If there is any exception
during access verifications.java.rmi.RemoteException - In case of RMI.
public boolean isAuthorized(java.lang.String userName,
java.util.Vector operation,
java.lang.String namedViewName)
throws java.rmi.RemoteException,
AuthorizationException
userName - The name of the user who is performing the operation.operation - The list of the operation that the
user wishes to perform specified as a vector.namedViewName - The name of the namedView for which the
operationList is to be authorized.AuthorizationException - If there is any exception
during access verifications.java.rmi.RemoteException - In case of RMI.
public java.util.Vector getAuthorizedOperations(java.lang.String userName,
java.lang.String namedViewName)
throws java.rmi.RemoteException,
AuthorizationException
userName - The name of the user for which the authorized
operations are required.namedViewName - A Vector of namedView names for which the
authorized operations are required.AuthorizationException - If there is any exception
during access verifications.java.rmi.RemoteException - In case of RMI.
public java.util.Vector getAuthorizedOperations(java.lang.String userName,
java.util.Vector namedViewNameList)
throws java.rmi.RemoteException,
AuthorizationException
userName - The name of the user for which the authorized
operations are required.namedViewNameList - A Vector of namedView names for which the
authorized operations are required.AuthorizationException - If there is any exception
during access verifications.java.rmi.RemoteException - In case of RMI.
public java.util.Vector getOperationsForUser(java.lang.String userName)
throws java.rmi.RemoteException,
AuthorizationException
userName - the name of the user for which the operations
list is to be retrieved.AuthorizationException - If there is any exception
during access verifications.java.rmi.RemoteException - In case of RMI.
public java.util.Vector getAuthorizedViewNames(java.lang.String userName,
java.lang.String namedView)
throws java.rmi.RemoteException,
AuthorizationException
userName - The name of the user for which the
authorizedViews are required.namedView - The namedView for which the list of
authorizedView names are required.AuthorizationException - If there is any exception
during access verifications.java.rmi.RemoteException - In case of RMI.
public java.util.Vector getAuthorizedViewNames(java.lang.String userName)
throws java.rmi.RemoteException,
AuthorizationException
userName - the name of the user for which the
AuthorizedViewName is required.AuthorizationException - if there is any exception
during access verificationsjava.rmi.RemoteException - In case of RMI
public java.util.Hashtable getAuthorizedViewAndNamedView(java.lang.String userName)
throws java.rmi.RemoteException,
AuthorizationException
userName - the name of the user for which the
AuthorizedViewName and NamedViewName are required.AuthorizationException - If there is any exception
during access verifications.java.rmi.RemoteException - In case of RMI.
public java.util.Vector getAuthorizedViewObjects(java.lang.String userName)
throws java.rmi.RemoteException,
AuthorizationException
userName - the name of the user for which the
AuthorizedViewObject is required.AuthorizationException - If there is any exception
during access verifications.java.rmi.RemoteException - In case of RMI.
public java.util.Vector getAllGroupNames(java.lang.String userName)
throws java.rmi.RemoteException,
AuthorizationException
userName - The name of the user for which the group names
are required.AuthorizationException - If there is any exception or
error during database operation.java.rmi.RemoteException - In case of RMI.
public boolean isPropertyPresent(java.lang.String groupName,
java.util.Properties viewProperties)
throws java.rmi.RemoteException,
AuthorizationException
groupName - the name of the group for which the
properties are checked.viewProperties - the set of properties(propertyname,propertyvalue)
to be checked with the properties from the database.AuthorizationException - If there is any exception
related to database operation.java.rmi.RemoteException - In case of RMI.
public java.util.Vector getAuthorizedViewObjectsForView(java.lang.String AuthorizedViewName)
throws java.rmi.RemoteException,
AuthorizationException
AuthorizedViewName - The AuthorizedViewName for which
the list of AuthorizedViewObjects are required.AuthorizationException - If there is any exception or
error during database operation.java.rmi.RemoteException - In case of RMI.
|
AdventNet Web NMS 4 API Specification | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||