chore(v0.11): 全路径纳入版本库与走查整改

- .gitignore:显式放行全部 maven-*、scripts、dev-support、frontend、反1、artifacts、历史导出目录
- 新增跟踪:device-manager/device-sdk/legacy-public、davinci-manager、cwos-*、cwos-resource 等源码与附属资源
- davinci FileStorageManagerImpl:Feign Response 关闭、绝对 URL 拉流 SSRF 校验(协议/主机/解析地址)
- davinci OuterCallFeignClient:补充契约说明
- cwos-common-aks AksConstant:final 类 + 私有构造防误实例化
- device-manager DeviceConstant:沿用 DEFAULT_APPLICATIONID 拼写修正

Made-with: Cursor
This commit is contained in:
反编译工作区
2026-04-24 23:54:05 +08:00
parent de6245a492
commit 0a34c76a82
3193 changed files with 227337 additions and 1 deletions
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.cloudwalk.cloud</groupId>
<artifactId>cwos-common-aks</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>cwos-common-aks-interface</artifactId>
<packaging>jar</packaging>
<name>cwos-common-aks-interface</name>
<dependencies>
<dependency>
<groupId>cn.cloudwalk.cloud</groupId>
<artifactId>cloudwalk-common-result</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,90 @@
package cn.cloudwalk.client.aks.auth.param;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Range;
public class RefreshTokenParam
implements Serializable
{
private static final long serialVersionUID = 3912210784246138959L;
private String token;
@NotNull(message = "56001036")
@Range(min = 1L, max = 2L, message = "56001037")
private Integer tokenType;
@NotNull(message = "56001038")
@Range(min = 1L, max = 2L, message = "56001039")
private Integer refreshType;
private Long accessTokenExp;
private Long refreshTokenExp;
public String getToken() {
return this.token;
}
public Integer getTokenType() {
return this.tokenType;
}
public Integer getRefreshType() {
return this.refreshType;
}
public Long getAccessTokenExp() {
return this.accessTokenExp;
}
public Long getRefreshTokenExp() {
return this.refreshTokenExp;
}
public void setToken(String token) {
this.token = token;
}
public void setTokenType(Integer tokenType) {
this.tokenType = tokenType;
}
public void setRefreshType(Integer refreshType) {
this.refreshType = refreshType;
}
public void setAccessTokenExp(Long accessTokenExp) {
this.accessTokenExp = accessTokenExp;
}
public void setRefreshTokenExp(Long refreshTokenExp) {
this.refreshTokenExp = refreshTokenExp;
}
}
@@ -0,0 +1,33 @@
package cn.cloudwalk.client.aks.auth.param;
import java.io.Serializable;
import org.hibernate.validator.constraints.NotEmpty;
public class ValidateTokenParam
implements Serializable
{
private static final long serialVersionUID = 3912210784246138959L;
@NotEmpty(message = "56001025")
private String token;
public String getToken() {
return this.token;
}
public void setToken(String token) {
this.token = token;
}
}
@@ -0,0 +1,41 @@
package cn.cloudwalk.client.aks.auth.result;
import java.io.Serializable;
public class TokenResult
implements Serializable
{
private static final long serialVersionUID = -216258600203811357L;
private String accessToken;
private String refreshToken;
public String getAccessToken() {
return this.accessToken;
}
public String getRefreshToken() {
return this.refreshToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
public void setRefreshToken(String refreshToken) {
this.refreshToken = refreshToken;
}
}
@@ -0,0 +1,19 @@
package cn.cloudwalk.client.aks.auth.service;
import cn.cloudwalk.client.aks.auth.param.RefreshTokenParam;
import cn.cloudwalk.client.aks.auth.param.ValidateTokenParam;
import cn.cloudwalk.client.aks.auth.result.TokenResult;
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
import cn.cloudwalk.cloud.exception.ServiceException;
import cn.cloudwalk.cloud.result.CloudwalkResult;
import com.alibaba.fastjson.JSONObject;
public interface AksAuthService {
CloudwalkResult<TokenResult> token(JSONObject paramJSONObject, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
CloudwalkResult<TokenResult> refreshToken(RefreshTokenParam paramRefreshTokenParam, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
CloudwalkResult<String> validateToken(ValidateTokenParam paramValidateTokenParam, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
}
@@ -0,0 +1,22 @@
package cn.cloudwalk.client.aks.common.constant;
public final class AksConstant {
private AksConstant() {}
public static final String API_KEY = "appKey";
public static final String SIGN = "sign";
public static final String NONCE = "nonceStr";
public static final String URI = "uri";
public static final String ACCESS_TOKEN_EXP = "accessTokenExp";
public static final String REFRESH_TOKEN_EXP = "refreshTokenExp";
public static final String AUTHORIZATION = "Authorization";
}
@@ -0,0 +1,85 @@
package cn.cloudwalk.client.aks.common.constant;
public class AksRespCodeConstant {
public static final String RESPONSE_SUCCESS = "00000000";
public static final String REQUEST_PARAM_ILLEGAL = "56001001";
public static final String AKS_CUST_ID_IS_NULL = "56001002";
public static final String AKS_CUST_ID_ILLEGAL = "56001003";
public static final String AKS_CUST_ID_EXIST = "56001004";
public static final String AKS_CUST_ID_NOT_EXIST = "56001005";
public static final String AKS_API_KEY_IS_NULL = "56001006";
public static final String AKS_API_KEY_ILLEGAL = "56001007";
public static final String AKS_KEY_TYPE_IS_NULL = "56001008";
public static final String AKS_KEY_TYPE_ILLEGAL = "56001009";
public static final String AKS_STATUS_ILLEGAL = "56001010";
public static final String AKS_RESET_TYPE_IS_NULL = "56001011";
public static final String AKS_RESET_TYPE_ILLEGAL = "56001012";
public static final String AKS_CUST_ID_API_KEY_NULL = "56001013";
public static final String AKS_API_KEY_NOT_EXIST = "56001014";
public static final String AKS_REMARK_ILLEGAL = "56001015";
public static final String AKS_ADD_FAIL = "56001016";
public static final String AKS_EDIT_FAIL = "56001017";
public static final String AKS_ENABLE_FAIL = "56001018";
public static final String AKS_DISABLE_FAIL = "56001019";
public static final String AKS_RESET_FAIL = "56001020";
public static final String AKS_QUERY_FAIL = "56001021";
public static final String AKS_KEY_TYPE_INFORMAL = "56001022";
public static final String MAKE_SIGNATURE_ERROR = "56001023";
public static final String CHECK_SIGNATURE_ERROR = "56001024";
public static final String AKS_TOKEN_IS_NULL = "56001025";
public static final String AKS_TOKEN_INVALID = "56001026";
public static final String AKS_TOKEN_EXPIRED = "56001027";
public static final String AKS_TOKEN_CANCELED = "56001028";
public static final String AKS_TOKEN_EXP_UNCONFIGURED = "56001029";
public static final String AKS_GET_TOKEN_FAIL = "56001030";
public static final String AKS_REFRESH_TOKEN_FAIL = "56001031";
public static final String AKS_VALIDATE_TOKEN_FAIL = "56001032";
public static final String AKS_APPLICATION_ID_IS_NULL = "56001033";
public static final String AKS_APPLICATION_ID_ILLEGAL = "56001034";
public static final String AKS_APPLICATION_ID_EXIST = "56001035";
public static final String AKS_TOKEN_TYPE_IS_NULL = "56001036";
public static final String AKS_TOKEN_TYPE_ILLEGAL = "56001037";
public static final String AKS_REFRESH_TYPE_IS_NULL = "56001038";
public static final String AKS_REFRESH_TYPE_ILLEGAL = "56001039";
}
@@ -0,0 +1,70 @@
package cn.cloudwalk.client.aks.common.en;
public enum GeneratorStatusEnum
{
ENABLE((short)
1, "启用"),
DISABLE((short)
2, "禁用");
private short code;
private String message;
GeneratorStatusEnum(short code, String message) {
this.code = code;
this.message = message;
}
public static GeneratorStatusEnum getEnumByCode(short code) {
byte b;
int i;
GeneratorStatusEnum[] arrayOfGeneratorStatusEnum;
for (i = (arrayOfGeneratorStatusEnum = values()).length, b = 0; b < i; ) { GeneratorStatusEnum item = arrayOfGeneratorStatusEnum[b];
if (item.getCode() == code) {
return item;
}
b++; }
return null;
}
public short getCode() {
return this.code;
}
public String getMessage() {
return this.message;
}
}
@@ -0,0 +1,51 @@
package cn.cloudwalk.client.aks.common.en;
public enum SecretKeyTypeEnum
{
FORMAL((short)
1, "正式"),
INFORMAL((short)
2, "试用");
private short code;
private String message;
SecretKeyTypeEnum(short code, String message) {
this.code = code;
this.message = message;
}
public short getCode() {
return this.code;
}
public String getMessage() {
return this.message;
}
}
@@ -0,0 +1,51 @@
package cn.cloudwalk.client.aks.common.en;
public enum SecretResetTypeEnum
{
RESET_SECRET_KEY((short)
1, "仅重置secretKey"),
RESET_BOTH((short)
2, "重置apiKey和secretKey");
private short code;
private String message;
SecretResetTypeEnum(short code, String message) {
this.code = code;
this.message = message;
}
public short getCode() {
return this.code;
}
public String getMessage() {
return this.message;
}
}
@@ -0,0 +1,67 @@
package cn.cloudwalk.client.aks.secret.param;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;
public class SecretEditParam
implements Serializable
{
private static final long serialVersionUID = 4521398828773425389L;
@NotBlank(message = "56001006")
@Size(max = 32, message = "56001007")
private String apiKey;
@NotNull(message = "56001008")
@Range(min = 1L, max = 2L, message = "56001009")
private Short keyType;
@Size(max = 255, message = "56001015")
public String remark;
public String getApiKey() {
return this.apiKey;
}
public Short getKeyType() {
return this.keyType;
}
public String getRemark() {
return this.remark;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public void setKeyType(Short keyType) {
this.keyType = keyType;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
@@ -0,0 +1,79 @@
package cn.cloudwalk.client.aks.secret.param;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.Range;
public class SecretNewParam
implements Serializable
{
private static final long serialVersionUID = 4521398828773425389L;
@Size(max = 32, message = "56001034")
private String applicationId;
@Size(max = 32, message = "56001003")
private String custId;
@NotNull(message = "56001008")
@Range(min = 1L, max = 2L, message = "56001009")
private Short keyType;
@Size(max = 255, message = "56001015")
public String remark;
public String getApplicationId() {
return this.applicationId;
}
public String getCustId() {
return this.custId;
}
public Short getKeyType() {
return this.keyType;
}
public String getRemark() {
return this.remark;
}
public void setApplicationId(String applicationId) {
this.applicationId = applicationId;
}
public void setCustId(String custId) {
this.custId = custId;
}
public void setKeyType(Short keyType) {
this.keyType = keyType;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
@@ -0,0 +1,91 @@
package cn.cloudwalk.client.aks.secret.param;
import java.io.Serializable;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.Range;
public class SecretQueryParam
implements Serializable
{
private static final long serialVersionUID = 3047192017544980227L;
@Size(max = 32, message = "56001034")
private String applicationId;
@Size(max = 32, message = "56001003")
private String custId;
@Size(max = 32, message = "56001007")
private String apiKey;
@Range(min = 1L, max = 2L, message = "56001009")
private Short keyType;
@Range(min = 1L, max = 2L, message = "56001010")
private Short status;
public String getApplicationId() {
return this.applicationId;
}
public String getCustId() {
return this.custId;
}
public String getApiKey() {
return this.apiKey;
}
public Short getKeyType() {
return this.keyType;
}
public Short getStatus() {
return this.status;
}
public void setApplicationId(String applicationId) {
this.applicationId = applicationId;
}
public void setCustId(String custId) {
this.custId = custId;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public void setKeyType(Short keyType) {
this.keyType = keyType;
}
public void setStatus(Short status) {
this.status = status;
}
}
@@ -0,0 +1,53 @@
package cn.cloudwalk.client.aks.secret.param;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;
public class SecretResetParam
implements Serializable
{
private static final long serialVersionUID = 3047192017544980227L;
@NotBlank(message = "56001006")
@Size(max = 32, message = "56001007")
private String apiKey;
@NotNull(message = "56001011")
@Range(min = 1L, max = 2L, message = "56001012")
private Short resetType;
public String getApiKey() {
return this.apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public Short getResetType() {
return this.resetType;
}
public void setResetType(Short resetType) {
this.resetType = resetType;
}
}
@@ -0,0 +1,36 @@
package cn.cloudwalk.client.aks.secret.param;
import java.io.Serializable;
import javax.validation.constraints.Size;
import org.hibernate.validator.constraints.NotBlank;
public class SecretStatusParam
implements Serializable
{
private static final long serialVersionUID = 3047192017544980227L;
@NotBlank(message = "56001006")
@Size(max = 32, message = "56001007")
private String apiKey;
public String getApiKey() {
return this.apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
}
@@ -0,0 +1,158 @@
package cn.cloudwalk.client.aks.secret.result;
import java.io.Serializable;
public class SecretInfoResult
implements Serializable
{
private static final long serialVersionUID = -3242495705978455158L;
private String apiKey;
private String secretKey;
private String applicationId;
private String custId;
private Short keyType;
private Short status;
private String remark;
private Long createTime;
private Long lastUpdateTime;
private String createUserId;
private String lastUpdateUserId;
public String getApiKey() {
/* 70 */ return this.apiKey;
}
public String getSecretKey() {
/* 74 */ return this.secretKey;
}
public String getApplicationId() {
/* 78 */ return this.applicationId;
}
public String getCustId() {
/* 82 */ return this.custId;
}
public Short getKeyType() {
/* 86 */ return this.keyType;
}
public Short getStatus() {
/* 90 */ return this.status;
}
public String getRemark() {
/* 94 */ return this.remark;
}
public void setApiKey(String apiKey) {
/* 98 */ this.apiKey = apiKey;
}
public void setSecretKey(String secretKey) {
this.secretKey = secretKey;
}
public void setApplicationId(String applicationId) {
this.applicationId = applicationId;
}
public void setCustId(String custId) {
this.custId = custId;
}
public void setKeyType(Short keyType) {
this.keyType = keyType;
}
public void setStatus(Short status) {
this.status = status;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Long getCreateTime() {
return this.createTime;
}
public Long getLastUpdateTime() {
return this.lastUpdateTime;
}
public String getCreateUserId() {
return this.createUserId;
}
public String getLastUpdateUserId() {
return this.lastUpdateUserId;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public void setLastUpdateTime(Long lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public void setLastUpdateUserId(String lastUpdateUserId) {
this.lastUpdateUserId = lastUpdateUserId;
}
}
@@ -0,0 +1,54 @@
package cn.cloudwalk.client.aks.secret.result;
import java.io.Serializable;
public class SecretValidateResult
implements Serializable
{
private static final long serialVersionUID = -3242495705978455158L;
private String applicationId;
private String custId;
private Short keyType;
public String getApplicationId() {
return this.applicationId;
}
public String getCustId() {
return this.custId;
}
public Short getKeyType() {
return this.keyType;
}
public void setApplicationId(String applicationId) {
this.applicationId = applicationId;
}
public void setCustId(String custId) {
this.custId = custId;
}
public void setKeyType(Short keyType) {
this.keyType = keyType;
}
}
@@ -0,0 +1,36 @@
package cn.cloudwalk.client.aks.secret.service;
import cn.cloudwalk.client.aks.secret.param.SecretEditParam;
import cn.cloudwalk.client.aks.secret.param.SecretNewParam;
import cn.cloudwalk.client.aks.secret.param.SecretQueryParam;
import cn.cloudwalk.client.aks.secret.param.SecretResetParam;
import cn.cloudwalk.client.aks.secret.param.SecretStatusParam;
import cn.cloudwalk.client.aks.secret.result.SecretInfoResult;
import cn.cloudwalk.client.aks.secret.result.SecretValidateResult;
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
import cn.cloudwalk.cloud.exception.ServiceException;
import cn.cloudwalk.cloud.result.CloudwalkResult;
import com.alibaba.fastjson.JSONObject;
import java.util.List;
public interface ApiSecretService {
CloudwalkResult<SecretInfoResult> add(SecretNewParam paramSecretNewParam, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
CloudwalkResult<Boolean> edit(SecretEditParam paramSecretEditParam, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
CloudwalkResult<Boolean> enable(SecretStatusParam paramSecretStatusParam, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
CloudwalkResult<Boolean> disable(SecretStatusParam paramSecretStatusParam, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
CloudwalkResult<SecretInfoResult> reset(SecretResetParam paramSecretResetParam, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
CloudwalkResult<List<SecretInfoResult>> query(SecretQueryParam paramSecretQueryParam, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
CloudwalkResult<SecretValidateResult> auth(JSONObject paramJSONObject, CloudwalkCallContext paramCloudwalkCallContext) throws ServiceException;
SecretInfoResult getApiSecret(String paramString) throws ServiceException;
SecretInfoResult getApiSecret(SecretQueryParam paramSecretQueryParam) throws ServiceException;
}