/**
* Returns the list of roles associated to the passed user name
- *
+ *
* @param userName
* @return the role associated to the user name
*/
/**
* Authenticate user with AAA server and return authentication and
* authorization info
- *
+ *
* @param username
* the username
* @param password
/**
* Add/remove AAA server
- *
+ *
* @param configObject
* {@link org.opendaylight.controller.usermanager.internal.ServerConfig}
* Server Configuration
/**
* Remove AAA server
- *
+ *
* @param configObject
* refer to
* {@link org.opendaylight.controller.usermanager.internal.ServerConfig}
/**
* Add a local user
- *
+ *
* @param configObject
* {@link org.opendaylight.controller.usermanager.internal.UserConfig}
* User Configuration
/**
* Remove a local user
- *
+ *
* @param configObject
* {@link org.opendaylight.controller.usermanager.internal.UserConfig}
* UserConfig
/**
* Remove a local user
- *
+ *
* @param userName
* the user name
* @return {@link org.opendaylight.controller.sal.utils.Status}
/**
* Add the authorization information for a user that gets authenticated
* remotely
- *
+ *
* @param AAAconf
* {@link org.opendaylight.controller.usermanager.internal.AuthorizationConfig}
* Authorization Resources
/**
* Remove the authorization information for a user that gets authenticated
* remotely
- *
+ *
* @param AAAconf
* {@link org.opendaylight.controller.usermanager.internal.AuthorizationConfig}
* Authorization Resource
/**
* Return the list of authorization resources
- *
+ *
* @return {@link org.opendaylight.controller.usermanager.internal.AuthorizationConfig}
* List of Authorization Resource
*/
/**
* Returns a list of AAA Providers.
- *
+ *
* @return Set of provider names.
*/
public Set<String> getAAAProviderNames();
/**
* Change the current password for a locally configured user
- *
+ *
* @param user
* the username
* @param curPasssword
/**
* Return a list of AAA servers currently configured
- *
+ *
* @return {@link org.opendaylight.controller.usermanager.internal.ServerConfig}
* List of ServerConfig
*/
/**
* Return a list of local users
- *
+ *
* @return {@link org.opendaylight.controller.usermanager.internal.UserConfig}
* List of UserConfig
*/
/**
* Save the local users to disk
- *
+ *
* @return {@link org.opendaylight.controller.sal.utils.Status}
* status of this action
*/
/**
* Save the AAA server configurations to disk
- *
+ *
* @return {@link org.opendaylight.controller.sal.utils.Status}
* status of this action
*/
/**
* Save the Authorization configurations to disk
- *
+ *
* @return {@link org.opendaylight.controller.sal.utils.Status}
* status code
*/
/**
* Remove user profile when user logs out
- *
+ *
* @param username
* the user name
*/
/**
* Remove user profile when user times out
- *
+ *
* @param username
* the user name
*/
/**
* Get the list of users currently logged in
- *
+ *
* @return the list of users along with their administrative roles
*/
public Map<String, List<String>> getUserLoggedIn();
/**
* Get date and time user was successfully authenticated
- *
+ *
* @param user
* @return Date in String format
*/
public String getAccessDate(String user);
/**
- * Returns the user level for the passed user name. It checks the roles
+ * Returns the highest user level for the passed user name. It checks the roles
* assigned to this user and checks against the well known Controller user
* roles to determines the highest user level associated with the user
- *
+ *
* @param userName
* the user name
* @return {@link org.opendaylight.controller.sal.authorization.UserLevel}
*/
public UserLevel getUserLevel(String userName);
+ /**
+ * Returns the list of user level for the passed user name. It checks the roles
+ * assigned to this user and checks against the well known Controller user
+ * roles to determines the corresponding list of user level associated with the user
+ *
+ * @param userName
+ * the user name
+ * @return
+ * the list of user level for this user
+ */
+ public List<UserLevel> getUserLevels(String userName);
+
/**
* Returns the Security Context
- *
+ *
* @returns {@link org.springframework.security.web.context.SecurityContextRepository}
* Security Context
*/
/**
* Returns the Session Manager Interface Handler
- *
+ *
* @return {@link org.opendaylight.controller.usermanager.ISessionManager}
* session manager interface handler
*/
public ISessionManager getSessionManager();
+ /**
+ * Checks if the specified role belongs to any application. Usually an
+ * application will call this function when configuring a role, to check if
+ * that role is already being used by another application.
+ *
+ * @param role
+ * The role to check
+ * @return true if the specified role belongs to any application or if the
+ * role is a well-known controller role, false otherwise.
+ */
+ public boolean isRoleInUse(String role);
+
/* non-Javadoc
* Returns the password for a given user
- *
+ *
* @param username
* the user name
* @return password for the username