1、fakecc删去发来掩码
2、c3pzff的url和sso的url动态配置 3、修改application-test从环境变量获取配置
This commit is contained in:
@@ -47,11 +47,11 @@ def format_data_to_json(test_data):
|
||||
"protocol": protocol_v4,
|
||||
"event_id": data_parts[24],
|
||||
# test_data_2.split(",")[-7],
|
||||
"mask_src_ip": data_parts[5],
|
||||
"mask_dst_ip": data_parts[6],
|
||||
"mask_src_port": int(data_parts[7]),
|
||||
"mask_dst_ip": int(data_parts[8]),
|
||||
"mask_protocol": int(data_parts[9])
|
||||
# "mask_src_ip": data_parts[5],
|
||||
# "mask_dst_ip": data_parts[6],
|
||||
# "mask_src_port": int(data_parts[7]),
|
||||
# "mask_dst_ip": int(data_parts[8]),
|
||||
# "mask_protocol": int(data_parts[9])
|
||||
},
|
||||
"content": test_data
|
||||
}
|
||||
@@ -65,6 +65,8 @@ def delivery_report(err, msg):
|
||||
|
||||
conf = {
|
||||
'bootstrap.servers': "192.168.107.49:9092",
|
||||
# ‘bootstrap.servers’: '10.58.72.125:9092,10.58.72.126:9092,10.58.72.127:9092,10.58.72.128:9092,10.58.72.129:9092,\
|
||||
# 10.58.72.130:9092,10.58.72.131:9092,10.58.72.132:9092,10.58.72.133:9092,10.58.72.134:9092',
|
||||
'client.id': 'python-server'
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.realtime.protection.configuration.utils.enums.TaskTypeEnum;
|
||||
import com.realtime.protection.configuration.utils.enums.audit.AuditStatusEnum;
|
||||
import com.realtime.protection.server.command.CommandService;
|
||||
import com.realtime.protection.server.task.TaskService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.reactive.function.client.WebClient;
|
||||
import org.springframework.web.reactive.function.client.WebClientResponseException;
|
||||
@@ -19,8 +20,11 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
public class StateHandler {
|
||||
|
||||
@Value("${c3.pzff.host}")
|
||||
private String c3_pzff;
|
||||
private final WebClient client = WebClient.builder()
|
||||
.baseUrl("http://192.168.107.49:8088")
|
||||
// .baseUrl("http://192.168.107.49:8088")
|
||||
.baseUrl("http://"+c3_pzff)
|
||||
.build();
|
||||
|
||||
protected Boolean handleStart(TaskService taskService, CommandService commandService, Long taskId) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.apache.logging.log4j.util.Strings;
|
||||
|
||||
import javax.security.auth.login.LoginException;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
@@ -27,6 +28,9 @@ public class LoginService {
|
||||
|
||||
private final LoginMapper loginMapper;
|
||||
|
||||
@Value("${sso.host}")
|
||||
private String HostSSO;
|
||||
|
||||
public LoginService(LoginMapper loginMapper) {
|
||||
this.loginMapper = loginMapper;
|
||||
}
|
||||
@@ -50,7 +54,7 @@ public class LoginService {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
OkHttpClient client = new OkHttpClient();
|
||||
Request request = new Request.Builder()
|
||||
.url("http://114.243.134.122:9217/passport/accessToken?grant_type=client_credentials")
|
||||
.url("http://" + HostSSO + "/passport/accessToken?grant_type=client_credentials")
|
||||
.header("Authorization", "Basic TlNBRERAWlguT1JHOk14a1hHZ1ltOUNROUE3TCRSOCNLRW02R1pSeEhwd1c2")
|
||||
.post(okhttp3.internal.Util.EMPTY_REQUEST)
|
||||
.build();
|
||||
@@ -74,7 +78,7 @@ public class LoginService {
|
||||
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
|
||||
.addFormDataPart("sessionData", sessionData).build();
|
||||
request = new Request.Builder()
|
||||
.url("http://114.243.134.122:9217/passport/accessApplication")
|
||||
.url("http://" + HostSSO + "/passport/accessApplication")
|
||||
.header("Authorization", "Bearer " + accessToken)
|
||||
.header("Content-Type", "application/x-www-form-urlencoded")
|
||||
.post(body)
|
||||
|
||||
Reference in New Issue
Block a user