From 7ddf9fee13168fa3e5f44b6a41b3f61925267bea Mon Sep 17 00:00:00 2001 From: renkaige Date: Sat, 15 Dec 2018 10:48:28 +0600 Subject: [PATCH] =?UTF-8?q?Revert=20"1:=E8=A1=A5=E5=85=85=E5=90=91?= =?UTF-8?q?=E9=98=80=E9=97=A8=E4=B8=AD=E6=B7=BB=E5=8A=A0=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E7=9A=84=E4=B8=9A=E5=8A=A1=202:=E4=BF=AE?= =?UTF-8?q?=E6=94=B9request=E8=8E=B7=E5=8F=96ip=E7=9A=84=E6=96=B9=E5=BC=8F?= =?UTF-8?q?(=E5=89=8D=E9=9D=A2=E6=8E=A5=E7=9A=84=E6=9C=89nginx=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E7=94=A8request.getRemoteAddr=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=88=B0)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 736ec03da9ce038970dc7c45913eb1c9f35a3d8d. --- .settings/org.eclipse.jdt.core.prefs | 1 - .settings/org.eclipse.wst.common.component | 2 +- .settings/org.eclipse.wst.validation.prefs | 20 --- pom.xml | 6 +- .../domain/restful/NtcCollectRadiusLog.java | 27 ---- .../com/nis/web/service/AuditLogThread.java | 17 +-- .../applicationConfig-rule.properties | 4 +- .../applicationConfig-parser.xml | 1 - src/main/resources/jdbc.properties | 134 ++++++++++++++---- src/main/webapp/maat-redis/readme.txt | 16 +-- 10 files changed, 113 insertions(+), 115 deletions(-) diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 31da221..9c4403f 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -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 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 9cb4c75..833f7d1 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -1,5 +1,5 @@ - + diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs index 5a03dac..04cad8c 100644 --- a/.settings/org.eclipse.wst.validation.prefs +++ b/.settings/org.eclipse.wst.validation.prefs @@ -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 diff --git a/pom.xml b/pom.xml index 81092fe..ff5fb3c 100644 --- a/pom.xml +++ b/pom.xml @@ -209,7 +209,7 @@ junit junit 4.12 - + test @@ -537,10 +537,6 @@ org.mortbay.jetty jsp-api-2.1 - - jdk.tools - jdk.tools - diff --git a/src/main/java/com/nis/domain/restful/NtcCollectRadiusLog.java b/src/main/java/com/nis/domain/restful/NtcCollectRadiusLog.java index 9496544..1c314f8 100644 --- a/src/main/java/com/nis/domain/restful/NtcCollectRadiusLog.java +++ b/src/main/java/com/nis/domain/restful/NtcCollectRadiusLog.java @@ -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 { 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 { 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; - } } diff --git a/src/main/java/com/nis/web/service/AuditLogThread.java b/src/main/java/com/nis/web/service/AuditLogThread.java index e6c5992..b8db811 100644 --- a/src/main/java/com/nis/web/service/AuditLogThread.java +++ b/src/main/java/com/nis/web/service/AuditLogThread.java @@ -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()); diff --git a/src/main/resources/applicationConfig-rule.properties b/src/main/resources/applicationConfig-rule.properties index b885a52..bfc8515 100644 --- a/src/main/resources/applicationConfig-rule.properties +++ b/src/main/resources/applicationConfig-rule.properties @@ -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@表名 diff --git a/src/main/resources/commonSources/applicationConfig-parser.xml b/src/main/resources/commonSources/applicationConfig-parser.xml index 0ee0931..9fa1bd0 100644 --- a/src/main/resources/commonSources/applicationConfig-parser.xml +++ b/src/main/resources/commonSources/applicationConfig-parser.xml @@ -52,7 +52,6 @@ -