Package com.alibaba.druid.wall
Class WallConfig
java.lang.Object
com.alibaba.druid.wall.WallConfig
- All Implemented Interfaces:
WallConfigMBean
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addReadOnlyTable
(String tableName) void
addUpdateCheckCoumns
(String columnInfo) void
configFromProperties
(Properties properties) getDir()
int
int
getUpdateCheckTable
(String tableName) final void
init()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isDenyFunction
(String name) boolean
isDenyObjects
(String name) boolean
isDenySchema
(String name) boolean
allow mysql describe statementboolean
boolean
boolean
boolean
boolean
isInited()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isReadOnly
(String tableName) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Deprecated.use isSelectAllowboolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isUpdateCheckTable
(String tableName) boolean
boolean
boolean
boolean
boolean
void
loadConfig
(String dir) void
setAlterTableAllow
(boolean alterTableAllow) void
setBlockAllow
(boolean blockAllow) void
setCallAllow
(boolean callAllow) void
setCaseConditionConstAllow
(boolean caseConditionConstAllow) void
setCommentAllow
(boolean commentAllow) void
setCommitAllow
(boolean commitAllow) void
setCompleteInsertValuesCheck
(boolean completeInsertValuesCheck) void
setConditionAndAlwayFalseAllow
(boolean conditionAndAlwayFalseAllow) void
setConditionAndAlwayTrueAllow
(boolean conditionAndAlwayTrueAllow) void
setConditionDoubleConstAllow
(boolean conditionDoubleConstAllow) void
setConditionLikeTrueAllow
(boolean conditionLikeTrueAllow) void
setConditionOpBitwseAllow
(boolean conditionOpBitwseAllow) void
setConditionOpXorAllow
(boolean conditionOpXorAllow) void
setConstArithmeticAllow
(boolean constArithmeticAllow) void
setCreateTableAllow
(boolean createTableAllow) void
setDeleteAllow
(boolean deleteAllow) void
setDeleteWhereAlwayTrueCheck
(boolean deleteWhereAlwayTrueCheck) void
setDeleteWhereNoneCheck
(boolean deleteWhereNoneCheck) void
setDescribeAllow
(boolean describeAllow) set allow mysql describe statementvoid
void
setDoPrivilegedAllow
(boolean doPrivilegedAllow) void
setDropTableAllow
(boolean dropTableAllow) void
setFunctionCheck
(boolean functionCheck) void
setHintAllow
(boolean hintAllow) void
setInited
(boolean inited) void
setInsertAllow
(boolean insertAllow) void
setInsertValuesCheckSize
(int insertValuesCheckSize) void
setIntersectAllow
(boolean intersectAllow) void
setLimitZeroAllow
(boolean limitZero) void
setLockTableAllow
(boolean lockTableAllow) void
setMergeAllow
(boolean mergeAllow) void
setMetadataAllow
(boolean metadataAllow) void
setMinusAllow
(boolean minusAllow) void
setMultiStatementAllow
(boolean multiStatementAllow) void
setMustParameterized
(boolean mustParameterized) void
setNoneBaseStatementAllow
(boolean noneBaseStatementAllow) void
setObjectCheck
(boolean objectCheck) void
setRenameTableAllow
(boolean renameTableAllow) void
setReplaceAllow
(boolean replaceAllow) void
setRollbackAllow
(boolean rollbackAllow) void
setSchemaCheck
(boolean schemaCheck) void
setSelectAllColumnAllow
(boolean selectAllColumnAllow) void
setSelectAllow
(boolean selelctAllow) void
setSelectExceptCheck
(boolean selectExceptCheck) void
setSelectHavingAlwayTrueCheck
(boolean selectHavingAlwayTrueCheck) void
setSelectIntersectCheck
(boolean selectIntersectCheck) void
setSelectIntoAllow
(boolean selectIntoAllow) void
setSelectIntoOutfileAllow
(boolean selectIntoOutfileAllow) void
setSelectLimit
(int selectLimit) void
setSelectMinusCheck
(boolean selectMinusCheck) void
setSelectUnionCheck
(boolean selectUnionCheck) void
setSelectWhereAlwayTrueCheck
(boolean selectWhereAlwayTrueCheck) void
setSelelctAllow
(boolean selelctAllow) Deprecated.use setSelelctAllowvoid
setSetAllow
(boolean value) void
setShowAllow
(boolean showAllow) void
setStartTransactionAllow
(boolean startTransactionAllow) void
setStrictSyntaxCheck
(boolean strictSyntaxCheck) void
setTableCheck
(boolean tableCheck) void
setTenantCallBack
(WallConfig.TenantCallBack tenantCallBack) void
setTenantColumn
(String tenantColumn) void
setTenantTablePattern
(String tenantTablePattern) void
setTruncateAllow
(boolean truncateAllow) void
setUpdateAllow
(boolean updateAllow) void
setUpdateCheckHandler
(WallUpdateCheckHandler updateCheckHandler) void
setUpdateWhereAlayTrueCheck
(boolean updateWhereAlayTrueCheck) void
setUpdateWhereNoneCheck
(boolean updateWhereNoneCheck) void
setUseAllow
(boolean useAllow) void
setVariantCheck
(boolean variantCheck) void
setWrapAllow
(boolean wrapAllow)
-
Field Details
-
denyFunctions
-
denyTables
-
denySchemas
-
denyVariants
-
denyObjects
-
permitFunctions
-
permitTables
-
permitSchemas
-
permitVariants
-
readOnlyTables
-
updateCheckColumns
-
updateCheckHandler
-
-
Constructor Details
-
WallConfig
public WallConfig() -
WallConfig
-
-
Method Details
-
isCaseConditionConstAllow
public boolean isCaseConditionConstAllow() -
setCaseConditionConstAllow
public void setCaseConditionConstAllow(boolean caseConditionConstAllow) -
isConditionDoubleConstAllow
public boolean isConditionDoubleConstAllow() -
setConditionDoubleConstAllow
public void setConditionDoubleConstAllow(boolean conditionDoubleConstAllow) -
isConditionLikeTrueAllow
public boolean isConditionLikeTrueAllow() -
setConditionLikeTrueAllow
public void setConditionLikeTrueAllow(boolean conditionLikeTrueAllow) -
isLimitZeroAllow
public boolean isLimitZeroAllow() -
setLimitZeroAllow
public void setLimitZeroAllow(boolean limitZero) -
isUseAllow
public boolean isUseAllow() -
setUseAllow
public void setUseAllow(boolean useAllow) -
isCommitAllow
public boolean isCommitAllow() -
setCommitAllow
public void setCommitAllow(boolean commitAllow) -
isRollbackAllow
public boolean isRollbackAllow() -
setRollbackAllow
public void setRollbackAllow(boolean rollbackAllow) -
isIntersectAllow
public boolean isIntersectAllow() -
setIntersectAllow
public void setIntersectAllow(boolean intersectAllow) -
isMinusAllow
public boolean isMinusAllow() -
setMinusAllow
public void setMinusAllow(boolean minusAllow) -
isConditionOpXorAllow
public boolean isConditionOpXorAllow() -
setConditionOpXorAllow
public void setConditionOpXorAllow(boolean conditionOpXorAllow) -
getTenantTablePattern
-
setTenantTablePattern
-
getTenantColumn
-
setTenantColumn
-
getTenantCallBack
-
setTenantCallBack
-
isMetadataAllow
public boolean isMetadataAllow() -
setMetadataAllow
public void setMetadataAllow(boolean metadataAllow) -
isWrapAllow
public boolean isWrapAllow() -
setWrapAllow
public void setWrapAllow(boolean wrapAllow) -
isDoPrivilegedAllow
public boolean isDoPrivilegedAllow() -
setDoPrivilegedAllow
public void setDoPrivilegedAllow(boolean doPrivilegedAllow) -
isSelectAllColumnAllow
public boolean isSelectAllColumnAllow() -
setSelectAllColumnAllow
public void setSelectAllColumnAllow(boolean selectAllColumnAllow) -
isInited
public boolean isInited()- Specified by:
isInited
in interfaceWallConfigMBean
-
getDir
- Specified by:
getDir
in interfaceWallConfigMBean
-
setDir
- Specified by:
setDir
in interfaceWallConfigMBean
-
init
public final void init()- Specified by:
init
in interfaceWallConfigMBean
-
loadConfig
- Specified by:
loadConfig
in interfaceWallConfigMBean
-
isNoneBaseStatementAllow
public boolean isNoneBaseStatementAllow()- Specified by:
isNoneBaseStatementAllow
in interfaceWallConfigMBean
-
setNoneBaseStatementAllow
public void setNoneBaseStatementAllow(boolean noneBaseStatementAllow) - Specified by:
setNoneBaseStatementAllow
in interfaceWallConfigMBean
-
isDescribeAllow
public boolean isDescribeAllow()allow mysql describe statement- Returns:
- Since:
- 0.2.10
-
setDescribeAllow
public void setDescribeAllow(boolean describeAllow) set allow mysql describe statement- Since:
- 0.2.10
-
isShowAllow
public boolean isShowAllow() -
setShowAllow
public void setShowAllow(boolean showAllow) -
isTruncateAllow
public boolean isTruncateAllow()- Specified by:
isTruncateAllow
in interfaceWallConfigMBean
-
setTruncateAllow
public void setTruncateAllow(boolean truncateAllow) - Specified by:
setTruncateAllow
in interfaceWallConfigMBean
-
isSelectIntoAllow
public boolean isSelectIntoAllow()- Specified by:
isSelectIntoAllow
in interfaceWallConfigMBean
-
setSelectIntoAllow
public void setSelectIntoAllow(boolean selectIntoAllow) - Specified by:
setSelectIntoAllow
in interfaceWallConfigMBean
-
isSelectIntoOutfileAllow
public boolean isSelectIntoOutfileAllow()- Specified by:
isSelectIntoOutfileAllow
in interfaceWallConfigMBean
-
setSelectIntoOutfileAllow
public void setSelectIntoOutfileAllow(boolean selectIntoOutfileAllow) - Specified by:
setSelectIntoOutfileAllow
in interfaceWallConfigMBean
-
isCreateTableAllow
public boolean isCreateTableAllow() -
setCreateTableAllow
public void setCreateTableAllow(boolean createTableAllow) -
isDropTableAllow
public boolean isDropTableAllow() -
setDropTableAllow
public void setDropTableAllow(boolean dropTableAllow) -
isAlterTableAllow
public boolean isAlterTableAllow() -
setAlterTableAllow
public void setAlterTableAllow(boolean alterTableAllow) -
isRenameTableAllow
public boolean isRenameTableAllow() -
setRenameTableAllow
public void setRenameTableAllow(boolean renameTableAllow) -
isSelectUnionCheck
public boolean isSelectUnionCheck()- Specified by:
isSelectUnionCheck
in interfaceWallConfigMBean
-
setSelectUnionCheck
public void setSelectUnionCheck(boolean selectUnionCheck) - Specified by:
setSelectUnionCheck
in interfaceWallConfigMBean
-
isSelectMinusCheck
public boolean isSelectMinusCheck() -
setSelectMinusCheck
public void setSelectMinusCheck(boolean selectMinusCheck) -
isSelectExceptCheck
public boolean isSelectExceptCheck() -
setSelectExceptCheck
public void setSelectExceptCheck(boolean selectExceptCheck) -
isSelectIntersectCheck
public boolean isSelectIntersectCheck() -
setSelectIntersectCheck
public void setSelectIntersectCheck(boolean selectIntersectCheck) -
isDeleteAllow
public boolean isDeleteAllow()- Specified by:
isDeleteAllow
in interfaceWallConfigMBean
-
setDeleteAllow
public void setDeleteAllow(boolean deleteAllow) - Specified by:
setDeleteAllow
in interfaceWallConfigMBean
-
isDeleteWhereNoneCheck
public boolean isDeleteWhereNoneCheck() -
setDeleteWhereNoneCheck
public void setDeleteWhereNoneCheck(boolean deleteWhereNoneCheck) -
isUpdateAllow
public boolean isUpdateAllow()- Specified by:
isUpdateAllow
in interfaceWallConfigMBean
-
setUpdateAllow
public void setUpdateAllow(boolean updateAllow) - Specified by:
setUpdateAllow
in interfaceWallConfigMBean
-
isUpdateWhereNoneCheck
public boolean isUpdateWhereNoneCheck() -
setUpdateWhereNoneCheck
public void setUpdateWhereNoneCheck(boolean updateWhereNoneCheck) -
isInsertAllow
public boolean isInsertAllow()- Specified by:
isInsertAllow
in interfaceWallConfigMBean
-
setInsertAllow
public void setInsertAllow(boolean insertAllow) - Specified by:
setInsertAllow
in interfaceWallConfigMBean
-
isReplaceAllow
public boolean isReplaceAllow() -
setReplaceAllow
public void setReplaceAllow(boolean replaceAllow) -
isSetAllow
public boolean isSetAllow() -
setSetAllow
public void setSetAllow(boolean value) -
isMergeAllow
public boolean isMergeAllow()- Specified by:
isMergeAllow
in interfaceWallConfigMBean
-
setMergeAllow
public void setMergeAllow(boolean mergeAllow) - Specified by:
setMergeAllow
in interfaceWallConfigMBean
-
isMultiStatementAllow
public boolean isMultiStatementAllow()- Specified by:
isMultiStatementAllow
in interfaceWallConfigMBean
-
setMultiStatementAllow
public void setMultiStatementAllow(boolean multiStatementAllow) - Specified by:
setMultiStatementAllow
in interfaceWallConfigMBean
-
isSchemaCheck
public boolean isSchemaCheck()- Specified by:
isSchemaCheck
in interfaceWallConfigMBean
-
setSchemaCheck
public void setSchemaCheck(boolean schemaCheck) - Specified by:
setSchemaCheck
in interfaceWallConfigMBean
-
isTableCheck
public boolean isTableCheck()- Specified by:
isTableCheck
in interfaceWallConfigMBean
-
setTableCheck
public void setTableCheck(boolean tableCheck) - Specified by:
setTableCheck
in interfaceWallConfigMBean
-
isFunctionCheck
public boolean isFunctionCheck()- Specified by:
isFunctionCheck
in interfaceWallConfigMBean
-
setFunctionCheck
public void setFunctionCheck(boolean functionCheck) - Specified by:
setFunctionCheck
in interfaceWallConfigMBean
-
isVariantCheck
public boolean isVariantCheck()- Specified by:
isVariantCheck
in interfaceWallConfigMBean
-
setVariantCheck
public void setVariantCheck(boolean variantCheck) - Specified by:
setVariantCheck
in interfaceWallConfigMBean
-
isObjectCheck
public boolean isObjectCheck()- Specified by:
isObjectCheck
in interfaceWallConfigMBean
-
setObjectCheck
public void setObjectCheck(boolean objectCheck) - Specified by:
setObjectCheck
in interfaceWallConfigMBean
-
isCommentAllow
public boolean isCommentAllow()- Specified by:
isCommentAllow
in interfaceWallConfigMBean
-
setCommentAllow
public void setCommentAllow(boolean commentAllow) - Specified by:
setCommentAllow
in interfaceWallConfigMBean
-
isStrictSyntaxCheck
public boolean isStrictSyntaxCheck() -
setStrictSyntaxCheck
public void setStrictSyntaxCheck(boolean strictSyntaxCheck) -
isConstArithmeticAllow
public boolean isConstArithmeticAllow() -
setConstArithmeticAllow
public void setConstArithmeticAllow(boolean constArithmeticAllow) -
getDenyFunctions
- Specified by:
getDenyFunctions
in interfaceWallConfigMBean
-
getDenyTables
- Specified by:
getDenyTables
in interfaceWallConfigMBean
-
getDenySchemas
- Specified by:
getDenySchemas
in interfaceWallConfigMBean
-
getDenyVariants
- Specified by:
getDenyVariants
in interfaceWallConfigMBean
-
getDenyObjects
- Specified by:
getDenyObjects
in interfaceWallConfigMBean
-
getReadOnlyTables
- Specified by:
getReadOnlyTables
in interfaceWallConfigMBean
-
addReadOnlyTable
-
isReadOnly
-
getPermitFunctions
-
getPermitTables
-
getPermitSchemas
-
getPermitVariants
-
isMustParameterized
public boolean isMustParameterized() -
setMustParameterized
public void setMustParameterized(boolean mustParameterized) -
isDenyObjects
- Specified by:
isDenyObjects
in interfaceWallConfigMBean
-
isDenySchema
- Specified by:
isDenySchema
in interfaceWallConfigMBean
-
isDenyFunction
- Specified by:
isDenyFunction
in interfaceWallConfigMBean
-
isCallAllow
public boolean isCallAllow() -
setCallAllow
public void setCallAllow(boolean callAllow) -
isHintAllow
public boolean isHintAllow() -
setHintAllow
public void setHintAllow(boolean hintAllow) -
isSelectAllow
public boolean isSelectAllow() -
setSelectAllow
public void setSelectAllow(boolean selelctAllow) -
isSelelctAllow
public boolean isSelelctAllow()Deprecated.use isSelectAllow- Specified by:
isSelelctAllow
in interfaceWallConfigMBean
-
setSelelctAllow
public void setSelelctAllow(boolean selelctAllow) Deprecated.use setSelelctAllow- Specified by:
setSelelctAllow
in interfaceWallConfigMBean
-
isSelectWhereAlwayTrueCheck
public boolean isSelectWhereAlwayTrueCheck()- Specified by:
isSelectWhereAlwayTrueCheck
in interfaceWallConfigMBean
-
setSelectWhereAlwayTrueCheck
public void setSelectWhereAlwayTrueCheck(boolean selectWhereAlwayTrueCheck) - Specified by:
setSelectWhereAlwayTrueCheck
in interfaceWallConfigMBean
-
isSelectHavingAlwayTrueCheck
public boolean isSelectHavingAlwayTrueCheck()- Specified by:
isSelectHavingAlwayTrueCheck
in interfaceWallConfigMBean
-
setSelectHavingAlwayTrueCheck
public void setSelectHavingAlwayTrueCheck(boolean selectHavingAlwayTrueCheck) - Specified by:
setSelectHavingAlwayTrueCheck
in interfaceWallConfigMBean
-
isConditionAndAlwayTrueAllow
public boolean isConditionAndAlwayTrueAllow() -
setConditionAndAlwayTrueAllow
public void setConditionAndAlwayTrueAllow(boolean conditionAndAlwayTrueAllow) -
isConditionAndAlwayFalseAllow
public boolean isConditionAndAlwayFalseAllow() -
setConditionAndAlwayFalseAllow
public void setConditionAndAlwayFalseAllow(boolean conditionAndAlwayFalseAllow) -
isDeleteWhereAlwayTrueCheck
public boolean isDeleteWhereAlwayTrueCheck()- Specified by:
isDeleteWhereAlwayTrueCheck
in interfaceWallConfigMBean
-
setDeleteWhereAlwayTrueCheck
public void setDeleteWhereAlwayTrueCheck(boolean deleteWhereAlwayTrueCheck) - Specified by:
setDeleteWhereAlwayTrueCheck
in interfaceWallConfigMBean
-
isUpdateWhereAlayTrueCheck
public boolean isUpdateWhereAlayTrueCheck()- Specified by:
isUpdateWhereAlayTrueCheck
in interfaceWallConfigMBean
-
setUpdateWhereAlayTrueCheck
public void setUpdateWhereAlayTrueCheck(boolean updateWhereAlayTrueCheck) - Specified by:
setUpdateWhereAlayTrueCheck
in interfaceWallConfigMBean
-
isConditionOpBitwseAllow
public boolean isConditionOpBitwseAllow() -
setConditionOpBitwseAllow
public void setConditionOpBitwseAllow(boolean conditionOpBitwseAllow) -
setInited
public void setInited(boolean inited) -
isLockTableAllow
public boolean isLockTableAllow() -
setLockTableAllow
public void setLockTableAllow(boolean lockTableAllow) -
isStartTransactionAllow
public boolean isStartTransactionAllow() -
setStartTransactionAllow
public void setStartTransactionAllow(boolean startTransactionAllow) -
isCompleteInsertValuesCheck
public boolean isCompleteInsertValuesCheck() -
setCompleteInsertValuesCheck
public void setCompleteInsertValuesCheck(boolean completeInsertValuesCheck) -
getInsertValuesCheckSize
public int getInsertValuesCheckSize() -
setInsertValuesCheckSize
public void setInsertValuesCheckSize(int insertValuesCheckSize) -
isBlockAllow
public boolean isBlockAllow() -
setBlockAllow
public void setBlockAllow(boolean blockAllow) -
getSelectLimit
public int getSelectLimit() -
setSelectLimit
public void setSelectLimit(int selectLimit) -
configFromProperties
-
addUpdateCheckCoumns
-
isUpdateCheckTable
-
getUpdateCheckTable
-
getUpdateCheckHandler
-
setUpdateCheckHandler
-