|
Style Intelligence v12.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinetsoft.sree.security.SecurityEngine
public class SecurityEngine
This class is a factory class, which creates a SecurityProvider
instance depending on the configuration of system
security using EM Gui. It shields the general users from the lower
implementations and provides a simpler programming interface. It also
keeps a private set of entries, which are autenticated successfully.
| Method Summary | |
|---|---|
void |
addLoginListener(LoginListener listener)
Add login listener. |
Principal |
authenticate(ClientInfo user,
Object credential)
It checks the authentication of specific entity. |
static boolean |
authenticateAdmin(String userid,
Object ticket)
Authenticate the admin user. |
static boolean |
authenticateEMUser(String userid,
Object ticket,
Principal principal)
|
void |
changePassword(Principal principal,
String password)
Change the password for an entity. |
boolean |
checkPermission(Principal principal,
String resource,
char acc)
Check the permission to access a resource. |
static void |
clear()
Clear the cached security object to the key. |
boolean |
containsAnonymous()
Check if contains user anonymous. |
void |
fireLoginEvent(SRPrincipal user)
Fire login event. |
ArrayList |
getActivePrincipalList()
Get the active Principal list. |
SecurityProvider |
getDefaultSecurityProvider()
Get default security provider. |
Set |
getEditableGroups(Principal principal)
Get editable groups for current user, include: 1: direct groups 2: direct groups' sub groups for example, inetsoft(group) contains BJ(group) and (XiAn), BJDev(group) is in BJ, User1(user) is in BJ and BJDev, then for User1, this function should return BJ and BJDev. |
Set |
getEditableUsers(Principal principal)
Get editable users, include all users in editable groups. |
String[] |
getEmails(String user)
Get a list of all emails for a user. |
String[] |
getGroups()
Get a list of all groups defined in the system. |
IdentityInfo |
getIdentityInfo(String name,
int type)
Get IdentityInfo by a name and type of identity. |
String[] |
getIndividualEmailAddresses()
Get a list the email addresses of users that do not belong to any group. |
String[] |
getIndividualUsers()
Get a list of all users not in any group except INDIVIDUAL. |
static long |
getLastModified()
Gets the date and time at which the security settings were last modified. |
Permission |
getPermission(String resource)
Get the permission for the specified resource. |
static Random |
getRandom()
Get the random number generator for principals. |
String[] |
getRoles()
Get a list of all roles in the system. |
String[] |
getRoles(String user)
Get a list of all roles bound to a specific user. |
String[] |
getRootGroup(Principal principal)
Get the direct root groups which contains the user, for example: inetsoft(group) contains BJ(group) and XiAn(group), User1(user) in group inetsoft and group BJ, then this function should return inetsoft. |
static SecurityEngine |
getSecurity()
Get a SecurityEngine object. |
SecurityProvider |
getSecurityProvider()
Get the SecurityProvider object used by this system. |
inetsoft.uql.util.IdentityNode[] |
getSubIdentities(inetsoft.uql.util.IdentityNode node)
Get sub nodes of security tree. |
inetsoft.uql.util.IdentityNode[] |
getSubIdentities(inetsoft.uql.util.IdentityNode node,
String userFilter,
String groupFilter,
String roleFilter,
boolean showUsers,
boolean showGroups,
boolean showRoles)
Get sub nodes of security tree. |
String |
getUser(Principal principal)
Get the user id from the principal. |
String[] |
getUsers()
Get a list of all users in the system. |
String[] |
getUsers(String group)
Get a list of all users in a group. |
SecurityProvider |
getVirtualSecurityProvider()
Get the VirtualSecurityProvider object used by this system. |
Set |
getVisibleGroups(Principal principal)
Get visible groups for current user, include: 1: editable groups 2: direct groups' parent groups for example, inetsoft(group) contains BJ(group) and (XiAn), BJDev(group) is in BJ, User1(user) is in BJ and BJDev, then for User1, this function should return inetsoft(visible but non-editable), BJ and BJDev(editable). |
void |
init()
Initialize the engine. |
boolean |
isActiveUser(Principal principal)
Determines if the specified principal has been authenticated and has an active session. |
static boolean |
isAdministrator(String roleid)
Return if the role is ADMINISTRATOR role or not. |
static boolean |
isAdministratorGroup(String groupid)
Return if the role is ADMINISTRATOR group or not. |
boolean |
isSameGroup(Principal principal,
String otherUserName)
|
boolean |
isValidIdentity(inetsoft.uql.util.Identity identity)
Check if the specified identity is valid or not. |
boolean |
isValidUser(Principal principal)
Check whether this user has logged in or not. |
void |
logout(Principal principal)
Log the user out of the system. |
static void |
removeIdentityCache(String name,
int type)
|
void |
removeLoginListener(LoginListener listener)
Remove login listener. |
void |
removePermission(String resource)
Remove the user permission. |
void |
setPermission(String resource,
Permission perm)
Set the permission for a specific resource. |
static void |
touch()
Updates the modification time stamp to the current date and time. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void init()
throws SRSecurityException
SecurityProvider is changed using EM Adm.
SRSecurityException
public static SecurityEngine getSecurity()
throws SRSecurityException
SecurityEngine object.
SecurityEngine object
SRSecurityExceptionpublic void addLoginListener(LoginListener listener)
public void removeLoginListener(LoginListener listener)
public static boolean authenticateAdmin(String userid,
Object ticket)
public static boolean authenticateEMUser(String userid,
Object ticket,
Principal principal)
public static void clear()
public Principal authenticate(ClientInfo user,
Object credential)
user - the client info of the user to be authenticated.credential - it wraps up the some secure message, such as user
id and password
Principal Object if no security provider is set
or the authentication checking is succeed or null if the
authentication checking fails.public boolean containsAnonymous()
public void fireLoginEvent(SRPrincipal user)
public static boolean isAdministratorGroup(String groupid)
public static boolean isAdministrator(String roleid)
public void logout(Principal principal)
principal - it represents an entitypublic String[] getUsers()
public String[] getUsers(String group)
public String[] getIndividualUsers()
public String[] getEmails(String user)
public String getUser(Principal principal)
principal - it represents an entity
public String[] getGroups()
public String[] getRoles(String user)
user - user id
public String[] getRoles()
public String[] getIndividualEmailAddresses()
public void setPermission(String resource,
Permission perm)
resource - resource name, such as a replet path or a saved
report path.perm - permission setting.public void removePermission(String resource)
resource - resource name, such as a replet registry name or a saved
report path.public Permission getPermission(String resource)
resource - resource name.
null if no permission is set
for this resource.
public boolean checkPermission(Principal principal,
String resource,
char acc)
throws SecurityException
principal - it represents an entityresource - resource name.acc - permission. 'r' for read, 'w' for write, and 'd' for delete.
if - the principal did not login
SecurityException
public void changePassword(Principal principal,
String password)
throws SRSecurityException
principal - it represents an entitypassword - the new password
SRSecurityException - if changing password
failed.
SRSecurityExceptionpublic SecurityProvider getSecurityProvider()
SecurityProvider object used by this system.
SecurityProvider instance or null
if no security provided is definedpublic SecurityProvider getVirtualSecurityProvider()
VirtualSecurityProvider object used by this system.
public SecurityProvider getDefaultSecurityProvider()
public inetsoft.uql.util.IdentityNode[] getSubIdentities(inetsoft.uql.util.IdentityNode node)
public inetsoft.uql.util.IdentityNode[] getSubIdentities(inetsoft.uql.util.IdentityNode node,
String userFilter,
String groupFilter,
String roleFilter,
boolean showUsers,
boolean showGroups,
boolean showRoles)
public boolean isActiveUser(Principal principal)
principal - the principal to check.
public boolean isValidUser(Principal principal)
public IdentityInfo getIdentityInfo(String name,
int type)
name - Name of the Identitytype - Type of the Identity
public static void removeIdentityCache(String name,
int type)
public String[] getRootGroup(Principal principal)
public boolean isSameGroup(Principal principal,
String otherUserName)
public Set getEditableGroups(Principal principal)
public Set getEditableUsers(Principal principal)
public Set getVisibleGroups(Principal principal)
public boolean isValidIdentity(inetsoft.uql.util.Identity identity)
public ArrayList getActivePrincipalList()
public static Random getRandom()
public static long getLastModified()
public static void touch()
getLastModified()
|
Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||