クラス org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager

すべてのメンバ一覧

説明

Call this to check if security is enforced ....

作者:
Nicolas Modrzyk
バージョン:
1.0

ControllerSecurityManager.java41 行で定義されています。

Public メソッド

 ControllerSecurityManager ()
boolean allowConnection (Socket clientSocket)
void addToSecureList (RE range, boolean baccept)
void addToSecureList (String range, boolean baccept) throws Exception
void addHostToSecureList (String host, boolean baccept)
boolean getAllowAdditionalDriver ()
void setAllowAdditionalDriver (boolean allowAdditionalDriver)
boolean getAllowClientShutdown ()
void setAllowClientShutdown (boolean allowClientShutdown)
boolean getAllowConsoleShutdown ()
void setAllowConsoleShutdown (boolean allowConsoleShutdown)
boolean getAllowLocalClientOnly ()
void setAllowLocalClientOnly (boolean allowLocalClientOnly)
boolean getAllowLocalConsoleOnly ()
void setAllowLocalConsoleOnly (boolean allowLocalConsoleOnly)
boolean getDefaultConnect ()
void setDefaultConnect (boolean defaultConnect)
ArrayList getSaccept ()
ArrayList getSblock ()
ArrayList getAccept ()
ArrayList getBlock ()
void setBlock (ArrayList block)
String getXml ()
boolean isSSLEnabled ()
SSLConfiguration getSslConfig ()
void setSslConfig (SSLConfiguration sslConfig)

Static Private メソッド

boolean checkList (ArrayList list, Socket clientSocket)

Private 変数

boolean allowAdditionalDriver = true
boolean allowConsoleShutdown = true
boolean allowLocalConsoleOnly = true
boolean allowClientShutdown = true
boolean allowLocalClientOnly = true
boolean defaultConnect = true
ArrayList accept
ArrayList saccept
ArrayList block
ArrayList sblock
SSLConfiguration sslConfig


コンストラクタとデストラクタ

org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.ControllerSecurityManager  ) 
 

Create a new security manager ControllerSecurityManager.java58 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.accept, org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.block, org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.saccept, と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.sblock.

00059 { 00060 block = new ArrayList(); 00061 accept = new ArrayList(); 00062 saccept = new ArrayList(); 00063 sblock = new ArrayList(); 00064 }


メソッド

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addHostToSecureList String  host,
boolean  baccept
 

Add this host name or ipaddress to the secure list

引数:
host name or ipaddress
baccept true if accept false if block
ControllerSecurityManager.java119 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.accept, と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.block.

00120 { 00121 if (baccept) 00122 accept.add(host); 00123 else 00124 block.add(host); 00125 }

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addToSecureList String  range,
boolean  baccept
throws Exception
 

Add an ip range to the secure list. Same as above, but we want to store the original string pattern as well.

引数:
range to accept
baccept true if accept false if block
例外:
Exception if the pattern is not valid
ControllerSecurityManager.java103 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addToSecureList(), org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.saccept, と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.sblock.

00104 { 00105 RE re = new RE(range); 00106 addToSecureList(re, baccept); 00107 if (baccept) 00108 saccept.add(range); 00109 else 00110 sblock.add(range); 00111 }

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addToSecureList RE  range,
boolean  baccept
 

Add an ip range to the secure list

引数:
range to accept like 192.167.1.*
baccept true if accept false if block
ControllerSecurityManager.java87 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.accept, と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.block.

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addToSecureList().

00088 { 00089 if (baccept) 00090 accept.add(range); 00091 else 00092 block.add(range); 00093 }

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowConnection Socket  clientSocket  ) 
 

Check connection policy for a client socket

引数:
clientSocket that is trying to connect
戻り値:
true if connection is allowed, false otherwise
ControllerSecurityManager.java72 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.accept, org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.block, org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.checkList(), と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.defaultConnect.

00073 { 00074 if (checkList(accept, clientSocket)) 00075 return true; 00076 if (checkList(block, clientSocket)) 00077 return false; 00078 return defaultConnect; 00079 }

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.checkList ArrayList  list,
Socket  clientSocket
[static, private]
 

ControllerSecurityManager.java127 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowConnection().

00128 { 00129 String hostAddress = clientSocket.getInetAddress().getHostAddress(); 00130 String hostName = clientSocket.getInetAddress().getHostName(); 00131 String ipaddress = clientSocket.getInetAddress().toString(); 00132 Object o; 00133 RE re; 00134 String s; 00135 for (int i = 0; i < list.size(); i++) 00136 { 00137 o = list.get(i); 00138 if (o instanceof RE) 00139 { 00140 re = (RE) o; 00141 if (re.match(ipaddress)) 00142 return true; 00143 } 00144 if (o instanceof String) 00145 { 00146 s = (String) o; 00147 if (s.equalsIgnoreCase(hostAddress) || s.equalsIgnoreCase(hostName)) 00148 return true; 00149 } 00150 } 00151 return false; 00152 }

ArrayList org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAccept  ) 
 

戻り値:
Returns the accept.
ControllerSecurityManager.java269 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.accept.

00270 { 00271 return accept; 00272 }

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAllowAdditionalDriver  ) 
 

戻り値:
Returns the allowAdditionalDriver.
ControllerSecurityManager.java157 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowAdditionalDriver.

00158 { 00159 return allowAdditionalDriver; 00160 }

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAllowClientShutdown  ) 
 

戻り値:
Returns the allowClientShutdown.
ControllerSecurityManager.java173 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowClientShutdown.

00174 { 00175 return allowClientShutdown; 00176 }

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAllowConsoleShutdown  ) 
 

戻り値:
Returns the allowConsoleShutdown.
ControllerSecurityManager.java189 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowConsoleShutdown.

00190 { 00191 return allowConsoleShutdown; 00192 }

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAllowLocalClientOnly  ) 
 

戻り値:
Returns the allowLocalClientOnly.
ControllerSecurityManager.java205 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowLocalClientOnly.

00206 { 00207 return allowLocalClientOnly; 00208 }

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAllowLocalConsoleOnly  ) 
 

戻り値:
Returns the allowLocalConsoleOnly.
ControllerSecurityManager.java221 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowLocalConsoleOnly.

00222 { 00223 return allowLocalConsoleOnly; 00224 }

ArrayList org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getBlock  ) 
 

戻り値:
Returns the block.
ControllerSecurityManager.java277 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.block.

00278 { 00279 return block; 00280 }

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getDefaultConnect  ) 
 

戻り値:
Returns the defaultConnect.
ControllerSecurityManager.java237 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.defaultConnect.

00238 { 00239 return defaultConnect; 00240 }

ArrayList org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getSaccept  ) 
 

戻り値:
Returns the saccept.
ControllerSecurityManager.java253 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.saccept.

00254 { 00255 return saccept; 00256 }

ArrayList org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getSblock  ) 
 

戻り値:
Returns the sblock.
ControllerSecurityManager.java261 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.sblock.

00262 { 00263 return sblock; 00264 }

SSLConfiguration org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getSslConfig  ) 
 

Returns the sslConfig value.

戻り値:
Returns the sslConfig.
ControllerSecurityManager.java379 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.sslConfig.

参照元 org.objectweb.cjdbc.controller.core.ControllerServerThread.ControllerServerThread().

00380 { 00381 return sslConfig; 00382 }

String org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getXml  ) 
 

参照:
org.objectweb.cjdbc.common.xml.XmlComponent.getXml()
ControllerSecurityManager.java293 行で定義されています。
00294 { 00295 StringBuffer sb = new StringBuffer(); 00296 sb.append("<" + ControllerXmlTags.ELT_SECURITY + " " 00297 + ControllerXmlTags.ATT_DEFAULT_CONNECT + "=\"" 00298 + this.getDefaultConnect() + "\">"); 00299 00300 sb.append("<" + ControllerXmlTags.ELT_JAR + " " 00301 + ControllerXmlTags.ATT_ALLOW + "=\"" + this.getAllowAdditionalDriver() 00302 + "\"/>"); 00303 00304 sb.append("<" + ControllerXmlTags.ELT_SHUTDOWN + ">"); 00305 sb.append("<" + ControllerXmlTags.ELT_CLIENT + " " 00306 + ControllerXmlTags.ATT_ALLOW + "=\"" + this.getAllowClientShutdown() 00307 + "\" " + ControllerXmlTags.ATT_ONLY_LOCALHOST + "=\"" 00308 + this.getAllowLocalClientOnly() + "\" " + "/>"); 00309 sb.append("<" + ControllerXmlTags.ELT_CONSOLE + " " 00310 + ControllerXmlTags.ATT_ALLOW + "=\"" + this.getAllowConsoleShutdown() 00311 + "\" " + ControllerXmlTags.ATT_ONLY_LOCALHOST + "=\"" 00312 + this.getAllowLocalConsoleOnly() + "\" " + "/>"); 00313 sb.append("</" + ControllerXmlTags.ELT_SHUTDOWN + ">"); 00314 00315 sb.append("<" + ControllerXmlTags.ELT_ACCEPT + ">"); 00316 ArrayList list = this.getSaccept(); 00317 String tmp; 00318 for (int i = 0; i < list.size(); i++) 00319 { 00320 sb.append("<" + ControllerXmlTags.ELT_IPRANGE + " " 00321 + ControllerXmlTags.ATT_VALUE + "=\"" + list.get(i) + "\"/>"); 00322 } 00323 list = this.getAccept(); 00324 for (int i = 0; i < list.size(); i++) 00325 { 00326 if (list.get(i) instanceof RE) 00327 continue; 00328 tmp = (String) list.get(i); 00329 if (tmp.indexOf(".") == -1) 00330 sb.append("<" + ControllerXmlTags.ELT_HOSTNAME + " " 00331 + ControllerXmlTags.ATT_VALUE + "=\"" + tmp + "\"/>"); 00332 else 00333 sb.append("<" + ControllerXmlTags.ELT_IPADDRESS + " " 00334 + ControllerXmlTags.ATT_VALUE + "=\"" + tmp + "\"/>"); 00335 } 00336 sb.append("</" + ControllerXmlTags.ELT_ACCEPT + ">"); 00337 00338 sb.append("<" + ControllerXmlTags.ELT_BLOCK + ">"); 00339 list = this.getSblock(); 00340 for (int i = 0; i < list.size(); i++) 00341 { 00342 sb.append("<" + ControllerXmlTags.ELT_IPRANGE + " " 00343 + ControllerXmlTags.ATT_VALUE + "=\"" + list.get(i) + "\"/>"); 00344 } 00345 list = this.getBlock(); 00346 for (int i = 0; i < list.size(); i++) 00347 { 00348 if (list.get(i) instanceof RE) 00349 continue; 00350 tmp = (String) list.get(i); 00351 if (tmp.indexOf(".") == -1) 00352 sb.append("<" + ControllerXmlTags.ELT_HOSTNAME + " " 00353 + ControllerXmlTags.ATT_VALUE + "=\"" + tmp + "\"/>"); 00354 else 00355 sb.append("<" + ControllerXmlTags.ELT_IPADDRESS + " " 00356 + ControllerXmlTags.ATT_VALUE + "=\"" + tmp + "\"/>"); 00357 } 00358 sb.append("</" + ControllerXmlTags.ELT_BLOCK + ">"); 00359 00360 sb.append("</" + ControllerXmlTags.ELT_SECURITY + ">"); 00361 return sb.toString(); 00362 }

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.isSSLEnabled  ) 
 

is ssl enabled for this controller

戻り値:
Returns wether ssl is enabled or not
ControllerSecurityManager.java369 行で定義されています。

参照先 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.sslConfig.

参照元 org.objectweb.cjdbc.controller.core.ControllerServerThread.ControllerServerThread().

00370 { 00371 return sslConfig != null; 00372 }

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.setAllowAdditionalDriver boolean  allowAdditionalDriver  ) 
 

引数:
allowAdditionalDriver The allowAdditionalDriver to set.
ControllerSecurityManager.java165 行で定義されています。
00166 { 00167 this.allowAdditionalDriver = allowAdditionalDriver; 00168 }

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.setAllowClientShutdown boolean  allowClientShutdown  ) 
 

引数:
allowClientShutdown The allowClientShutdown to set.
ControllerSecurityManager.java181 行で定義されています。
00182 { 00183 this.allowClientShutdown = allowClientShutdown; 00184 }

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.setAllowConsoleShutdown boolean  allowConsoleShutdown  ) 
 

引数:
allowConsoleShutdown The allowConsoleShutdown to set.
ControllerSecurityManager.java197 行で定義されています。
00198 { 00199 this.allowConsoleShutdown = allowConsoleShutdown; 00200 }

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.setAllowLocalClientOnly boolean  allowLocalClientOnly  ) 
 

引数:
allowLocalClientOnly The allowLocalClientOnly to set.
ControllerSecurityManager.java213 行で定義されています。
00214 { 00215 this.allowLocalClientOnly = allowLocalClientOnly; 00216 }

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.setAllowLocalConsoleOnly boolean  allowLocalConsoleOnly  ) 
 

引数:
allowLocalConsoleOnly The allowLocalConsoleOnly to set.
ControllerSecurityManager.java229 行で定義されています。
00230 { 00231 this.allowLocalConsoleOnly = allowLocalConsoleOnly; 00232 }

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.setBlock ArrayList  block  ) 
 

引数:
block The block to set.
ControllerSecurityManager.java285 行で定義されています。
00286 { 00287 this.block = block; 00288 }

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.setDefaultConnect boolean  defaultConnect  ) 
 

引数:
defaultConnect The defaultConnect to set.
ControllerSecurityManager.java245 行で定義されています。
00246 { 00247 this.defaultConnect = defaultConnect; 00248 }

void org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.setSslConfig SSLConfiguration  sslConfig  ) 
 

Sets the sslConfig value.

引数:
sslConfig The sslConfig to set.
ControllerSecurityManager.java389 行で定義されています。
00390 { 00391 this.sslConfig = sslConfig; 00392 }


変数

ArrayList org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.accept [private]
 

ControllerSecurityManager.java49 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addHostToSecureList(), org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addToSecureList(), org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowConnection(), org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.ControllerSecurityManager(), と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAccept().

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowAdditionalDriver = true [private]
 

ControllerSecurityManager.java43 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAllowAdditionalDriver().

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowClientShutdown = true [private]
 

ControllerSecurityManager.java46 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAllowClientShutdown().

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowConsoleShutdown = true [private]
 

ControllerSecurityManager.java44 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAllowConsoleShutdown().

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowLocalClientOnly = true [private]
 

ControllerSecurityManager.java47 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAllowLocalClientOnly().

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowLocalConsoleOnly = true [private]
 

ControllerSecurityManager.java45 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getAllowLocalConsoleOnly().

ArrayList org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.block [private]
 

ControllerSecurityManager.java51 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addHostToSecureList(), org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addToSecureList(), org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowConnection(), org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.ControllerSecurityManager(), と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getBlock().

boolean org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.defaultConnect = true [private]
 

ControllerSecurityManager.java48 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.allowConnection(), と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getDefaultConnect().

ArrayList org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.saccept [private]
 

ControllerSecurityManager.java50 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addToSecureList(), org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.ControllerSecurityManager(), と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getSaccept().

ArrayList org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.sblock [private]
 

ControllerSecurityManager.java52 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.addToSecureList(), org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.ControllerSecurityManager(), と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getSblock().

SSLConfiguration org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.sslConfig [private]
 

ControllerSecurityManager.java53 行で定義されています。

参照元 org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.getSslConfig(), と org.objectweb.cjdbc.controller.core.security.ControllerSecurityManager.isSSLEnabled().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:41 2004に生成されました。 doxygen 1.3.8