|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.agent.tl1.security.SecurityView
This class is used to contain the over all security informations. For every security view a seperate Hashtable is used. Whenever a request comes it is just passed here to examine whether the user send this request has permission or the commands access level etc.
| Inner Class Summary | |
(package private) class |
SecurityView.ChannelInspectingThread
This thread view the timeOut table for every one second. |
(package private) class |
SecurityView.UoutExpiryCheckThread
This internal thread is used for checking the Uout and Pass word expiry of every entry in the table for once in every hour. |
| Field Summary | |
(package private) boolean |
adminFlag
|
(package private) TL1Agent |
agent
|
(package private) boolean |
channelFlag
|
(package private) boolean |
commandFlag
|
(package private) java.util.Hashtable |
duralTable
|
(package private) SecurityLogHandler |
logHandler
|
(package private) boolean |
operationFlag
|
(package private) boolean |
resourceFlag
|
(package private) java.util.Hashtable |
sessionTable
|
(package private) java.util.Hashtable |
timeOutTable
|
(package private) boolean |
userFlag
|
| Fields inherited from interface com.adventnet.agent.tl1.security.SecurityVariables |
aid,
ALW_LOG_SECU,
cap,
chap,
DLT_CID_SECU,
DLT_CMD_SECU,
DLT_RSC_SECU,
DLT_SECU,
DLT_USER_SECU,
DURAL,
ECMR,
ECSP,
ED_CID_SECU,
ED_CMD_SECU,
ED_RSC_SECU,
ED_SECU,
ED_USER_SECU,
EIUA,
ENT_CID_SECU,
ENT_CMD_SECU,
ENT_RSC_SECU,
ENT_SECU,
ENT_USER_SECU,
ERSP,
ESCC,
EURA,
EUSP,
INH_LOG_SECU,
IS,
LSTOI,
MXINV,
OOS,
PAGE,
PCND,
PCNN,
POINT,
rap,
root,
RTRV_ATTR_SECULOG,
RTRV_AUDIT_SECULOG,
SET_ATTR_SECULOG,
TMOUT,
UOUT |
| Constructor Summary | |
SecurityView()
|
|
SecurityView(TL1Agent agent)
Constructor for SecurityView |
|
| Method Summary | |
(package private) void |
addIntoChannelFile()
Writes all entries in the channel table into txt file (for persistence support). |
void |
addIntoChannelTable(TL1ChannelSecurity sec)
Adds the new channel entry in the channel table. |
(package private) void |
addIntoCommandFile()
This method writes all the entries in the command table into text file(for persistence) |
void |
addIntoCommandTable(TL1CommandSecurity sec)
This method is used to add the new user entry in the command table. |
(package private) void |
addIntoDuralTable(TL1ChannelSecurity sec,
TL1Session sess)
This method is called whenver intrusion attempt is crossed the limit MXINV. |
(package private) void |
addIntoOperationFile()
This method writes all the entries in the operationTable into text file. |
void |
addIntoOperationTable(java.lang.String view,
TL1OperationSecurity security)
This method adds the new operation entry im the operation table. |
(package private) void |
addIntoResourceFile()
This method writes all the entries in the resourceTable into text file. |
void |
addIntoResourceTable(TL1ResourceSecurity sec)
This method adds the new user entry in the operation table. |
(package private) void |
addIntoTimeOutTable(TL1ChannelSecurity chSec,
TL1Session sess)
Adding into the time out table. |
(package private) void |
addIntoUserFile()
This method writes all the entries in the table into text file. |
void |
addIntoUserTable(TL1UserSecurity sec)
This method is used to add the new user entry in the user table.(called whenever ENT-USER-SECU command is executed with valid entries). |
java.util.ArrayList |
getAdminSessions()
This method returns the admin(root) session if it is enabled else returns null. |
java.util.TreeSet |
getChannelIndexTable()
This will return the Channel index table. |
java.util.Hashtable |
getChannelTable()
This will return the Channel table. |
java.util.TreeSet |
getCommandIndexTable()
This will return the Command index table. |
java.util.Hashtable |
getCommandTable()
This will return the Command table. |
(package private) java.util.ArrayList |
getCommonPrivilege(TL1UserSecurity userSec,
TL1CommandSecurity commandSec)
This method receives the user security and command Security objects and checks if any of it's privileges matches. |
(package private) java.lang.String |
getLastLoginTime()
This method returns the last login time for a particular User id in a user security details. |
java.util.TreeSet |
getOperationIndexTable()
This will return the Operation index table. |
java.util.Hashtable |
getOperationTable()
This will return the Operation table. |
java.util.TreeSet |
getResourceIndexTable()
This will return the Resource index table. |
java.util.Hashtable |
getResourceTable()
This will return the Resource table. |
java.util.Hashtable |
getSessionTable()
Returns the session table. |
java.util.TreeSet |
getUserIndexTable()
This will return the User index table. |
java.lang.String |
getUserLogged(TL1Session sess)
This method returns the name of the user logged in for the particular session. |
java.util.Hashtable |
getUserTable()
This will return the User table. |
(package private) boolean |
isAdminCommand(java.lang.String command)
Checks whether the command is Admin command or not. |
(package private) boolean |
isAlreadyLogged(TL1Session session)
This method is used to check whether the Session is already logged in or not. |
boolean |
isAuthenticatedSession(TL1Session session)
Returns true if the specified session is an authenticated one. |
(package private) boolean |
isPasswordExpired(TL1UserSecurity security)
This method verifies whether the password is with in pcnd or pcnn period.Returns true in case of success. |
boolean |
isPasswordValid(TL1UserSecurity security,
java.lang.String password)
Checks whether the passWord is valid. |
boolean |
isSecured(TL1Session sess,
TL1InputMessage message)
This method is called from TL1Agent whenever it receives an input message on security mode. |
(package private) boolean |
isUnderDuralPeriod(TL1Session sess)
This gets the session and verifies whether the session is in it's dural period. |
(package private) boolean |
isUoutExpired(TL1UserSecurity security)
This method is used to verify whether the given user id or pass word is existing or not. |
(package private) boolean |
isValidChannel(TL1ChannelSecurity chSec,
TL1UserSecurity userSec,
java.util.ArrayList privList)
This method verifies whether the user is permitted to use the session. |
static java.lang.String |
makeString(java.util.Vector vec)
This method is used to spilt the vector elements and return as string of the format vec[0]&vec[1]&vec[2] |
static java.util.Vector |
makeVector(java.lang.String channel)
This method is used to spilt informations in the form a&b&c and create Vector. |
void |
removeFromChannelTable(java.lang.String channel)
Removes the Channel security of the specified key from the channel table. |
void |
removeFromCommandTable(java.lang.String command)
This method is used to remove the command entry of the specified key from the commandTable. |
void |
removeFromResourceTable(java.lang.String resource)
Removes the Resource security entry of the specified key from the resource table. |
void |
removeFromUserTable(java.lang.String userName)
This method is used to remove the user entry of the specified key from the userTable. |
(package private) TL1ChannelSecurity |
selectChannelSecurity(java.lang.String channel)
This method returns the corresponding TL1ChannelSecurity from the channelTable for the key given(channelId) . |
TL1CommandSecurity |
selectCommandSecurity(java.lang.String command)
This method returns the corresponding TL1CommandSecurity from the command table for the key given (command name). |
java.util.Hashtable |
selectOperSecurityTable(java.lang.String view)
This method returns the corresponding Hashtable ,comprising TL1OperationSecurity objects as values. |
TL1ResourceSecurity |
selectResourceSecurity(java.lang.String resource)
Returns the corresponding TL1ResourceSecurity from the command table for the key given (resource). |
TL1UserSecurity |
selectUserSecurity(java.lang.String name)
This method returns the corresponding TL1UserSecurity from the user table for the key given(User name) |
void |
setChannelIndexTable(java.util.TreeSet table)
Set the channel index table.This method will be called from TL1Agent. |
void |
setChannelTable(java.util.Hashtable table)
Set the channel table.This method will be called from TL1Agent. |
void |
setCommandIndexTable(java.util.TreeSet table)
Set the Command index table.This method will be called from TL1Agent. |
void |
setCommandTable(java.util.Hashtable table)
Set the Command table.This method will be called from TL1Agent. |
void |
setOperationHandlerFileName(java.lang.String opHandler)
Sets the OperationHandler file name with package. |
void |
setOperationIndexTable(java.util.TreeSet table)
Set the operation index table.This method will be called from TL1Agent. |
void |
setOperationTable(java.util.Hashtable table)
Set the operation table.This method will be called from TL1Agent. |
void |
setResourceHandlerFileName(java.lang.String resHandler)
Sets the ResourceHandler file name with package. |
void |
setResourceIndexTable(java.util.TreeSet table)
Set the Resource index table.This method will be called from TL1Agent. |
void |
setResourceTable(java.util.Hashtable table)
Set the Resource table.This method will be called from TL1Agent. |
void |
setSecurityFlags(boolean user,
boolean chann,
boolean command,
boolean oper,
boolean resource)
This method receives the status of diffirent security.Then instantiates the TL1SecurityCommandsRegister and registers the corresponding security related commands with the command registry. |
void |
setSecurityLogReference(SecurityLogHandler handler)
This method receives the reference of the SecurityLogHandler. |
void |
setSessionTable(java.lang.String userName,
TL1Session sess)
This method receives the session and the user logged in that. |
(package private) void |
setTimeInUserDetails(java.lang.String time)
This method sets the last login time for a paritucular User id in a user secutity details. |
void |
setUserIndexTable(java.util.TreeSet table)
Set the User index table.This method will be called from TL1Agent. |
void |
setUserTable(java.util.Hashtable table)
Set the User table.This method will be called from TL1Agent. |
void |
startUoutExpiryCheckThread()
This method starts the thread ExpiryCheck. |
void |
stopUoutExpiryCheckThread()
This stops thread ExpiryCheck. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
java.util.Hashtable sessionTable
java.util.Hashtable duralTable
java.util.Hashtable timeOutTable
TL1Agent agent
SecurityLogHandler logHandler
boolean userFlag
boolean channelFlag
boolean operationFlag
boolean commandFlag
boolean resourceFlag
boolean adminFlag
| Constructor Detail |
public SecurityView()
public SecurityView(TL1Agent agent)
| Method Detail |
public void setSecurityFlags(boolean user,
boolean chann,
boolean command,
boolean oper,
boolean resource)
user - -- If true, then User Security view is enabledchann - -- If true, then Channel Security View is enabledcommand - -- If true, then Command Security View is enabledoper - -- If true, then Operation Security View is enabledresource - -- If true, then Resource Security View is enabledpublic void setUserTable(java.util.Hashtable table)
table- - this table contains TL1UserSecurity Objects as values
and user names as keys.public java.util.Hashtable getUserTable()
public void setUserIndexTable(java.util.TreeSet table)
table- - this table contains Index Objects as values.public java.util.TreeSet getUserIndexTable()
public java.util.Hashtable getChannelTable()
public void setChannelTable(java.util.Hashtable table)
table - - this table contains TL1ChannelSecurity objects as
values and channelId as keys.public java.util.TreeSet getChannelIndexTable()
public void setChannelIndexTable(java.util.TreeSet table)
table - - this table contains index objects as
values.public java.util.Hashtable getCommandTable()
public void setCommandTable(java.util.Hashtable table)
table- - this table contains TL1CommandSecurity Objects as values
and user names as keys.public java.util.TreeSet getCommandIndexTable()
public void setCommandIndexTable(java.util.TreeSet table)
table- - this table contains Command index Objects as values.public java.util.Hashtable getOperationTable()
public void setOperationTable(java.util.Hashtable table)
table - - this table contains View as keys and Hashtable
(having recordId as key and TL1OperationSecurity objects as values)
as values.public java.util.TreeSet getOperationIndexTable()
public void setOperationIndexTable(java.util.TreeSet table)
table - - this table contains View index as values.public java.util.Hashtable getResourceTable()
public void setResourceTable(java.util.Hashtable table)
table - - this table contains TL1ResourceSecurpublic java.util.TreeSet getResourceIndexTable()
public void setResourceIndexTable(java.util.TreeSet table)
table - - this table contains resource index object as value.public void addIntoUserTable(TL1UserSecurity sec)
sec - -- Reference of the TL1UserSecurityvoid addIntoUserFile()
public void addIntoChannelTable(TL1ChannelSecurity sec)
sec - -- TL1ChannelSecurity Referencevoid addIntoChannelFile()
public void addIntoCommandTable(TL1CommandSecurity sec)
sec - -- TL1CommandSecurity Referencevoid addIntoCommandFile()
public void addIntoResourceTable(TL1ResourceSecurity sec)
sec - -- TL1ResourceSecurity Referencevoid addIntoResourceFile()
public void addIntoOperationTable(java.lang.String view,
TL1OperationSecurity security)
view - -- Name of the Table(view)security - -- TL1OperationSecurity Referencevoid addIntoOperationFile()
void addIntoDuralTable(TL1ChannelSecurity sec,
TL1Session sess)
public void removeFromUserTable(java.lang.String userName)
userName - -- userName(UID) whose corresponding user entry in the usersecurity text file to be removedpublic void removeFromChannelTable(java.lang.String channel)
public void removeFromCommandTable(java.lang.String command)
command - -- command name whose corresponding Command entry in the commandsecurity text file to be removedpublic void removeFromResourceTable(java.lang.String resource)
resource - -- resource name whose corresponding resource entry in the resourcesecurity text file to be removedpublic void setSecurityLogReference(SecurityLogHandler handler)
handler - -- Reference of the SecurityLogHandlerpublic void setOperationHandlerFileName(java.lang.String opHandler)
opHandler - -- Operation Handler File namepublic void setResourceHandlerFileName(java.lang.String resHandler)
resHandler - -- Resource Handler File nameboolean isUoutExpired(TL1UserSecurity security)
public TL1UserSecurity selectUserSecurity(java.lang.String name)
name - -- user name(UID)TL1ChannelSecurity selectChannelSecurity(java.lang.String channel)
channel - -- channel name(CID) to be selectedpublic TL1CommandSecurity selectCommandSecurity(java.lang.String command)
command - -- command name to be selectedpublic java.util.Hashtable selectOperSecurityTable(java.lang.String view)
view - -- View name to be obtainedpublic TL1ResourceSecurity selectResourceSecurity(java.lang.String resource)
resource - -- Resource name to be obtained
public boolean isPasswordValid(TL1UserSecurity security,
java.lang.String password)
password - -- password to be checkedsecurity - -- Reference of the TL1UserSecurityboolean isPasswordExpired(TL1UserSecurity security)
public void startUoutExpiryCheckThread()
public void stopUoutExpiryCheckThread()
public void setSessionTable(java.lang.String userName,
TL1Session sess)
userName - -- username (UID) who has logged into the sessionsess - -- Reference of the TL1Sesssion, Session where the user has loggedinpublic java.util.Hashtable getSessionTable()
public java.lang.String getUserLogged(TL1Session sess)
sess - -- Reference of the TL1Sesssion, Session where the user has loggedinvoid setTimeInUserDetails(java.lang.String time)
java.lang.String getLastLoginTime()
public boolean isAuthenticatedSession(TL1Session session)
session - - TL1Session to be checked for authentication status.
public boolean isSecured(TL1Session sess,
TL1InputMessage message)
throws TL1AgentException,
java.lang.Exception
sess - - TL1Sessionmessage - - TL1InputMessageboolean isUnderDuralPeriod(TL1Session sess)
void addIntoTimeOutTable(TL1ChannelSecurity chSec,
TL1Session sess)
java.util.ArrayList getCommonPrivilege(TL1UserSecurity userSec,
TL1CommandSecurity commandSec)
boolean isValidChannel(TL1ChannelSecurity chSec,
TL1UserSecurity userSec,
java.util.ArrayList privList)
boolean isAlreadyLogged(TL1Session session)
boolean isAdminCommand(java.lang.String command)
public static java.util.Vector makeVector(java.lang.String channel)
channel - -- channel name(s) separated by &public static java.lang.String makeString(java.util.Vector vec)
vec - - Refernce of the Vectorpublic java.util.ArrayList getAdminSessions()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||