Revert "1:补充向阀门中添加特殊属性的业务 2:修改request获取ip的方式(前面接的有nginx直接用request.getRemoteAddr无法获取到)"

This reverts commit 736ec03da9.
This commit is contained in:
renkaige
2018-12-15 10:48:28 +06:00
parent 736ec03da9
commit 7ddf9fee13
10 changed files with 113 additions and 115 deletions

View File

@@ -10,5 +10,4 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.7

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="galaxy-service-Release-1.3">
<wb-module deploy-name="galaxy-service-0.0.1-SNAPSHOT">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>

View File

@@ -1,22 +1,2 @@
DELEGATES_PREFERENCE=delegateValidatorList
USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
USER_PREFERENCE=overrideGlobalPreferencesfalse
disabled=06target
eclipse.preferences.version=1
override=false
suspend=false
vals/org.eclipse.jst.jsf.facelet.ui.FaceletHTMLValidator/global=TF01
vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=TF01
vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=TF01
vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=TF01
vals/org.eclipse.jst.jsp.core.TLDValidator/global=TF01
vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=TF01
vals/org.eclipse.wst.html.core.HTMLValidator/global=TF01
vals/org.eclipse.wst.jsdt.core.JsValidator/global=TF01
vals/org.eclipse.wst.json.core.json/global=TF03
vals/org.eclipse.wst.wsdl.validation.wsdl/global=TF02158org.eclipse.wst.wsdl.validation.internal.eclipse.Validator
vals/org.eclipse.wst.xml.core.xml/global=TF03
vals/org.eclipse.wst.xsd.core.xsd/global=TF02162org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator
vals/org.eclipse.wst.xsl.core.xsl/global=TF02
vf.version=3

View File

@@ -209,7 +209,7 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<!-- <scope>test</scope> -->
<scope>test</scope>
</dependency>
<dependency>
@@ -537,10 +537,6 @@
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>

View File

@@ -1,6 +1,5 @@
package com.nis.domain.restful;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.nis.domain.LogEntity;
import com.wordnik.swagger.annotations.ApiModelProperty;
@@ -23,11 +22,6 @@ public class NtcCollectRadiusLog extends LogEntity<NtcCollectRadiusLog> {
protected String framedIp;
@ApiModelProperty(value="用户名", required=true)
protected String account;
protected String searchNasIp;//ISN接入的IP
protected String searchFramedIp;//服务器下发的用户地址
protected String searchAccount;//用户名
public Integer getCode() {
return code;
}
@@ -52,27 +46,6 @@ public class NtcCollectRadiusLog extends LogEntity<NtcCollectRadiusLog> {
public void setAccount(String account) {
this.account = account;
}
@JsonIgnore
public String getSearchNasIp() {
return searchNasIp;
}
public void setSearchNasIp(String searchNasIp) {
this.searchNasIp = searchNasIp;
}
@JsonIgnore
public String getSearchFramedIp() {
return searchFramedIp;
}
public void setSearchFramedIp(String searchFramedIp) {
this.searchFramedIp = searchFramedIp;
}
@JsonIgnore
public String getSearchAccount() {
return searchAccount;
}
public void setSearchAccount(String searchAccount) {
this.searchAccount = searchAccount;
}
}

View File

@@ -174,24 +174,9 @@ public class AuditLogThread implements Runnable {
return sb.toString();
}
public static String getIpAddr(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
return ip;
}
public static AuditLogThread getNewSaveRequestLogThread(HttpServletRequest request) {
AuditLogThread thread = new AuditLogThread();
thread.setRemoteAddr(getIpAddr(request));
thread.setRemoteAddr(request.getRemoteAddr());
thread.setRequestURI(request.getRequestURI());
if (request.getMethod().toLowerCase().equals("get")) {
thread.setQueryString(request.getQueryString());

View File

@@ -333,7 +333,7 @@ unMaatService=3:32;4:96;25:32;28:32;64;65;261:16;262:16;263:16;264:16;265:16;266
#0x402 APP DOMAIN特征发现 1026:2,5;
#0x404 APP IP特征 1028:2,5;
##########
serviceDBIndex=1:2,4,5;2:2,4,5;5:2,5;66:2,4,5;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;33:2,5;34:2;35:2;36:2;37:2;38:2;39:2;40:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;142:2;143:2;144:2;145:2;146:2;147:2;148:2;149:2;150:2;151:2;152:2;256:2;257:2;258:2;259:2;260:2;267:2;271:2;272:2;273:3;274:5;384:2;385:2;386:2;387:2;388:2;395:2;399:3;512:4,5;513:4,2,5;514:4,5;515:4,2,5;517:4,5;520:4;521:4;528:4;544:4;560:4;576:4;592:4;608:4;624:4;625:4;640:4;641:4;750:4;1024:2;1025:2;1026:2,5;1027:2;1028:2,5;1029:2;1030:2;1040:2,5;1041:2;1042:2;1056:2,5;1152:2;3:5;4:5;25:5;28:5;64:2;65:2;261:3;262:3;263:3;264:3;265:3;266:3;268:3;269:3;270:3;389:3;390:3;391:3;392:3;393:3;394:3;396:3;397:3;398:3;834:6;835:6;836:6
serviceDBIndex=1:2,4,5;2:2,4,5;5:2,5;66:2,4,5;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;33:2,5;34:2;35:2;36:2;37:2;38:2;39:2;40:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;142:2;143:2;144:2;145:2;146:2;147:2;148:2;149:2;150:2;151:2;152:2;256:2;257:2;258:2;259:2;260:2;267:2;271:2;272:2;273:3;274:5;384:2;385:2;386:2;387:2;388:2;395:2;399:3;512:4,5;513:4,2,5;514:4,5;515:4,2,5;517:4,5;520:4;521:4;528:4;544:4;560:4;576:4;592:4;608:4;624:4;625:4;640:4;641:4;750:4;1024:2;1025:2;1026:2,5;1027:2;1028:2,5;1029:2;1030:2;1040:2;1041:2;1042:2;1056:2;1152:2;3:5;4:5;25:5;28:5;64:2;65:2;261:3;262:3;263:3;264:3;265:3;266:3;268:3;269:3;270:3;389:3;390:3;391:3;392:3;393:3;394:3;396:3;397:3;398:3;834:6;835:6;836:6
##阀门配置在redisdb的序号
tapRedisDb=5
@@ -349,7 +349,7 @@ tapRedisDb=5
#0x205 基于PXY IP替换 517
#0x402 APP DOMAIN特征发现 1026
#0x404 APP IP特征 1028
maat2Valve=1:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;2:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;33:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;512:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;513:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;514:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;515:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;517:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1026:strRegion|strStrRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1028:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1040:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1056:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;5:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE&COMPILE_ID
maat2Valve=33:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;512:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;513:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;514:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;515:strRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;517:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1026:strRegion|strStrRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1028:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1040:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;1056:ipRegion@ACTION&SERVICE&USER_REGION&EFFECTIVE_RANGE;5:ipRegion@COMPILE_ID&USER_REGION&EFFECTIVE_RANGE
##记录哪些service可以被分组复用(只有maat类配置可以被分组复用)
#业务ID:域类型1@表名,表名|域类型2@表名;业务ID:域类型1@表名,表名|域类型2@表名

View File

@@ -52,7 +52,6 @@
<t:field fieldType="Number" srcName="isValid" dstName="is_valid" isRequired="true" regexp="[1]"/>
<t:field fieldType="Date" srcName="opTime" dstName="op_time" isRequired="true"/>
<t:field fieldType="String" srcName="userRegion" dstName="user_region" isRequired="true"/>
<t:field fieldType="String" srcName="effectiveRange" dstName="effective_range" defaultVal="0"/>
</t:commonSource>
<!--
#0x105 音频样例阻断 261=0:MM_SAMPLE_AUDIO

View File

@@ -1,21 +1,74 @@
#==========日志库 Mysql=======================
jdbc.log.driver=com.mysql.jdbc.Driver
#阿斯坦纳
jdbc.log.url=jdbc:mysql://10.0.4.9:3306/galaxy-service?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
jdbc.log.username=galaxy
#实际密码ceiec2018!
jdbc.log.key=73FU0t+Z8+PUxD/PArzvkQ==
jdbc.log.password=lKZSz7h4AIhgKJb2l2GBMw==
#元辰鑫内网
#jdbc.log.url=jdbc:mysql://10.0.6.249:3306/galaxy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
#华严
#jdbc.log.url=jdbc:mysql://192.168.11.242:3306/galaxy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
#元辰鑫外网-开发环境
jdbc.log.url=jdbc:mysql://192.168.10.204:3306/galaxy-dev?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
#元辰鑫外网
#jdbc.log.url=jdbc:mysql://192.168.10.204:3306/galaxy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
#亦庄演示环境
#jdbc.log.url=jdbc:mysql://10.3.48.5:3306/galaxy?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
jdbc.log.username=root
jdbc.log.key=9Pjh5K20Sho0lnWMClUXYA==
jdbc.log.password=D3ptWYX8vx/GoEXaSrJycQ==
#==================日志查询hive数据源信息==========================
#星汉hive数据源
#==========================================
#==========日志库 Oracle ======================
##jdbc.log.driver=oracle.jdbc.driver.OracleDriver
##jdbc.log.url=jdbc:oracle:thin:@10.0.6.104:1521:orcl
#jdbc.log.url=jdbc:oracle:thin:@10.174.196.22:1521:orcl
##jdbc.log.username=zdx
#jdbc.log.username=z2_5x9logb
##jdbc.log.key=pHl+0udycGQWNZcN68Sv9A==
##jdbc.log.password=Z/pVMDXcWNxzVGAX0yRp3Q==
#============================================
bonecp.idleMaxAgeInMinutes=60
bonecp.idleConnectionTestPeriodInMinutes=240
bonecp.maxConnectionsPerPartition=50
bonecp.minConnectionsPerPartition=10
bonecp.partitionCount=3
bonecp.acquireIncrement=5
bonecp.statementsCacheSize=100
############################################################################################################################################
#数据中心hive接口配置
############################################################################################################################################
#数据中心hive日志库数据库名称,程序中每次查询时使用的数据库名称 use dbName
#jdbc.hive.DBName=maat
#A版日志库
jdbc.hive.driver=org.apache.hive.jdbc.HiveDriver
#元辰鑫内网
#jdbc.hive.url=jdbc:hive2://10.0.6.202:10000/maat
#华严
#jdbc.hive.url=jdbc:hive2://192.168.11.243:2181,192.168.10.76:2181,192.168.10.77:2181/maat;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
#元辰鑫外网
#jdbc.hive.url=jdbc:hive2://192.168.10.22:10000/maat
#亦庄演示环境高可用集群连接,注意使用此种方法需要配置hosts,主机名与ip的对应关系
#jdbc.hive.url=jdbc:hive2://10.3.48.2:2181,10.3.48.3:2181,10.3.48.4:2181/maat;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
#jdbc.hive.username=xa_z2_mesa
#jdbc.hive.key=aC/8fTC9vfPVhCk+CDzbAQ==
#加密后密码
#jdbc.hive.password=V3GyFlG8Mg01bTt8ykFVaA==
#实际密码
#jdbc.hiveA.password=123!@#qwe
#星汉hive数据源
jdbc.hive.DBName=singhand_ntcstore
jdbc.hive.url=jdbc:hive2://218.76.55.165:30000/singhand_ntcstore
jdbc.hive.username=singhand
jdbc.hive.key=uKYTzWsRN1+X5Tt3W+CA4A==
jdbc.hive.password=f+IYYX73TPEqUp3fxLzxow==
bonecp.hive.idleMaxAgeInMinutes=60
bonecp.hive.idleConnectionTestPeriodInMinutes=240
bonecp.hive.maxConnectionsPerPartition=20
@@ -24,6 +77,7 @@ bonecp.hive.partitionCount=3
bonecp.hive.acquireIncrement=5
bonecp.hive.statementsCacheSize=100
#################日志查询clickhouse数据源信息#############
#日志查询是否使用clickhouse,否则使用hive
@@ -31,12 +85,28 @@ isUseClickHouse=true
##clickhouse数据库名称
jdbc.clickHouse.DBName=k18_ods
jdbc.clickhouse.driver=ru.yandex.clickhouse.ClickHouseDriver
#阿斯坦纳百分点的连接ip,需要配置域名与ip的对应关系10.4.41.109 clickhouse-read-ys.com
jdbc.clickhouse.url=jdbc:clickhouse://clickhouse-read-ys.com:80/k18_ods?socket_timeout=90000
jdbc.clickhouse.username=wall
#域名测试环境
#jdbc.clickhouse.url=jdbc:clickhouse://clickhouse.baifendian.com:80/k18_ods
#亦庄演示环境(阿斯坦纳)
#jdbc.clickhouse.url=jdbc:clickhouse://10.3.43.1:8123/k18_ods?socket_timeout=90000
#亦庄演示环境(阿拉木图)
#jdbc.clickhouse.url=jdbc:clickhouse://10.3.45.5:8123/k18_ods?socket_timeout=90000
#jdbc.clickhouse.username=wall
#jdbc.clickhouse.key=qRKvjMvQcZMq9IdJUa2rbw==
#实际密码k18
jdbc.clickhouse.key=jT4yKPwwg2J4JE/KUZknnA==
jdbc.clickhouse.password=XmaxnU2yLPQ5dpWjY3RDjQ==
#jdbc.clickhouse.password=kxBBKsR2qwyEYFJ8vLcKPA==
#华严账号密码同元辰鑫
#jdbc.clickhouse.url=jdbc:clickhouse://192.168.10.77:8123/k18_ods?socket_timeout=90000
#元辰鑫账号密码同华严
jdbc.clickhouse.url=jdbc:clickhouse://192.168.10.192:8123/k18_ods?socket_timeout=90000
jdbc.clickhouse.username=default
jdbc.clickhouse.key=aUkjs+fcwf6p4rDqHiC+ng==
jdbc.clickhouse.password=jOA3tbfJiJlPci6XUHIbVg==
#########################配置日志查询使用druid连接池#########################################
@@ -74,15 +144,21 @@ druid.log.maxOpenPreparedStatements=100
druid.log.filters=stat
#########################################################################
##minio地址
#########################################################################
##阿斯坦纳minio的地址,注意前面的http://不要忘记写
minio_url=http://10.0.7.7:9000
##亦庄测试地址,注意前面的http://不要忘记写
#minio_url=http://10.3.48.2:9001
##华严minio的地址,注意前面的http://不要忘记写
#minio_url=http://192.168.10.61:9000
##元辰鑫外网minio的地址,注意前面的http://不要忘记写
minio_url=http://192.168.10.205:9000
##minio的accessKey
minio_accessKey=minio
##minio的secretKey
minio_secretKey=k1BConfigMinio
minio_secretKey=123456789
##minio的bucketName
minio_bucketName=maat-redis
@@ -91,10 +167,19 @@ minio_bucketName=maat-redis
#####################################################################################################################################
##redis连接
#####################################################################################################################################
#阿斯坦纳
redis.hostAndPort1=10.0.7.1:26379
redis.hostAndPort2=10.0.7.2:26379
redis.hostAndPort3=10.0.7.3:26379
#元辰鑫内网
#redis.host=10.0.6.249
#华严
#redis.host=192.168.11.243
#元辰鑫外网-开发环境
redis.host=192.168.10.12
#元辰鑫外网
#redis.host=192.168.10.205
#亦庄测试环境
#redis.host=192.168.10.215
#亦庄演示环境
#redis.host=10.3.34.1
redis.port=6379
redis.pass=
#最大空闲连接数
redis.maxIdle=50
@@ -114,13 +199,8 @@ redis.timeout=100000
redis.maxRedirects=3
#3A-redis集群配置,如果需要执行数据同步需要在集群中执行LPUSH SyncRedisToCluster "1"
redis.cluster.host1=10.0.8.16
redis.cluster.host2=10.0.8.17
redis.cluster.host3=10.0.8.18
redis.cluster.host4=10.0.8.19
redis.cluster.host5=10.0.8.20
redis.cluster.host1=192.168.10.192
redis.cluster.host2=192.168.10.193
redis.cluster.port1=7001
redis.cluster.port2=7002
redis.cluster.port3=7003
redis.cluster.port4=7004

View File

@@ -1,21 +1,7 @@
操作系统运行环境linux7.0
文件摘要工具安装步骤:
1.将MESA.zip 拷贝opt目录下解压,执行update_env.sh
1.将MESA.zip 拷贝opt目录下解压执行update_env.sh
2.可将digest_gen拷贝到任何目录ldd digest_gen查看依赖包
执行命令如下:
./digest_gen -f /home/a.txt 结果如下:
/home/a.txt 21 1.154222
如果报错
vim /etc/ld.so.conf.d/MESA.conf
/opt/MESA/lib/
如果还不行在执行
source /etc/profile.d/MESA.sh
如果开机自启动或者无法执行的话在咱们的tomcat守护脚本里面加入
source ~/.bash_profile