|
@@ -1,5 +1,8 @@
|
|
|
package com.dragoninfo.dcuc.auth.audit.service.log;
|
|
|
|
|
|
+import com.dragoninfo.dcuc.auth.api.vo.zerotrust.authticate.DataAuthReqVO;
|
|
|
+import com.dragoninfo.dcuc.auth.api.vo.zerotrust.authticate.FunctionAuthReqVO;
|
|
|
+import com.dragoninfo.dcuc.auth.api.vo.zerotrust.authticate.ServiceAuthReqVO;
|
|
|
import com.dragoninfo.dcuc.auth.audit.config.AuditConfig;
|
|
|
import com.dragoninfo.dcuc.auth.audit.enums.AuthResultEnum;
|
|
|
import com.dragoninfo.dcuc.auth.auth.dto.*;
|
|
@@ -89,12 +92,30 @@ public class LogInfoFillService {
|
|
|
* @param userToken
|
|
|
* @param appToken
|
|
|
*/
|
|
|
+// @Async
|
|
|
+// public void sendFunAuthenticationLog(AuthResultEnum suc, RoleApiDto dto, List<AppFunInfoDTO> funs, String ip, String userToken, String appToken) {
|
|
|
+// if (!auditConfig.getKafka()) {
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// funAuthLogHandler.sendAuthenticationLog(suc, dto, funs, ip, userToken, appToken);
|
|
|
+// }
|
|
|
+ /**
|
|
|
+ * 2024-8-21 BU对接新规范
|
|
|
+ * @param suc
|
|
|
+ * @param dto
|
|
|
+ * @param funs
|
|
|
+ * @param ip
|
|
|
+ * @param userToken
|
|
|
+ * @param appToken
|
|
|
+ * @param message
|
|
|
+ * @param functionAuthReqVO
|
|
|
+ */
|
|
|
@Async
|
|
|
- public void sendFunAuthenticationLog(AuthResultEnum suc, RoleApiDto dto, List<AppFunInfoDTO> funs, String ip, String userToken, String appToken) {
|
|
|
+ public void sendFunAuthenticationLogV2(AuthResultEnum suc, RoleApiDto dto, List<AppFunInfoDTO> funs, String ip, String userToken, String appToken, FunctionAuthReqVO functionAuthReqVO, String message) {
|
|
|
if (!auditConfig.getKafka()) {
|
|
|
return;
|
|
|
}
|
|
|
- funAuthLogHandler.sendAuthenticationLog(suc, dto, funs, ip, userToken, appToken);
|
|
|
+ funAuthLogHandler.sendAuthenticationLogV2(suc, dto, funs, ip, userToken, appToken, functionAuthReqVO, message);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -116,12 +137,25 @@ public class LogInfoFillService {
|
|
|
/**
|
|
|
* 发送服务鉴权日志
|
|
|
*/
|
|
|
+// @Async
|
|
|
+// public void sendServiceAuthenticationLog(AuthResultEnum state, String idcard, String appCode, String userToken, String appToken, List<ServiceAuthResult> results, String ip) {
|
|
|
+// if (!auditConfig.getKafka()) {
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// serviceAuthLogHandler.sendAuthenticationLog(state, idcard, appCode, userToken, appToken, results, ip);
|
|
|
+// }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 发送服务鉴权日志V2
|
|
|
+ * @param message
|
|
|
+ * @param serviceAuthReqVO
|
|
|
+ */
|
|
|
@Async
|
|
|
- public void sendServiceAuthenticationLog(AuthResultEnum state, String idcard, String appCode, String userToken, String appToken, List<ServiceAuthResult> results, String ip) {
|
|
|
+ public void sendServiceAuthenticationLogV2(AuthResultEnum state, String idcard, String appCode, String userToken, String appToken, List<ServiceAuthResult> results, String ip, ServiceAuthReqVO serviceAuthReqVO, String message) {
|
|
|
if (!auditConfig.getKafka()) {
|
|
|
return;
|
|
|
}
|
|
|
- serviceAuthLogHandler.sendAuthenticationLog(state, idcard, appCode, userToken, appToken, results, ip);
|
|
|
+ serviceAuthLogHandler.sendAuthenticationLogV2(state, idcard, appCode, userToken, appToken, results, ip, serviceAuthReqVO, message);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -237,16 +271,46 @@ public class LogInfoFillService {
|
|
|
* @param appToken
|
|
|
* @param userToken
|
|
|
*/
|
|
|
+// @Async
|
|
|
+// public void sendDataAuthenticationLog(AuthResultEnum state, DataItemsCheckDto dataItemsCheckDto, String ip, String appToken, String userToken) {
|
|
|
+// if (!auditConfig.getKafka()) {
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// dataAuthLogHandler.sendAuthenticationLog(state, dataItemsCheckDto, ip, appToken, userToken);
|
|
|
+// }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 2024-8-21 BU对接新规范
|
|
|
+ * @param state
|
|
|
+ * @param dataItemsCheckDto
|
|
|
+ * @param ip
|
|
|
+ * @param appToken
|
|
|
+ * @param userToken
|
|
|
+ * @param dataAuthReqVO
|
|
|
+ * @param message
|
|
|
+ */
|
|
|
@Async
|
|
|
- public void sendDataAuthenticationLog(AuthResultEnum state, DataItemsCheckDto dataItemsCheckDto, String ip, String appToken, String userToken) {
|
|
|
+ public void sendDataAuthenticationLogV2(AuthResultEnum state, DataItemsCheckDto dataItemsCheckDto, String ip, String appToken, String userToken, DataAuthReqVO dataAuthReqVO, String message) {
|
|
|
if (!auditConfig.getKafka()) {
|
|
|
return;
|
|
|
}
|
|
|
- dataAuthLogHandler.sendAuthenticationLog(state, dataItemsCheckDto, ip, appToken, userToken);
|
|
|
+ dataAuthLogHandler.sendAuthenticationLogV2(state, dataItemsCheckDto, ip, appToken, userToken, dataAuthReqVO, message);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+// @Async
|
|
|
+// public void sendAppAuthenticationLog(ApiAppAuthVo apiAppAuthVo, List<AppDataSensitiveLevelDTO> appLitByUserId, AuthResultEnum resultEnum) {
|
|
|
+// appAuthLogHandler.sendAuthenticationLog(apiAppAuthVo, appLitByUserId, resultEnum);
|
|
|
+// }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 2024-8-21 BU对接新规范
|
|
|
+ * @param apiAppAuthVo
|
|
|
+ * @param appLitByUserId
|
|
|
+ * @param resultEnum
|
|
|
+ */
|
|
|
@Async
|
|
|
- public void sendAppAuthenticationLog(ApiAppAuthVo apiAppAuthVo, List<AppDataSensitiveLevelDTO> appLitByUserId, AuthResultEnum resultEnum) {
|
|
|
- appAuthLogHandler.sendAuthenticationLog(apiAppAuthVo, appLitByUserId, resultEnum);
|
|
|
+ public void sendAppAuthenticationLogV2(ApiAppAuthVo apiAppAuthVo, List<AppDataSensitiveLevelDTO> appLitByUserId, AuthResultEnum resultEnum, String message) {
|
|
|
+ appAuthLogHandler.sendAuthenticationLogV2(apiAppAuthVo, appLitByUserId, resultEnum, message);
|
|
|
}
|
|
|
}
|