diff --git a/LICENSE b/LICENSE index b2d3628b..d6456956 100644 --- a/LICENSE +++ b/LICENSE @@ -200,90 +200,3 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -Apache Dubbo Submodules: - -Apache Dubbo includes a number of submodules with separate copyright notices -and license terms. Your use of these submodules is subject to the terms and -conditions of the following licenses. - -For the package org.apache.dubbo.common.threadlocal and org.apache.dubbo.common.timer: - -This product contains a modified portion of 'Netty', an event-driven asynchronous network application framework also - under a "Apache License 2.0" license, see https://github.com/netty/netty/blob/4.1/LICENSE.txt: - - * io.netty.util.concurrent.FastThreadLocal - * io.netty.util.internal.InternalThreadLocalMap - * io.netty.util.Timer - * io.netty.util.TimerTask - * io.netty.util.Timeout - * io.netty.util.HashedWheelTimer - -For the org.apache.dubbo.common.utils.CIDRUtils : - -This product contains a modified portion of 'edazdarevic.commons.net.CIDRUtils' published at -https://github.com/edazdarevic/CIDRUtils. The project is licensed under a MIT License: - * The MIT License - * - * Copyright (c) 2013 Edin Dazdarevic (edin.dazdarevic@gmail.com) - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - -For the file org.apache.dubbo.common.utils.Utf8Utils.java: - -This product contains a portion of the Protocol Buffers project, which is published at -https://developers.google.com/protocol-buffers/ and is licensed under the following License: - - Copyright 2008 Google Inc. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Code generated by the Protocol Buffer compiler is owned by the owner - of the input file used when generating it. This code is not - standalone and requires a support library to be linked with it. This - support library is itself covered by the above license. - -For the ca.proto in dubbo-registry-xds: - -This product contains a modified portion of 'Istio', an open platform to connect, manage, and secure microservices also - under a "Apache License 2.0" license, see https://github.com/istio/api/blob/master/LICENSE: - - * security/v1alpha1/ca.proto diff --git a/NOTICE b/NOTICE index c78b4c20..5896e2ac 100644 --- a/NOTICE +++ b/NOTICE @@ -1,7 +1,9 @@ - * 在使用本项目前,请您仔细阅读免责声明,确保您已充分理解其中的内容 + * 在使用本项目前,请您仔细阅读使用须知及免责声明,确保您已充分理解其中的内容 * 本项目采用 APACHE LICENSE 2.0 开源协议,如您需要源码的开发方式,需要遵循以下几点 1. 禁止修改或删除 LICENSE 文件。 - 2. 不可二次开发或参与同类竞品的开发。 + 2. 禁止修改或删除源码头部的版权声明。 3. 本项目可免费商业使用,商业使用请保留项目源码、出处、描述文件和作者声明等。 + 4. 分发源码时候,请注明软件出处 https://visor.orionsec.cn/ + 5. 不可二次开发或参与同类竞品的开发。 diff --git a/README.md b/README.md index 5872ebc4..68491941 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ * 🔗 演示地址: [https://dv.orionsec.cn/](https://dv.orionsec.cn/) * 🔏 演示账号: admin/admin -* ⭐ 体验后可以点一下 `star` 这对我很重要! [github](https://github.com/dromara/orion-visor) [gitee](https://gitee.com/dromara/orion-visor) [gitcode](https://gitcode.com/dromara/orion-visor/overview) +* ⭐ 体验后可以点一下 `star` 这对我很重要! [github](https://github.com/dromara/orion-visor) [gitee](https://gitee.com/dromara/orion-visor) [gitcode](https://gitcode.com/dromara/orion-visor/overview) * 🌈 如果本项目对你有帮助请帮忙推广一下 让更多的人知道此项目! * 🎭 演示环境部分功能不可用, 完整功能请本地部署! * 📛 演示环境请不要随便删除数据! @@ -117,9 +117,7 @@ docker compose up -d ## 联系我 -
- wx -
+wx 微信: ljh1553488 QQ群: 755242157 diff --git a/docker-compose-testing.yml b/docker-compose-testing.yml index 55fb74a1..2f9d537e 100644 --- a/docker-compose-testing.yml +++ b/docker-compose-testing.yml @@ -1,7 +1,7 @@ version: '3.3' services: service: - image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.7 + image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.8 privileged: true ports: - 1081:80 @@ -32,7 +32,7 @@ services: - mysql - redis mysql: - image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.7 + image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.8 privileged: true ports: - 3307:3306 @@ -52,7 +52,7 @@ services: retries: 10 start_period: 3s redis: - image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.7 + image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.8 privileged: true ports: - 6380:6379 diff --git a/docker-compose.yml b/docker-compose.yml index f146e196..663f23ee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.3' services: service: - image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.7 + image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.8 privileged: true ports: - ${SERVICE_PORT:-1081}:80 @@ -32,7 +32,7 @@ services: - mysql - redis mysql: - image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.7 + image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.8 privileged: true ports: - 3307:3306 @@ -52,7 +52,7 @@ services: retries: 15 start_period: 3s redis: - image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.7 + image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.8 privileged: true ports: - 6380:6379 @@ -68,7 +68,7 @@ services: retries: 15 start_period: 3s adminer: - image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:2.1.7 + image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:2.1.8 ports: - 8081:8080 depends_on: diff --git a/docker/adminer/build.sh b/docker/adminer/build.sh index 76a4e5ab..7ccbb6c1 100644 --- a/docker/adminer/build.sh +++ b/docker/adminer/build.sh @@ -1,4 +1,4 @@ #/bin/bash -version=2.1.7 +version=2.1.8 docker build -t orion-visor-adminer:${version} . docker tag orion-visor-adminer:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:${version} diff --git a/docker/mysql/build.sh b/docker/mysql/build.sh index 6b4c62f4..5b7b42b4 100644 --- a/docker/mysql/build.sh +++ b/docker/mysql/build.sh @@ -1,5 +1,5 @@ #/bin/bash -version=2.1.7 +version=2.1.8 cp -r ../../sql ./sql docker build -t orion-visor-mysql:${version} . rm -rf ./sql diff --git a/docker/push.sh b/docker/push.sh index 37e0dfa6..a820b3a8 100644 --- a/docker/push.sh +++ b/docker/push.sh @@ -1,5 +1,5 @@ #/bin/bash -version=2.1.7 +version=2.1.8 docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-adminer:${version} docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:${version} docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version} diff --git a/docker/redis/build.sh b/docker/redis/build.sh index b7f0e250..7cb39f68 100644 --- a/docker/redis/build.sh +++ b/docker/redis/build.sh @@ -1,4 +1,4 @@ #/bin/bash -version=2.1.7 +version=2.1.8 docker build -t orion-visor-redis:${version} . docker tag orion-visor-redis:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version} diff --git a/docker/service/build.sh b/docker/service/build.sh index a664989b..b76c0352 100644 --- a/docker/service/build.sh +++ b/docker/service/build.sh @@ -1,5 +1,5 @@ #/bin/bash -version=2.1.7 +version=2.1.8 mv ../../orion-visor-launch/target/orion-visor-launch.jar ./orion-visor-launch.jar mv ../../orion-visor-ui/dist ./dist docker build -t orion-visor-service:${version} . diff --git a/orion-visor-dependencies/pom.xml b/orion-visor-dependencies/pom.xml index 88948e66..0b0f5167 100644 --- a/orion-visor-dependencies/pom.xml +++ b/orion-visor-dependencies/pom.xml @@ -14,11 +14,11 @@ https://github.com/dromara/orion-visor - 2.1.7 + 2.1.8 2.7.17 2.7.15 1.5.0 - 1.0.8 + 1.0.9 1.9.7 1.18.26 1.6.15 diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/configuration/OrionCommonAutoConfiguration.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/configuration/OrionCommonAutoConfiguration.java index 2ba8b6f0..479da905 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/configuration/OrionCommonAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/configuration/OrionCommonAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.configuration; import com.orion.spring.SpringHolder; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/configuration/config/AsyncExecutorConfig.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/configuration/config/AsyncExecutorConfig.java index 2a3eec69..863de2b2 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/configuration/config/AsyncExecutorConfig.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/configuration/config/AsyncExecutorConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.configuration.config; import lombok.Data; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/AppConst.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/AppConst.java index bf927fef..c2393ab9 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/AppConst.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/AppConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; import com.orion.lang.constant.OrionConst; @@ -14,7 +29,7 @@ public interface AppConst extends OrionConst { /** * 同 ${orion.version} 迭代时候需要手动更改 */ - String VERSION = "2.1.7"; + String VERSION = "2.1.8"; /** * 同 ${spring.application.name} diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/AutoConfigureOrderConst.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/AutoConfigureOrderConst.java index 95daa8a2..01b250f4 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/AutoConfigureOrderConst.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/AutoConfigureOrderConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/BeanOrderConst.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/BeanOrderConst.java index e7446b3c..e2303290 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/BeanOrderConst.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/BeanOrderConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/CnConst.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/CnConst.java index 61d6e8ad..cdb27540 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/CnConst.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/CnConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/Const.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/Const.java index 7ec76752..30cd0d42 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/Const.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/Const.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ErrorCode.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ErrorCode.java index ea012bce..3318d6b2 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ErrorCode.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ErrorCode.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; import com.orion.lang.define.wrapper.CodeInfo; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ErrorMessage.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ErrorMessage.java index 64e9d45c..825d0e0b 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ErrorMessage.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ErrorMessage.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; import com.orion.lang.exception.ApplicationException; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ExtraFieldConst.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ExtraFieldConst.java index e8c4c48d..9263aec8 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ExtraFieldConst.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ExtraFieldConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FieldConst.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FieldConst.java index 71a6ab0e..375396e6 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FieldConst.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FieldConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; /** @@ -61,6 +76,8 @@ public interface FieldConst { String TIME = "time"; + String TEXT = "text"; + String ISSUE = "issue"; String EXPIRE = "expire"; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FileConst.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FileConst.java index 0f133894..b3b28696 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FileConst.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FileConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FilterOrderConst.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FilterOrderConst.java index a3c3dff4..c9a77569 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FilterOrderConst.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/FilterOrderConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ValidConst.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ValidConst.java index 5bf2d5c4..f70b74c9 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ValidConst.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/constant/ValidConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.constant; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/crypto/ValueCrypto.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/crypto/ValueCrypto.java index 5d7720f6..22cba8bb 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/crypto/ValueCrypto.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/crypto/ValueCrypto.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.crypto; import com.orion.lang.utils.codec.Base62s; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/AutoClearConfig.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/AutoClearConfig.java index d98f2e70..908f521f 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/AutoClearConfig.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/AutoClearConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.entity; import lombok.Data; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/DataClearRequest.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/DataClearRequest.java index f9ff7de7..acfba6b7 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/DataClearRequest.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/DataClearRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.entity; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/PageRequest.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/PageRequest.java index edbad702..64f0b7ab 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/PageRequest.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/PageRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.entity; import com.orion.visor.framework.common.validator.group.Page; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/RequestIdentity.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/RequestIdentity.java index 0fc35b1b..c4187dd2 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/RequestIdentity.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/RequestIdentity.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.entity; import java.io.Serializable; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/RequestIdentityModel.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/RequestIdentityModel.java index 8e4ccd80..bae800ac 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/RequestIdentityModel.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/RequestIdentityModel.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.entity; import lombok.Data; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/TreeNode.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/TreeNode.java index 48dce1b0..35e5d97d 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/TreeNode.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/entity/TreeNode.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.entity; import java.util.List; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/BooleanBit.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/BooleanBit.java index b09340ae..a29e288e 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/BooleanBit.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/BooleanBit.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/EnableStatus.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/EnableStatus.java index f2740bca..b9048308 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/EnableStatus.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/EnableStatus.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/EndpointDefine.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/EndpointDefine.java index e0025c08..f68afbcd 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/EndpointDefine.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/EndpointDefine.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.enums; import com.orion.lang.utils.Strings; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/MovePosition.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/MovePosition.java index 2d736829..6f916dcc 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/MovePosition.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/enums/MovePosition.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/file/FileClient.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/file/FileClient.java index 10bcc941..c4a802c2 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/file/FileClient.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/file/FileClient.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.file; import java.io.InputStream; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/GenericsDataDefinition.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/GenericsDataDefinition.java index 9bddaa81..83aba0b0 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/GenericsDataDefinition.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/GenericsDataDefinition.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.handler.data; import com.orion.spring.SpringHolder; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/model/GenericsDataModel.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/model/GenericsDataModel.java index ab068d5f..5c768a26 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/model/GenericsDataModel.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/model/GenericsDataModel.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.handler.data.model; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/strategy/AbstractGenericsDataStrategy.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/strategy/AbstractGenericsDataStrategy.java index 11c74a56..09092ba3 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/strategy/AbstractGenericsDataStrategy.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/strategy/AbstractGenericsDataStrategy.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.handler.data.strategy; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/strategy/GenericsDataStrategy.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/strategy/GenericsDataStrategy.java index 4378269e..28cd6558 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/strategy/GenericsDataStrategy.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/handler/data/strategy/GenericsDataStrategy.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.handler.data.strategy; import com.orion.visor.framework.common.handler.data.model.GenericsDataModel; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/json/filter/FieldDesensitizeFilter.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/json/filter/FieldDesensitizeFilter.java index 22158622..82a2c226 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/json/filter/FieldDesensitizeFilter.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/json/filter/FieldDesensitizeFilter.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.json.filter; import com.alibaba.fastjson.serializer.ValueFilter; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/json/filter/FieldIgnoreFilter.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/json/filter/FieldIgnoreFilter.java index d1ae0af6..38ac796e 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/json/filter/FieldIgnoreFilter.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/json/filter/FieldIgnoreFilter.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.json.filter; import com.alibaba.fastjson.serializer.PropertyFilter; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/lock/Locker.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/lock/Locker.java index cb1c4ed9..d41c1b35 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/lock/Locker.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/lock/Locker.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.lock; import java.util.function.Supplier; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/meta/TraceIdHolder.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/meta/TraceIdHolder.java index dae1375b..c1489209 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/meta/TraceIdHolder.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/meta/TraceIdHolder.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.meta; import com.alibaba.ttl.TransmittableThreadLocal; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/LoginUser.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/LoginUser.java index 27a6c609..d08f306a 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/LoginUser.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/LoginUser.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.security; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/PasswordModifier.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/PasswordModifier.java index 46806ecf..fbc688c7 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/PasswordModifier.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/PasswordModifier.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.security; import com.orion.lang.utils.Booleans; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/SecurityHolder.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/SecurityHolder.java index bce17014..0ffccbb4 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/SecurityHolder.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/SecurityHolder.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.security; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/UpdatePasswordAction.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/UpdatePasswordAction.java index 0f634880..6b80824f 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/UpdatePasswordAction.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/UpdatePasswordAction.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.security; import java.io.Serializable; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/UserRole.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/UserRole.java index 93a640b6..858e03b5 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/UserRole.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/security/UserRole.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.security; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/thread/ThreadPoolMdcTaskExecutor.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/thread/ThreadPoolMdcTaskExecutor.java index a1eca616..2398ecac 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/thread/ThreadPoolMdcTaskExecutor.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/thread/ThreadPoolMdcTaskExecutor.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.thread; import com.orion.visor.framework.common.utils.ThreadMdcUtils; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/ConfigUtils.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/ConfigUtils.java index 04f8e298..6bb7236c 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/ConfigUtils.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/ConfigUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.lang.constant.Const; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/CryptoUtils.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/CryptoUtils.java index 0b505a14..14842110 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/CryptoUtils.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/CryptoUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.lang.utils.Exceptions; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/FileClientUtils.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/FileClientUtils.java index 2f6a431b..1f0889f9 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/FileClientUtils.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/FileClientUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.lang.utils.Exceptions; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/FileNames.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/FileNames.java index 55baa231..d6ee0408 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/FileNames.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/FileNames.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.lang.utils.time.Dates; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/IpUtils.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/IpUtils.java index 3a4c7e0a..569d2f7d 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/IpUtils.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/IpUtils.java @@ -1,9 +1,22 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.ext.location.Region; import com.orion.ext.location.region.LocationRegions; -import com.orion.lang.constant.StandardHttpHeader; -import com.orion.lang.utils.Strings; import com.orion.visor.framework.common.constant.Const; import com.orion.web.servlet.web.Servlets; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/LockerUtils.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/LockerUtils.java index db856955..d10b7528 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/LockerUtils.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/LockerUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.lang.utils.Exceptions; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/PathUtils.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/PathUtils.java index b361d857..43e3373c 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/PathUtils.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/PathUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.lang.utils.Objects1; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/Requests.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/Requests.java index 6757dd38..bb526352 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/Requests.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/Requests.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.visor.framework.common.entity.RequestIdentity; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/SqlUtils.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/SqlUtils.java index bf589fd0..29427d31 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/SqlUtils.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/SqlUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.visor.framework.common.constant.Const; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/SwaggerUtils.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/SwaggerUtils.java index 5af72c16..c6ff0a30 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/SwaggerUtils.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/SwaggerUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.lang.utils.collect.Maps; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/ThreadMdcUtils.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/ThreadMdcUtils.java index 140d1bef..d11e5d63 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/ThreadMdcUtils.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/ThreadMdcUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.visor.framework.common.meta.TraceIdHolder; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/TreeUtils.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/TreeUtils.java index 5da50622..42a839cc 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/TreeUtils.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/TreeUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.lang.utils.collect.Lists; diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/Valid.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/Valid.java index 38d41cf8..6149d6fd 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/Valid.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/utils/Valid.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.utils; import com.orion.lang.utils.Arrays1; @@ -28,6 +43,10 @@ public class Valid extends com.orion.lang.utils.Valid { return notNull(object, ErrorMessage.PARAM_MISSING); } + public static T isNull(T object) { + return isNull(object, ErrorMessage.PARAM_ERROR); + } + public static String notBlank(String s) { return notBlank(s, ErrorMessage.PARAM_MISSING); } diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Batch.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Batch.java index 16aa11ab..b0e2f197 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Batch.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Batch.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.validator.group; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Clear.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Clear.java index d5b6a285..cc551a6e 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Clear.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Clear.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.validator.group; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Export.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Export.java index 17c681e8..164a61be 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Export.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Export.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.validator.group; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Id.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Id.java index 07e07a05..15cacefd 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Id.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Id.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.validator.group; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Import.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Import.java index de59d240..c9d8ec38 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Import.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Import.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.validator.group; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Page.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Page.java index 7fc444a3..b0774853 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Page.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/validator/group/Page.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.validator.group; /** diff --git a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/web/filter/FilterCreator.java b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/web/filter/FilterCreator.java index f7e303d9..59396ea1 100644 --- a/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/web/filter/FilterCreator.java +++ b/orion-visor-framework/orion-visor-framework-common/src/main/java/com/orion/visor/framework/common/web/filter/FilterCreator.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.common.web.filter; import org.springframework.boot.web.servlet.FilterRegistrationBean; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-banner/src/main/java/com/orion/visor/framework/banner/configuration/OrionBannerAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-banner/src/main/java/com/orion/visor/framework/banner/configuration/OrionBannerAutoConfiguration.java index 5290e312..e7a12d08 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-banner/src/main/java/com/orion/visor/framework/banner/configuration/OrionBannerAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-banner/src/main/java/com/orion/visor/framework/banner/configuration/OrionBannerAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.banner.configuration; import com.orion.visor.framework.banner.core.runner.BannerApplicationRunner; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-banner/src/main/java/com/orion/visor/framework/banner/core/runner/BannerApplicationRunner.java b/orion-visor-framework/orion-visor-spring-boot-starter-banner/src/main/java/com/orion/visor/framework/banner/core/runner/BannerApplicationRunner.java index b9ca36df..0219090d 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-banner/src/main/java/com/orion/visor/framework/banner/core/runner/BannerApplicationRunner.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-banner/src/main/java/com/orion/visor/framework/banner/core/runner/BannerApplicationRunner.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.banner.core.runner; import com.orion.lang.utils.Threads; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/configuration/OrionOperatorLogAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/configuration/OrionOperatorLogAutoConfiguration.java index f9645c60..f0217a66 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/configuration/OrionOperatorLogAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/configuration/OrionOperatorLogAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.configuration; import com.alibaba.fastjson.serializer.SerializeFilter; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/configuration/config/OperatorLogConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/configuration/config/OperatorLogConfig.java index 8021a8bd..49581962 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/configuration/config/OperatorLogConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/configuration/config/OperatorLogConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.configuration.config; import com.orion.visor.framework.common.utils.ConfigUtils; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/IgnoreParameter.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/IgnoreParameter.java index 68ce038e..b11ba8d6 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/IgnoreParameter.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/IgnoreParameter.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.annotation; import java.lang.annotation.*; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/Module.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/Module.java index 7ba80d81..b6735c90 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/Module.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/Module.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.annotation; import org.springframework.stereotype.Component; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/OperatorLog.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/OperatorLog.java index fb6161a3..f3788a17 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/OperatorLog.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/annotation/OperatorLog.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.annotation; import com.orion.visor.framework.biz.operator.log.core.enums.ReturnType; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/aspect/OperatorLogAspect.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/aspect/OperatorLogAspect.java index daefca11..29171c02 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/aspect/OperatorLogAspect.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/aspect/OperatorLogAspect.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.aspect; import com.orion.lang.define.thread.ExecutorBuilder; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/enums/OperatorRiskLevel.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/enums/OperatorRiskLevel.java index f63c3f58..1b7f1564 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/enums/OperatorRiskLevel.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/enums/OperatorRiskLevel.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.enums; import lombok.Getter; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/enums/ReturnType.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/enums/ReturnType.java index c386ff9e..99353c50 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/enums/ReturnType.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/enums/ReturnType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.enums; /** diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/InitializingOperatorTypes.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/InitializingOperatorTypes.java index 527b64c9..6d5eb6bd 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/InitializingOperatorTypes.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/InitializingOperatorTypes.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.factory; import com.orion.lang.utils.Arrays1; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/OperatorTypeDefinition.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/OperatorTypeDefinition.java index bc9eb968..d8d7c856 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/OperatorTypeDefinition.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/OperatorTypeDefinition.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.factory; import com.orion.visor.framework.biz.operator.log.core.model.OperatorType; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/OperatorTypeHolder.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/OperatorTypeHolder.java index aa37b8cd..5640a6d4 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/OperatorTypeHolder.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/factory/OperatorTypeHolder.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.factory; import com.orion.visor.framework.biz.operator.log.core.model.OperatorType; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/model/OperatorLogModel.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/model/OperatorLogModel.java index 283e9a55..992e4dd9 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/model/OperatorLogModel.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/model/OperatorLogModel.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.model; import com.orion.visor.framework.common.entity.RequestIdentity; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/model/OperatorType.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/model/OperatorType.java index 8eae3e4f..736be460 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/model/OperatorType.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/model/OperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.model; import com.orion.visor.framework.biz.operator.log.core.enums.OperatorRiskLevel; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/service/OperatorLogFrameworkService.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/service/OperatorLogFrameworkService.java index e9252086..001749df 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/service/OperatorLogFrameworkService.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/service/OperatorLogFrameworkService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.service; import com.orion.visor.framework.biz.operator.log.core.model.OperatorLogModel; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/service/OperatorLogFrameworkServiceDelegate.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/service/OperatorLogFrameworkServiceDelegate.java index ffe72ec9..f65e1019 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/service/OperatorLogFrameworkServiceDelegate.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/service/OperatorLogFrameworkServiceDelegate.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.service; import com.orion.visor.framework.biz.operator.log.core.model.OperatorLogModel; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/utils/OperatorLogFiller.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/utils/OperatorLogFiller.java index 403a5306..d8974cc6 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/utils/OperatorLogFiller.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/utils/OperatorLogFiller.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.utils; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/utils/OperatorLogs.java b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/utils/OperatorLogs.java index 2bb7f2a8..b4070bf1 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/utils/OperatorLogs.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-biz-operator-log/src/main/java/com/orion/visor/framework/biz/operator/log/core/utils/OperatorLogs.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.biz.operator.log.core.utils; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/com/orion/visor/framework/datasource/configuration/OrionDataSourceAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/com/orion/visor/framework/datasource/configuration/OrionDataSourceAutoConfiguration.java index 55628f86..fd4dd02d 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/com/orion/visor/framework/datasource/configuration/OrionDataSourceAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/com/orion/visor/framework/datasource/configuration/OrionDataSourceAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.datasource.configuration; import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/com/orion/visor/framework/datasource/core/filter/DruidAdRemoveFilter.java b/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/com/orion/visor/framework/datasource/core/filter/DruidAdRemoveFilter.java index 476d1789..543197fa 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/com/orion/visor/framework/datasource/core/filter/DruidAdRemoveFilter.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-datasource/src/main/java/com/orion/visor/framework/datasource/core/filter/DruidAdRemoveFilter.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.datasource.core.filter; import com.alibaba.druid.util.Utils; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/configuration/OrionDesensitizeAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/configuration/OrionDesensitizeAutoConfiguration.java index 2e33fc4b..ba535782 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/configuration/OrionDesensitizeAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/configuration/OrionDesensitizeAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.desensitize.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/annotation/Desensitize.java b/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/annotation/Desensitize.java index 309cc343..974254f4 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/annotation/Desensitize.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/annotation/Desensitize.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.desensitize.core.annotation; import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/annotation/DesensitizeObject.java b/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/annotation/DesensitizeObject.java index 47447f6e..a73f2d0f 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/annotation/DesensitizeObject.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/annotation/DesensitizeObject.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.desensitize.core.annotation; import java.lang.annotation.*; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/filter/DesensitizeValueFilter.java b/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/filter/DesensitizeValueFilter.java index 0a3bb22d..21a704f0 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/filter/DesensitizeValueFilter.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/filter/DesensitizeValueFilter.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.desensitize.core.filter; import com.alibaba.fastjson.annotation.JSONField; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/serializer/DesensitizeJsonSerializer.java b/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/serializer/DesensitizeJsonSerializer.java index e4356f13..3af8a9c3 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/serializer/DesensitizeJsonSerializer.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-desensitize/src/main/java/com/orion/visor/framework/desensitize/core/serializer/DesensitizeJsonSerializer.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.desensitize.core.serializer; import com.fasterxml.jackson.core.JsonGenerator; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/configuration/OrionQuartzAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/configuration/OrionQuartzAutoConfiguration.java index 05d4cff2..ac528a30 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/configuration/OrionQuartzAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/configuration/OrionQuartzAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.job.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/configuration/OrionSchedulerAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/configuration/OrionSchedulerAutoConfiguration.java index 4e9f2812..49ec99e8 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/configuration/OrionSchedulerAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/configuration/OrionSchedulerAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.job.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/core/utils/QuartzUtils.java b/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/core/utils/QuartzUtils.java index 6415000d..7535e2a0 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/core/utils/QuartzUtils.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-job/src/main/java/com/orion/visor/framework/job/core/utils/QuartzUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.job.core.utils; import com.orion.lang.utils.Exceptions; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/configuration/OrionLogPrinterConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/configuration/OrionLogPrinterConfiguration.java index c78e0dd3..91ff664e 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/configuration/OrionLogPrinterConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/configuration/OrionLogPrinterConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.log.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/configuration/config/LogPrinterConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/configuration/config/LogPrinterConfig.java index 859c6d4d..29f21284 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/configuration/config/LogPrinterConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/configuration/config/LogPrinterConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.log.configuration.config; import com.orion.visor.framework.common.utils.ConfigUtils; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/annotation/IgnoreLog.java b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/annotation/IgnoreLog.java index 4a4ce0dd..b2a15284 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/annotation/IgnoreLog.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/annotation/IgnoreLog.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.log.core.annotation; import com.orion.visor.framework.log.core.enums.IgnoreLogMode; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/IgnoreLogMode.java b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/IgnoreLogMode.java index 82814fcb..1f4add3c 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/IgnoreLogMode.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/IgnoreLogMode.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.log.core.enums; /** diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/LogFieldConst.java b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/LogFieldConst.java index af650243..b9690851 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/LogFieldConst.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/LogFieldConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.log.core.enums; /** diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/LogPrinterMode.java b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/LogPrinterMode.java index b34bbb2c..795871fa 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/LogPrinterMode.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/enums/LogPrinterMode.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.log.core.enums; /** diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/AbstractLogPrinterInterceptor.java b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/AbstractLogPrinterInterceptor.java index fb3a363d..550cbba8 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/AbstractLogPrinterInterceptor.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/AbstractLogPrinterInterceptor.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.log.core.interceptor; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/LogPrinterInterceptor.java b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/LogPrinterInterceptor.java index 8a823d7c..a31aa046 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/LogPrinterInterceptor.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/LogPrinterInterceptor.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.log.core.interceptor; import org.aopalliance.intercept.MethodInterceptor; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/PrettyLogPrinterInterceptor.java b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/PrettyLogPrinterInterceptor.java index 725a5bfe..bcc170f5 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/PrettyLogPrinterInterceptor.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/PrettyLogPrinterInterceptor.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.log.core.interceptor; import com.orion.lang.utils.Exceptions; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/RowLogPrinterInterceptor.java b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/RowLogPrinterInterceptor.java index 51fe9169..efa71e7a 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/RowLogPrinterInterceptor.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-log/src/main/java/com/orion/visor/framework/log/core/interceptor/RowLogPrinterInterceptor.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.log.core.interceptor; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-monitor/src/main/java/com/orion/visor/framework/monitor/configuration/OrionAdminAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-monitor/src/main/java/com/orion/visor/framework/monitor/configuration/OrionAdminAutoConfiguration.java index 05b96158..d6662b67 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-monitor/src/main/java/com/orion/visor/framework/monitor/configuration/OrionAdminAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-monitor/src/main/java/com/orion/visor/framework/monitor/configuration/OrionAdminAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.monitor.configuration; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/configuration/OrionMybatisAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/configuration/OrionMybatisAutoConfiguration.java index ea78722c..06a3a338 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/configuration/OrionMybatisAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/configuration/OrionMybatisAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.configuration; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/domain/BaseDO.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/domain/BaseDO.java index 66d062a6..59feb5a0 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/domain/BaseDO.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/domain/BaseDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.domain; import com.baomidou.mybatisplus.annotation.FieldFill; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/CodeGenerators.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/CodeGenerators.java index b477b82b..e676ed39 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/CodeGenerators.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/CodeGenerators.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator; import com.orion.lang.constant.Const; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CodeGenerator.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CodeGenerator.java index 54313f4b..94cf7c04 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CodeGenerator.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CodeGenerator.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.core; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CodeGeneratorEngine.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CodeGeneratorEngine.java index 67f091ed..5120addd 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CodeGeneratorEngine.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CodeGeneratorEngine.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.core; import com.baomidou.mybatisplus.core.toolkit.StringPool; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CustomFileFilter.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CustomFileFilter.java index d5f095b9..1501beb4 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CustomFileFilter.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/CustomFileFilter.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.core; import com.baomidou.mybatisplus.generator.config.builder.CustomFile; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/DictParser.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/DictParser.java index 4fa573a3..f0a0b1a4 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/DictParser.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/DictParser.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.core; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/VelocityTemplateEngine.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/VelocityTemplateEngine.java index 481b9acd..8852939d 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/VelocityTemplateEngine.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/core/VelocityTemplateEngine.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.core; import com.baomidou.mybatisplus.core.toolkit.StringPool; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/CacheTemplate.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/CacheTemplate.java index 65b4f30a..280f0771 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/CacheTemplate.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/CacheTemplate.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.template; import java.util.concurrent.TimeUnit; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/DictMeta.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/DictMeta.java index 554657f3..53755ffc 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/DictMeta.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/DictMeta.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.template; import lombok.Data; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/DictTemplate.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/DictTemplate.java index 20fdb1ba..50d3b9d8 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/DictTemplate.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/DictTemplate.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.template; import com.orion.lang.utils.collect.Lists; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/ServerTemplate.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/ServerTemplate.java index 59380c71..764b1431 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/ServerTemplate.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/ServerTemplate.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.template; /** diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Table.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Table.java index f3b0a9a6..d19c3f5b 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Table.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Table.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.template; import lombok.Data; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Template.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Template.java index 89c65364..88a9bd61 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Template.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/Template.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.template; import lombok.Data; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/VueTemplate.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/VueTemplate.java index 18a8611e..a117ed8e 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/VueTemplate.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/generator/template/VueTemplate.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.generator.template; /** diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/handler/FieldFillHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/handler/FieldFillHandler.java index 59a3eccd..9501e268 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/handler/FieldFillHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/handler/FieldFillHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.handler; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/mapper/IJoinMapper.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/mapper/IJoinMapper.java index ff1cd3bf..a455e38f 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/mapper/IJoinMapper.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/mapper/IJoinMapper.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.mapper; import com.github.yulichang.base.MPJBaseMapper; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/mapper/IMapper.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/mapper/IMapper.java index 6be3f252..c1be4537 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/mapper/IMapper.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/mapper/IMapper.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.mapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/Conditions.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/Conditions.java index 6c227976..470d6cd2 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/Conditions.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/Conditions.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.query; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/DataQuery.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/DataQuery.java index e2a3b365..528ed06e 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/DataQuery.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/DataQuery.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.query; import com.baomidou.mybatisplus.core.conditions.Wrapper; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/Then.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/Then.java index 481c1423..9f75c47f 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/Then.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/Then.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.query; /** diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ThenLambdaWrapper.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ThenLambdaWrapper.java index c1fb8b2e..907fad8e 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ThenLambdaWrapper.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ThenLambdaWrapper.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.query; import com.baomidou.mybatisplus.core.conditions.AbstractLambdaWrapper; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ThenValidateLambdaWrapper.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ThenValidateLambdaWrapper.java index b7148fc6..e83c5858 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ThenValidateLambdaWrapper.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ThenValidateLambdaWrapper.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.query; import com.baomidou.mybatisplus.core.toolkit.support.SFunction; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ValidateLambdaWrapper.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ValidateLambdaWrapper.java index 847775cc..59aaf1aa 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ValidateLambdaWrapper.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/query/ValidateLambdaWrapper.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.query; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/ITypeHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/ITypeHandler.java index aa085560..82b1c064 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/ITypeHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/ITypeHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.type; import org.apache.ibatis.type.TypeHandler; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/IntegerListTypeHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/IntegerListTypeHandler.java index e3d3247e..152a5ecf 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/IntegerListTypeHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/IntegerListTypeHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.type; import com.orion.lang.utils.Strings; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/JSONArrayTypeHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/JSONArrayTypeHandler.java index 91998347..7eaa00a2 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/JSONArrayTypeHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/JSONArrayTypeHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.type; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/JSONObjectTypeHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/JSONObjectTypeHandler.java index 71081dfe..f09479f9 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/JSONObjectTypeHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/JSONObjectTypeHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.type; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/LongListTypeHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/LongListTypeHandler.java index 6777bef5..18df1e11 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/LongListTypeHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/LongListTypeHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.type; import com.orion.lang.utils.Strings; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/StringListTypeHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/StringListTypeHandler.java index e32475d7..6af8e6f1 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/StringListTypeHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/type/StringListTypeHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.type; import com.orion.lang.utils.collect.Lists; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/utils/DomainFillUtils.java b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/utils/DomainFillUtils.java index c93e835f..89c414ae 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/utils/DomainFillUtils.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/java/com/orion/visor/framework/mybatis/core/utils/DomainFillUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.mybatis.core.utils; import com.orion.lang.utils.Exceptions; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-cache-dto.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-cache-dto.java.vm index bbc41dde..8eed5168 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-cache-dto.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-cache-dto.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import com.orion.lang.define.cache.key.model.LongCacheIdModel; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-cache-key-define.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-cache-key-define.java.vm index 11584b8d..6cf0d1e5 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-cache-key-define.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-cache-key-define.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import com.orion.lang.define.cache.key.CacheKeyBuilder; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.java.vm index 12552dc5..fef1cc42 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-controller.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${package.Controller}; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-convert.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-convert.java.vm index e08ef6ab..d9722fed 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-convert.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-convert.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import ${package.Entity}.*; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-do.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-do.java.vm index 36cf2fb7..5c311415 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-do.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-do.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${package.Entity}; import com.baomidou.mybatisplus.annotation.*; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-create.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-create.java.vm index f58ffba9..57b56445 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-create.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-create.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-query.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-query.java.vm index f4478eaa..40bffbf4 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-query.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-query.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-update.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-update.java.vm index 07990061..86913d75 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-update.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-request-update.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-vo.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-vo.java.vm index a41c657f..df101987 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-vo.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-entity-vo.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-mapper.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-mapper.java.vm index 770e9abe..f9b963e4 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-mapper.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-mapper.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${package.Mapper}; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-operator-key-define.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-operator-key-define.java.vm index 0283219b..e79d70e3 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-operator-key-define.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-operator-key-define.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service-impl.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service-impl.java.vm index 53506008..e1ec26e5 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service-impl.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service-impl.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${package.ServiceImpl}; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service.java.vm index 48c1cca5..58c01e5c 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-module-service.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${package.Service}; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -5,6 +20,7 @@ import com.orion.lang.define.wrapper.DataGrid; #foreach($pkg in ${customModuleFilePackages}) import ${pkg}.*; #end +import ${package.Entity}.${entity}; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -123,6 +139,6 @@ public interface ${table.serviceName} { * @param request request * @return wrapper */ - private LambdaQueryWrapper<${type}DO> buildQueryWrapper(${type}QueryRequest request); + LambdaQueryWrapper<${type}DO> buildQueryWrapper(${type}QueryRequest request); } diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-api-impl.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-api-impl.java.vm index 09fcefb6..b42fd795 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-api-impl.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-api-impl.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-api.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-api.java.vm index fc139baf..c7b56b89 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-api.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-api.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; #foreach($pkg in ${customProviderEntityFilePackages}) diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-convert.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-convert.java.vm index cf59ae28..0dd5f318 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-convert.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-convert.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import ${package.Entity}.*; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-create.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-create.java.vm index 114d6da7..f6a9020d 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-create.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-create.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-query.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-query.java.vm index 3c874142..e6f52669 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-query.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-query.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-update.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-update.java.vm index 56fb99da..9219e861 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-update.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto-update.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto.java.vm index ddd1927e..0bec15cd 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-provider-entity-dto.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-test-api-impl-tests.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-test-api-impl-tests.java.vm index ba851a28..94ece8fd 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-test-api-impl-tests.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-test-api-impl-tests.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import com.orion.lang.utils.collect.Lists; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-test-service-impl-tests.java.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-test-service-impl-tests.java.vm index 8b0ef9a3..21f08483 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-test-service-impl-tests.java.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-server-test-service-impl-tests.java.vm @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ${currentPackage}; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-types-card.fields.ts.vm b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-types-card.fields.ts.vm index d0f78696..1951b820 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-types-card.fields.ts.vm +++ b/orion-visor-framework/orion-visor-spring-boot-starter-mybatis/src/main/resources/templates/orion-vue-views-types-card.fields.ts.vm @@ -2,8 +2,9 @@ import type { CardField, CardFieldConfig } from '@/types/card'; import { dateFormat } from '@/utils'; const fieldConfig = { - rowGap: '12px', + rowGap: '10px', labelSpan: 8, + minHeight: '22px', fields: [ { label: 'id', diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/OrionCacheAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/OrionCacheAutoConfiguration.java index f3485b86..20d6bb9c 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/OrionCacheAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/OrionCacheAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.redis.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/OrionRedisAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/OrionRedisAutoConfiguration.java index 5852cbc2..9a9a048e 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/OrionRedisAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/OrionRedisAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.redis.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/config/RedissonConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/config/RedissonConfig.java index b1c38202..9d3094a5 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/config/RedissonConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/configuration/config/RedissonConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.redis.configuration.config; import lombok.Data; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/lock/RedisLocker.java b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/lock/RedisLocker.java index ac8334a4..52488e54 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/lock/RedisLocker.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/lock/RedisLocker.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.redis.core.lock; import com.orion.lang.utils.Exceptions; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisLists.java b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisLists.java index 236a5a2c..b42122e8 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisLists.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisLists.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.redis.core.utils; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisMaps.java b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisMaps.java index 9bdcac7b..07701df1 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisMaps.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisMaps.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.redis.core.utils; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisStrings.java b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisStrings.java index 45f01f7a..d906e3fa 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisStrings.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisStrings.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.redis.core.utils; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisUtils.java b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisUtils.java index a3aa17d8..5e51582b 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisUtils.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/RedisUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.redis.core.utils; import com.orion.lang.define.cache.key.CacheKeyDefine; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/barrier/CacheBarriers.java b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/barrier/CacheBarriers.java index 1e23d085..a19888ff 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/barrier/CacheBarriers.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-redis/src/main/java/com/orion/visor/framework/redis/core/utils/barrier/CacheBarriers.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.redis.core.utils.barrier; import com.orion.lang.define.barrier.GenericsAnonymousCollectionBarrier; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/OrionCryptoAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/OrionCryptoAutoConfiguration.java index 4a416200..0fe0a8e8 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/OrionCryptoAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/OrionCryptoAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/OrionSecurityAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/OrionSecurityAutoConfiguration.java index 36fde714..0174c1bb 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/OrionSecurityAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/OrionSecurityAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/config/AesCryptoConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/config/AesCryptoConfig.java index a7086917..413c3888 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/config/AesCryptoConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/config/AesCryptoConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.configuration.config; import com.orion.lang.utils.crypto.CryptoConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/config/SecurityConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/config/SecurityConfig.java index 0ceb1a69..9cdfc2d6 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/config/SecurityConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/configuration/config/SecurityConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.configuration.config; import com.orion.visor.framework.common.utils.ConfigUtils; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/context/TransmittableThreadLocalSecurityContextHolderStrategy.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/context/TransmittableThreadLocalSecurityContextHolderStrategy.java index 63e25850..a2c4daee 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/context/TransmittableThreadLocalSecurityContextHolderStrategy.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/context/TransmittableThreadLocalSecurityContextHolderStrategy.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.context; import com.alibaba.ttl.TransmittableThreadLocal; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/CryptoConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/CryptoConfig.java index 2e42595e..71c67787 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/CryptoConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/CryptoConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.crypto; import lombok.Data; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/CryptoProcessor.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/CryptoProcessor.java index 648b7ac3..14a7bb0e 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/CryptoProcessor.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/CryptoProcessor.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.crypto; import com.orion.visor.framework.common.crypto.ValueCrypto; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/PrimaryValueCrypto.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/PrimaryValueCrypto.java index be3ba88e..c141685e 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/PrimaryValueCrypto.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/PrimaryValueCrypto.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.crypto; import com.orion.lang.utils.Exceptions; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/processor/AesCryptoProcessor.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/processor/AesCryptoProcessor.java index 3f821dc4..0aa838b1 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/processor/AesCryptoProcessor.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/crypto/processor/AesCryptoProcessor.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.crypto.processor; import com.orion.lang.utils.Strings; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/filter/TokenAuthenticationFilter.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/filter/TokenAuthenticationFilter.java index a20e3fb2..be984319 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/filter/TokenAuthenticationFilter.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/filter/TokenAuthenticationFilter.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.filter; import com.orion.lang.exception.argument.HttpWrapperException; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/handler/AuthenticationEntryPointHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/handler/AuthenticationEntryPointHandler.java index ff8bdb66..afea1072 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/handler/AuthenticationEntryPointHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/handler/AuthenticationEntryPointHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.handler; import com.orion.visor.framework.common.constant.ErrorCode; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/handler/ForbiddenAccessDeniedHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/handler/ForbiddenAccessDeniedHandler.java index bdafff0f..e5ab330b 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/handler/ForbiddenAccessDeniedHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/handler/ForbiddenAccessDeniedHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.handler; import com.orion.visor.framework.common.constant.ErrorCode; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityFrameworkService.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityFrameworkService.java index a1881d67..90cbd04f 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityFrameworkService.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityFrameworkService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.service; import com.orion.visor.framework.common.security.LoginUser; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityFrameworkServiceDelegate.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityFrameworkServiceDelegate.java index d166baba..00d1f217 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityFrameworkServiceDelegate.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityFrameworkServiceDelegate.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.service; import com.orion.visor.framework.common.security.LoginUser; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityHolderDelegate.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityHolderDelegate.java index 51c4de3f..4033a7b1 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityHolderDelegate.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/service/SecurityHolderDelegate.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.service; import com.orion.visor.framework.common.security.LoginUser; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/AuthorizeRequestsCustomizer.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/AuthorizeRequestsCustomizer.java index 3d7068e2..c632f814 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/AuthorizeRequestsCustomizer.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/AuthorizeRequestsCustomizer.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.strategy; import org.springframework.core.Ordered; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/ConfigAuthorizeRequestsCustomizer.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/ConfigAuthorizeRequestsCustomizer.java index 5ff3f299..ce78530a 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/ConfigAuthorizeRequestsCustomizer.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/ConfigAuthorizeRequestsCustomizer.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.strategy; import com.orion.visor.framework.security.configuration.config.SecurityConfig; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/ConsoleAuthorizeRequestsCustomizer.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/ConsoleAuthorizeRequestsCustomizer.java index 9aa19411..4a2d250a 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/ConsoleAuthorizeRequestsCustomizer.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/ConsoleAuthorizeRequestsCustomizer.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.strategy; import org.springframework.security.config.annotation.web.builders.HttpSecurity; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/PermitAllAnnotationAuthorizeRequestsCustomizer.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/PermitAllAnnotationAuthorizeRequestsCustomizer.java index 149c26df..d0d5e7a5 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/PermitAllAnnotationAuthorizeRequestsCustomizer.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/PermitAllAnnotationAuthorizeRequestsCustomizer.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.strategy; import org.springframework.context.ApplicationContext; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/StaticResourceAuthorizeRequestsCustomizer.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/StaticResourceAuthorizeRequestsCustomizer.java index a3352089..375833f7 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/StaticResourceAuthorizeRequestsCustomizer.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/StaticResourceAuthorizeRequestsCustomizer.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.strategy; import org.springframework.http.HttpMethod; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/WebsocketAuthorizeRequestsCustomizer.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/WebsocketAuthorizeRequestsCustomizer.java index 6ea372b6..dd5f5ed2 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/WebsocketAuthorizeRequestsCustomizer.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/strategy/WebsocketAuthorizeRequestsCustomizer.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.strategy; import org.springframework.security.config.annotation.web.builders.HttpSecurity; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/utils/SecurityUtils.java b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/utils/SecurityUtils.java index 0e46d405..fba6c409 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/utils/SecurityUtils.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-security/src/main/java/com/orion/visor/framework/security/core/utils/SecurityUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.security.core.utils; import com.orion.lang.constant.StandardHttpHeader; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/OrionStorageAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/OrionStorageAutoConfiguration.java index 813f6d86..46a31c40 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/OrionStorageAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/OrionStorageAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.storage.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/config/LocalStorageConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/config/LocalStorageConfig.java index 80934dc2..acd1d412 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/config/LocalStorageConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/config/LocalStorageConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.storage.configuration.config; import com.orion.visor.framework.storage.core.client.local.LocalFileClientConfig; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/config/LogsStorageConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/config/LogsStorageConfig.java index 337c2ea4..dfd88415 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/config/LogsStorageConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/configuration/config/LogsStorageConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.storage.configuration.config; import com.orion.visor.framework.storage.core.client.local.LocalFileClientConfig; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/AbstractFileClient.java b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/AbstractFileClient.java index 620e1aad..18c0441b 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/AbstractFileClient.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/AbstractFileClient.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.storage.core.client; import com.orion.lang.utils.io.Files1; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/FileClientConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/FileClientConfig.java index 4e594076..a83d3c3e 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/FileClientConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/FileClientConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.storage.core.client; import com.orion.lang.utils.time.Dates; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/PrimaryFileClient.java b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/PrimaryFileClient.java index 0eeb343d..71954678 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/PrimaryFileClient.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/PrimaryFileClient.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.storage.core.client; import com.orion.lang.utils.Exceptions; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/local/LocalFileClient.java b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/local/LocalFileClient.java index 0408e323..8588c36e 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/local/LocalFileClient.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/local/LocalFileClient.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.storage.core.client.local; import com.orion.lang.utils.io.FileWriters; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/local/LocalFileClientConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/local/LocalFileClientConfig.java index a8f4ef07..9f093ed7 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/local/LocalFileClientConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-storage/src/main/java/com/orion/visor/framework/storage/core/client/local/LocalFileClientConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.storage.core.client.local; import com.orion.visor.framework.storage.core.client.FileClientConfig; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/com/orion/visor/framework/swagger/configuration/OrionSwaggerAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/com/orion/visor/framework/swagger/configuration/OrionSwaggerAutoConfiguration.java index 655d0e84..1b9147cd 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/com/orion/visor/framework/swagger/configuration/OrionSwaggerAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/com/orion/visor/framework/swagger/configuration/OrionSwaggerAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.swagger.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/com/orion/visor/framework/swagger/configuration/config/SwaggerConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/com/orion/visor/framework/swagger/configuration/config/SwaggerConfig.java index 16fd5043..095f4bf1 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/com/orion/visor/framework/swagger/configuration/config/SwaggerConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-swagger/src/main/java/com/orion/visor/framework/swagger/configuration/config/SwaggerConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.swagger.configuration.config; import lombok.Data; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionH2SqlInitializationTestConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionH2SqlInitializationTestConfiguration.java index ae93dee9..033de723 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionH2SqlInitializationTestConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionH2SqlInitializationTestConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.test.configuration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionMockBeanTestConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionMockBeanTestConfiguration.java index 5b1ac8ba..deb991d8 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionMockBeanTestConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionMockBeanTestConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.test.configuration; import com.orion.lang.utils.collect.Sets; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionMockRedisTestConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionMockRedisTestConfiguration.java index 2e57f92b..f5568a38 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionMockRedisTestConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/configuration/OrionMockRedisTestConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.test.configuration; import com.github.fppt.jedismock.RedisServer; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/core/base/BaseUnitTest.java b/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/core/base/BaseUnitTest.java index eb7a8f6f..ccf8c5d5 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/core/base/BaseUnitTest.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/core/base/BaseUnitTest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.test.core.base; import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/core/utils/EntityRandoms.java b/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/core/utils/EntityRandoms.java index 9a14dc9f..ab50ae0d 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/core/utils/EntityRandoms.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-test/src/main/java/com/orion/visor/framework/test/core/utils/EntityRandoms.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.test.core.utils; import com.orion.lang.utils.Arrays1; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/configuration/OrionWebAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/configuration/OrionWebAutoConfiguration.java index 50626b11..efe92a9f 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/configuration/OrionWebAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/configuration/OrionWebAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.web.configuration; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/DemoDisableApi.java b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/DemoDisableApi.java index 335784bd..6fd699dc 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/DemoDisableApi.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/DemoDisableApi.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.web.core.annotation; import java.lang.annotation.*; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/IgnoreWrapper.java b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/IgnoreWrapper.java index 8dafc616..3bdcce27 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/IgnoreWrapper.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/IgnoreWrapper.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.web.core.annotation; import java.lang.annotation.*; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/RestWrapper.java b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/RestWrapper.java index a65de356..80ee95b9 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/RestWrapper.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/annotation/RestWrapper.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.web.core.annotation; import java.lang.annotation.*; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/aspect/DemoDisableApiAspect.java b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/aspect/DemoDisableApiAspect.java index ec1e58c4..7fcaa900 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/aspect/DemoDisableApiAspect.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/aspect/DemoDisableApiAspect.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.web.core.aspect; import com.orion.visor.framework.common.constant.BeanOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/filter/TraceIdFilter.java b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/filter/TraceIdFilter.java index f2b73503..308f37d6 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/filter/TraceIdFilter.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/filter/TraceIdFilter.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.web.core.filter; import com.orion.visor.framework.common.meta.TraceIdHolder; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/handler/GlobalExceptionHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/handler/GlobalExceptionHandler.java index 45875de5..0e780228 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/handler/GlobalExceptionHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/handler/GlobalExceptionHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.web.core.handler; import com.orion.lang.define.wrapper.HttpWrapper; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/handler/WrapperResultHandler.java b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/handler/WrapperResultHandler.java index afa88caf..4e48ecb9 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/handler/WrapperResultHandler.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-web/src/main/java/com/orion/visor/framework/web/core/handler/WrapperResultHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.web.core.handler; import com.orion.lang.constant.StandardContentType; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/configuration/OrionWebSocketAutoConfiguration.java b/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/configuration/OrionWebSocketAutoConfiguration.java index 09a479a8..39c4cdd1 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/configuration/OrionWebSocketAutoConfiguration.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/configuration/OrionWebSocketAutoConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.websocket.configuration; import com.orion.visor.framework.common.constant.AutoConfigureOrderConst; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/configuration/config/WebSocketConfig.java b/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/configuration/config/WebSocketConfig.java index 3b5b18cb..25f388fc 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/configuration/config/WebSocketConfig.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/configuration/config/WebSocketConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.websocket.configuration.config; import lombok.Data; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/constant/WsCloseCode.java b/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/constant/WsCloseCode.java index da2a51c2..956c4e80 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/constant/WsCloseCode.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/constant/WsCloseCode.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.websocket.core.constant; /** diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/session/WebSocketSyncSession.java b/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/session/WebSocketSyncSession.java index 3aba81e3..b4f6d275 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/session/WebSocketSyncSession.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/session/WebSocketSyncSession.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.websocket.core.session; import org.springframework.http.HttpHeaders; diff --git a/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/utils/WebSockets.java b/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/utils/WebSockets.java index 86c41490..e7f76a9e 100644 --- a/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/utils/WebSockets.java +++ b/orion-visor-framework/orion-visor-spring-boot-starter-websocket/src/main/java/com/orion/visor/framework/websocket/core/utils/WebSockets.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.framework.websocket.core.utils; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-launch/src/main/java/com/orion/visor/launch/LaunchApplication.java b/orion-visor-launch/src/main/java/com/orion/visor/launch/LaunchApplication.java index f3928349..932b08c7 100644 --- a/orion-visor-launch/src/main/java/com/orion/visor/launch/LaunchApplication.java +++ b/orion-visor-launch/src/main/java/com/orion/visor/launch/LaunchApplication.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.launch; import com.orion.lang.utils.Strings; diff --git a/orion-visor-launch/src/main/java/com/orion/visor/launch/controller/BootstrapController.java b/orion-visor-launch/src/main/java/com/orion/visor/launch/controller/BootstrapController.java index a92f5ba7..fb4c5c2f 100644 --- a/orion-visor-launch/src/main/java/com/orion/visor/launch/controller/BootstrapController.java +++ b/orion-visor-launch/src/main/java/com/orion/visor/launch/controller/BootstrapController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.launch.controller; import com.orion.visor.framework.web.core.annotation.RestWrapper; diff --git a/orion-visor-launch/src/main/resources/application.yaml b/orion-visor-launch/src/main/resources/application.yaml index 3b5f9f8e..21011943 100644 --- a/orion-visor-launch/src/main/resources/application.yaml +++ b/orion-visor-launch/src/main/resources/application.yaml @@ -197,8 +197,8 @@ app: exec-log: enabled: false keep-period: 30 - # 主机连接日志 - host-connect-log: + # 终端连接日志 + terminal-connect-log: enabled: false keep-period: 30 @@ -250,7 +250,7 @@ orion: # 下面引用了 需要注意 field: ignore: - - password,beforePassword,newPassword,useNewPassword,publicKey,privateKey,token + - password,beforePassword,newPassword,useNewPassword,publicKey,privateKey,privateKeyPassword - metrics desensitize: storage: diff --git a/orion-visor-launch/src/test/java/com/orion/visor/launch/AddLicenseHeader.java b/orion-visor-launch/src/test/java/com/orion/visor/launch/AddLicenseHeader.java new file mode 100644 index 00000000..78d79468 --- /dev/null +++ b/orion-visor-launch/src/test/java/com/orion/visor/launch/AddLicenseHeader.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.launch; + +import com.orion.lang.define.StopWatch; +import com.orion.lang.utils.io.FileReaders; +import com.orion.lang.utils.io.FileWriters; +import com.orion.lang.utils.io.Files1; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.List; + +/** + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/10/11 13:52 + */ +public class AddLicenseHeader { + + private static final String LICENSE = "/*\n" + + " * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com).\n" + + " *\n" + + " * Licensed under the Apache License, Version 2.0 (the \"License\");\n" + + " * you may not use this file except in compliance with the License.\n" + + " * You may obtain a copy of the License at\n" + + " *\n" + + " * http://www.apache.org/licenses/LICENSE-2.0\n" + + " *\n" + + " * Unless required by applicable law or agreed to in writing, software\n" + + " * distributed under the License is distributed on an \"AS IS\" BASIS,\n" + + " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" + + " * See the License for the specific language governing permissions and\n" + + " * limitations under the License.\n" + + " */"; + + private static final String PATH = new File("").getAbsolutePath(); + + public static void main(String[] args) { + StopWatch sw = StopWatch.begin(); + // 扫描文件 + List files = Files1.listFilesFilter(PATH, file -> file.isFile() + && (file.getName().endsWith(".java") || file.getName().endsWith(".java.vm")) + && !file.getAbsolutePath().contains("node_modules"), true, false); + sw.tag("list"); + // 添加头 + files.forEach(AddLicenseHeader::addLicenseToFile); + sw.tag(" add"); + sw.stop(); + System.out.println(sw); + } + + /** + * 添加 license + * + * @param file file + */ + private static void addLicenseToFile(File file) { + try { + String line = FileReaders.readLine(file); + if (line != null && line.trim().equals("/*")) { + System.out.println("License already exists in " + file.getAbsolutePath()); + return; + } + // 读取原始文件内容 + byte[] bytes = FileReaders.readAllBytesFast(file); + // 在头部添加许可证 + ByteArrayOutputStream out = new ByteArrayOutputStream(); + out.write(LICENSE.getBytes(StandardCharsets.UTF_8)); + out.write('\n'); + out.write(new String(bytes).replaceAll("\r\n", "\n").getBytes(StandardCharsets.UTF_8)); + // 写入 + FileWriters.writeFast(file, out.toByteArray()); + System.out.println("License added to " + file.getAbsolutePath()); + } catch (IOException e) { + System.err.println("Failed to add license to " + file.getAbsolutePath()); + } + } + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/asset/api/CommandSnippetApi.java b/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/asset/api/CommandSnippetApi.java new file mode 100644 index 00000000..ec9eebe7 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/asset/api/CommandSnippetApi.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.api; + +import java.util.List; + +/** + * 命令片段 对外服务类 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/6/3 11:07 + */ +public interface CommandSnippetApi { + + /** + * 通过 userId 删除 + * + * @param userIdList userIdList + * @return effect + */ + Integer deleteByUserIdList(List userIdList); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/asset/api/PathBookmarkApi.java b/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/asset/api/PathBookmarkApi.java new file mode 100644 index 00000000..47fff55a --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/asset/api/PathBookmarkApi.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.api; + +import java.util.List; + +/** + * 路径标签 对外服务类 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/6/3 11:07 + */ +public interface PathBookmarkApi { + + /** + * 通过 userId 删除 + * + * @param userIdList userIdList + * @return effect + */ + Integer deleteByUserIdList(List userIdList); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/CommandSnippetApi.java b/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/CommandSnippetApi.java deleted file mode 100644 index 584e62b1..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/CommandSnippetApi.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.orion.visor.module.infra.api; - -import java.util.List; - -/** - * 命令片段 对外服务类 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2024/6/3 11:07 - */ -public interface CommandSnippetApi { - - /** - * 通过 userId 删除 - * - * @param userIdList userIdList - * @return effect - */ - Integer deleteByUserIdList(List userIdList); - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/PathBookmarkApi.java b/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/PathBookmarkApi.java deleted file mode 100644 index f0649f7f..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-provider/src/main/java/com/orion/visor/module/infra/api/PathBookmarkApi.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.orion.visor.module.infra.api; - -import java.util.List; - -/** - * 路径标签 对外服务类 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2024/6/3 11:07 - */ -public interface PathBookmarkApi { - - /** - * 通过 userId 删除 - * - * @param userIdList userIdList - * @return effect - */ - Integer deleteByUserIdList(List userIdList); - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/CommandSnippetApiImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/CommandSnippetApiImpl.java index 316c9a0e..21906eff 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/CommandSnippetApiImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/CommandSnippetApiImpl.java @@ -1,7 +1,22 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.api.impl; +import com.orion.visor.module.asset.api.CommandSnippetApi; import com.orion.visor.module.asset.service.CommandSnippetService; -import com.orion.visor.module.infra.api.CommandSnippetApi; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/PathBookmarkApiImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/PathBookmarkApiImpl.java index d11a2b33..58d9a8e8 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/PathBookmarkApiImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/api/impl/PathBookmarkApiImpl.java @@ -1,7 +1,22 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.api.impl; +import com.orion.visor.module.asset.api.PathBookmarkApi; import com.orion.visor.module.asset.service.PathBookmarkService; -import com.orion.visor.module.infra.api.PathBookmarkApi; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/configuration/AssetWebSocketConfiguration.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/configuration/AssetWebSocketConfiguration.java index 95bd3729..bd18b696 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/configuration/AssetWebSocketConfiguration.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/configuration/AssetWebSocketConfiguration.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.configuration; import com.orion.visor.module.asset.handler.host.exec.log.ExecLogTailHandler; @@ -47,11 +62,11 @@ public class AssetWebSocketConfiguration implements WebSocketConfigurer { @Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { // 终端会话 - registry.addHandler(terminalMessageDispatcher, prefix + "/host/terminal/{accessToken}") + registry.addHandler(terminalMessageDispatcher, prefix + "/terminal/access/{accessToken}") .addInterceptors(terminalAccessInterceptor) .setAllowedOrigins("*"); // 文件传输 - registry.addHandler(transferMessageDispatcher, prefix + "/host/transfer/{transferToken}") + registry.addHandler(transferMessageDispatcher, prefix + "/terminal/transfer/{transferToken}") .addInterceptors(terminalTransferInterceptor) .setAllowedOrigins("*"); // 执行日志 diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/AssetAuthorizedDataServiceController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/AssetAuthorizedDataServiceController.java index acf96857..dc687b0a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/AssetAuthorizedDataServiceController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/AssetAuthorizedDataServiceController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.visor.framework.log.core.annotation.IgnoreLog; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/AssetDataGrantServiceController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/AssetDataGrantServiceController.java index 600c6041..9570dd31 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/AssetDataGrantServiceController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/AssetDataGrantServiceController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/CommandSnippetController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/CommandSnippetController.java index 787cc7df..80cc9ef4 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/CommandSnippetController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/CommandSnippetController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.visor.framework.log.core.annotation.IgnoreLog; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/CommandSnippetGroupController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/CommandSnippetGroupController.java index 8d5c1577..5e15af97 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/CommandSnippetGroupController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/CommandSnippetGroupController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.visor.framework.common.validator.group.Id; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecCommandController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecCommandController.java index b6954b13..93ebeed6 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecCommandController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecCommandController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecCommandLogController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecCommandLogController.java index 63211588..135500bd 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecCommandLogController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecCommandLogController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecJobController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecJobController.java index ffe3b010..7c085b28 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecJobController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecJobController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecJobLogController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecJobLogController.java index b7d05e5e..57f3a092 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecJobLogController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecJobLogController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecTemplateController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecTemplateController.java index 6e58c6b6..472ca7db 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecTemplateController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/ExecTemplateController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostConnectLogController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostConnectLogController.java deleted file mode 100644 index 40257122..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostConnectLogController.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.orion.visor.module.asset.controller; - -import com.orion.lang.define.wrapper.DataGrid; -import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog; -import com.orion.visor.framework.common.validator.group.Id; -import com.orion.visor.framework.common.validator.group.Page; -import com.orion.visor.framework.log.core.annotation.IgnoreLog; -import com.orion.visor.framework.log.core.enums.IgnoreLogMode; -import com.orion.visor.framework.web.core.annotation.DemoDisableApi; -import com.orion.visor.framework.web.core.annotation.RestWrapper; -import com.orion.visor.module.asset.define.operator.HostConnectLogOperatorType; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogClearRequest; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogQueryRequest; -import com.orion.visor.module.asset.entity.vo.HostConnectLogVO; -import com.orion.visor.module.asset.service.HostConnectLogService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.extern.slf4j.Slf4j; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 主机连接日志 api - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023-12-26 22:09 - */ -@Tag(name = "asset - 主机连接日志服务") -@Slf4j -@Validated -@RestWrapper -@RestController -@RequestMapping("/asset/host-connect-log") -public class HostConnectLogController { - - @Resource - private HostConnectLogService hostConnectLogService; - - @IgnoreLog(IgnoreLogMode.RET) - @PostMapping("/query") - @Operation(summary = "分页查询主机连接日志") - @PreAuthorize("@ss.hasPermission('asset:host-connect-log:management:query')") - public DataGrid getHostConnectLogPage(@Validated(Page.class) @RequestBody HostConnectLogQueryRequest request) { - return hostConnectLogService.getHostConnectLogPage(request); - } - - @PostMapping("/count") - @Operation(summary = "查询主机连接日志数量") - @PreAuthorize("@ss.hasPermission('asset:host-connect-log:management:query')") - public Long getHostConnectLogCount(@Validated @RequestBody HostConnectLogQueryRequest request) { - return hostConnectLogService.getHostConnectLogCount(request); - } - - @IgnoreLog(IgnoreLogMode.RET) - @PostMapping("/session") - @Operation(summary = "查询全部主机连接会话") - @PreAuthorize("@ss.hasPermission('asset:host-connect-session:management:query')") - public List getHostConnectSessions(@Validated @RequestBody HostConnectLogQueryRequest request) { - return hostConnectLogService.getHostConnectSessions(request); - } - - @IgnoreLog(IgnoreLogMode.RET) - @PostMapping("/latest-connect") - @Operation(summary = "查询用户最近连接的主机") - public List getLatestConnectHostId(@RequestBody HostConnectLogQueryRequest request) { - return hostConnectLogService.getLatestConnectHostId(request); - } - - @OperatorLog(HostConnectLogOperatorType.DELETE) - @DeleteMapping("/delete") - @Operation(summary = "删除主机连接日志") - @Parameter(name = "idList", description = "idList", required = true) - @PreAuthorize("@ss.hasPermission('asset:host-connect-log:management:delete')") - public Integer deleteHostConnectLog(@RequestParam("idList") List idList) { - return hostConnectLogService.deleteHostConnectLog(idList); - } - - @OperatorLog(HostConnectLogOperatorType.CLEAR) - @PostMapping("/clear") - @Operation(summary = "清空主机连接日志") - @PreAuthorize("@ss.hasPermission('asset:host-connect-log:management:clear')") - public Integer clearHostConnectLog(@Validated @RequestBody HostConnectLogClearRequest request) { - return hostConnectLogService.clearHostConnectLog(request); - } - - @DemoDisableApi - @OperatorLog(HostConnectLogOperatorType.FORCE_OFFLINE) - @PutMapping("/force-offline") - @Operation(summary = "强制断开主机连接") - @PreAuthorize("@ss.hasAnyPermission('asset:host-connect-log:management:force-offline', 'asset:host-connect-session:management:force-offline')") - public Integer forceOffline(@Validated(Id.class) @RequestBody HostConnectLogQueryRequest request) { - return hostConnectLogService.forceOffline(request); - } - -} - diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostController.java index 52d2bdb8..cc31531c 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostExtraController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostExtraController.java index ddb37021..74883c4d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostExtraController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostExtraController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.visor.framework.log.core.annotation.IgnoreLog; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostGroupController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostGroupController.java index 0851f6b7..2ed9e83a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostGroupController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostGroupController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostIdentityController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostIdentityController.java index 22047a43..a1756a9d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostIdentityController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostIdentityController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostKeyController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostKeyController.java index a0ebb177..d2b94e67 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostKeyController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostKeyController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostSftpLogController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostSftpLogController.java deleted file mode 100644 index 320781a8..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostSftpLogController.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.orion.visor.module.asset.controller; - -import com.orion.lang.define.wrapper.DataGrid; -import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog; -import com.orion.visor.framework.common.validator.group.Page; -import com.orion.visor.framework.log.core.annotation.IgnoreLog; -import com.orion.visor.framework.log.core.enums.IgnoreLogMode; -import com.orion.visor.framework.web.core.annotation.IgnoreWrapper; -import com.orion.visor.framework.web.core.annotation.RestWrapper; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; -import com.orion.visor.module.asset.entity.request.host.HostSftpLogQueryRequest; -import com.orion.visor.module.asset.entity.vo.HostSftpLogVO; -import com.orion.visor.module.asset.service.HostSftpService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.extern.slf4j.Slf4j; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; - -import javax.annotation.Resource; -import javax.annotation.security.PermitAll; -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * SFTP 操作服务 api - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023-12-26 22:09 - */ -@Tag(name = "asset - SFTP 操作服务") -@Slf4j -@Validated -@RestWrapper -@RestController -@RequestMapping("/asset/host-sftp") -public class HostSftpLogController { - - @Resource - private HostSftpService hostSftpService; - - @IgnoreLog(IgnoreLogMode.RET) - @PostMapping("/query-log") - @Operation(summary = "分页查询 SFTP 操作日志") - @PreAuthorize("@ss.hasAnyPermission('infra:operator-log:query', 'asset:host-sftp-log:management:query')") - public DataGrid getHostSftpLogPage(@Validated(Page.class) @RequestBody HostSftpLogQueryRequest request) { - return hostSftpService.getHostSftpLogPage(request); - } - - @OperatorLog(HostTerminalOperatorType.DELETE_SFTP_LOG) - @DeleteMapping("/delete-log") - @Operation(summary = "删除 SFTP 操作日志") - @Parameter(name = "idList", description = "idList", required = true) - @PreAuthorize("@ss.hasAnyPermission('infra:operator-log:delete', 'asset:host-sftp-log:management:delete')") - public Integer deleteHostSftpLog(@RequestParam("idList") List idList) { - return hostSftpService.deleteHostSftpLog(idList); - } - - @PermitAll - @IgnoreWrapper - @IgnoreLog(IgnoreLogMode.RET) - @GetMapping("/download") - @Operation(summary = "下载文件") - @Parameter(name = "channelId", description = "channelId", required = true) - @Parameter(name = "transferToken", description = "transferToken", required = true) - public StreamingResponseBody downloadWithTransferToken(@RequestParam("channelId") String channelId, - @RequestParam("transferToken") String transferToken, - HttpServletResponse response) { - return hostSftpService.downloadWithTransferToken(channelId, transferToken, response); - } - -} - diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostTerminalController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostTerminalController.java deleted file mode 100644 index 3a935e3a..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/HostTerminalController.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.orion.visor.module.asset.controller; - -import com.orion.visor.framework.log.core.annotation.IgnoreLog; -import com.orion.visor.framework.log.core.enums.IgnoreLogMode; -import com.orion.visor.framework.web.core.annotation.RestWrapper; -import com.orion.visor.module.asset.entity.vo.HostTerminalThemeVO; -import com.orion.visor.module.asset.service.HostTerminalService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.extern.slf4j.Slf4j; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 主机终端 api - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023-9-20 11:55 - */ -@Tag(name = "asset - 主机终端服务") -@Slf4j -@Validated -@RestWrapper -@RestController -@RequestMapping("/asset/host-terminal") -public class HostTerminalController { - - @Resource - private HostTerminalService hostTerminalService; - - @IgnoreLog(IgnoreLogMode.ALL) - @GetMapping("/themes") - @Operation(summary = "获取主机终端主题") - public List getTerminalThemes() { - return hostTerminalService.getTerminalThemes(); - } - - @GetMapping("/access") - @Operation(summary = "获取主机终端 accessToken") - @PreAuthorize("@ss.hasPermission('asset:host-terminal:access')") - public String getTerminalAccessToken() { - return hostTerminalService.getTerminalAccessToken(); - } - - @GetMapping("/transfer") - @Operation(summary = "获取主机终端 transferToken") - @PreAuthorize("@ss.hasPermission('asset:host-terminal:access')") - public String getTerminalTransferToken() { - return hostTerminalService.getTerminalTransferToken(); - } - -} - diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/PathBookmarkController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/PathBookmarkController.java index 796adf0e..7d797a33 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/PathBookmarkController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/PathBookmarkController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.visor.framework.web.core.annotation.RestWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/PathBookmarkGroupController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/PathBookmarkGroupController.java index 99eaf0b6..0269f779 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/PathBookmarkGroupController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/PathBookmarkGroupController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.visor.framework.common.validator.group.Id; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/TerminalConnectLogController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/TerminalConnectLogController.java new file mode 100644 index 00000000..dd5f3c25 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/TerminalConnectLogController.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.controller; + +import com.orion.lang.define.wrapper.DataGrid; +import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog; +import com.orion.visor.framework.common.validator.group.Id; +import com.orion.visor.framework.common.validator.group.Page; +import com.orion.visor.framework.log.core.annotation.IgnoreLog; +import com.orion.visor.framework.log.core.enums.IgnoreLogMode; +import com.orion.visor.framework.web.core.annotation.DemoDisableApi; +import com.orion.visor.framework.web.core.annotation.RestWrapper; +import com.orion.visor.module.asset.define.operator.TerminalConnectLogOperatorType; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogClearRequest; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogQueryRequest; +import com.orion.visor.module.asset.entity.vo.TerminalConnectLogVO; +import com.orion.visor.module.asset.service.TerminalConnectLogService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Set; + +/** + * 终端连接日志 api + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023-12-26 22:09 + */ +@Tag(name = "asset - 终端连接日志服务") +@Slf4j +@Validated +@RestWrapper +@RestController +@RequestMapping("/asset/terminal-connect-log") +public class TerminalConnectLogController { + + @Resource + private TerminalConnectLogService terminalConnectLogService; + + @IgnoreLog(IgnoreLogMode.RET) + @PostMapping("/query") + @Operation(summary = "分页查询终端连接日志") + @PreAuthorize("@ss.hasPermission('asset:terminal-connect-log:management:query')") + public DataGrid getTerminalConnectLogPage(@Validated(Page.class) @RequestBody TerminalConnectLogQueryRequest request) { + return terminalConnectLogService.getTerminalConnectLogPage(request); + } + + @PostMapping("/count") + @Operation(summary = "查询终端连接日志数量") + @PreAuthorize("@ss.hasPermission('asset:terminal-connect-log:management:query')") + public Long getTerminalConnectLogCount(@Validated @RequestBody TerminalConnectLogQueryRequest request) { + return terminalConnectLogService.getTerminalConnectLogCount(request); + } + + @IgnoreLog(IgnoreLogMode.RET) + @PostMapping("/session") + @Operation(summary = "查询全部终端连接会话") + @PreAuthorize("@ss.hasPermission('asset:terminal-connect-session:management:query')") + public List getTerminalConnectSessions(@Validated @RequestBody TerminalConnectLogQueryRequest request) { + return terminalConnectLogService.getTerminalConnectSessions(request); + } + + @IgnoreLog(IgnoreLogMode.RET) + @PostMapping("/latest-connect") + @Operation(summary = "查询用户最近连接的主机") + public Set getLatestConnectHostId(@RequestBody TerminalConnectLogQueryRequest request) { + return terminalConnectLogService.getLatestConnectHostId(request); + } + + @OperatorLog(TerminalConnectLogOperatorType.DELETE) + @DeleteMapping("/delete") + @Operation(summary = "删除终端连接日志") + @Parameter(name = "idList", description = "idList", required = true) + @PreAuthorize("@ss.hasPermission('asset:terminal-connect-log:management:delete')") + public Integer deleteTerminalConnectLog(@RequestParam("idList") List idList) { + return terminalConnectLogService.deleteTerminalConnectLog(idList); + } + + @OperatorLog(TerminalConnectLogOperatorType.CLEAR) + @PostMapping("/clear") + @Operation(summary = "清空终端连接日志") + @PreAuthorize("@ss.hasPermission('asset:terminal-connect-log:management:clear')") + public Integer clearTerminalConnectLog(@Validated @RequestBody TerminalConnectLogClearRequest request) { + return terminalConnectLogService.clearTerminalConnectLog(request); + } + + @DemoDisableApi + @OperatorLog(TerminalConnectLogOperatorType.FORCE_OFFLINE) + @PutMapping("/force-offline") + @Operation(summary = "强制断开终端连接") + @PreAuthorize("@ss.hasAnyPermission('asset:terminal-connect-log:management:force-offline', 'asset:terminal-connect-session:management:force-offline')") + public Integer forceOffline(@Validated(Id.class) @RequestBody TerminalConnectLogQueryRequest request) { + return terminalConnectLogService.forceOffline(request); + } + +} + diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/TerminalController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/TerminalController.java new file mode 100644 index 00000000..20d17d46 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/TerminalController.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.controller; + +import com.orion.visor.framework.log.core.annotation.IgnoreLog; +import com.orion.visor.framework.log.core.enums.IgnoreLogMode; +import com.orion.visor.framework.web.core.annotation.RestWrapper; +import com.orion.visor.module.asset.entity.vo.TerminalThemeVO; +import com.orion.visor.module.asset.service.TerminalService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 终端 api + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023-9-20 11:55 + */ +@Tag(name = "asset - 终端服务") +@Slf4j +@Validated +@RestWrapper +@RestController +@RequestMapping("/asset/terminal") +public class TerminalController { + + @Resource + private TerminalService terminalService; + + @IgnoreLog(IgnoreLogMode.ALL) + @GetMapping("/themes") + @Operation(summary = "获取终端主题") + public List getTerminalThemes() { + return terminalService.getTerminalThemes(); + } + + @GetMapping("/access") + @Operation(summary = "获取终端 accessToken") + @PreAuthorize("@ss.hasPermission('asset:terminal:access')") + public String getTerminalAccessToken() { + return terminalService.getTerminalAccessToken(); + } + + @GetMapping("/transfer") + @Operation(summary = "获取终端 transferToken") + @PreAuthorize("@ss.hasPermission('asset:terminal:access')") + public String getTerminalTransferToken() { + return terminalService.getTerminalTransferToken(); + } + +} + diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/TerminalSftpController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/TerminalSftpController.java new file mode 100644 index 00000000..b11772ff --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/TerminalSftpController.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.controller; + +import com.orion.lang.define.wrapper.DataGrid; +import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog; +import com.orion.visor.framework.common.validator.group.Page; +import com.orion.visor.framework.log.core.annotation.IgnoreLog; +import com.orion.visor.framework.log.core.enums.IgnoreLogMode; +import com.orion.visor.framework.web.core.annotation.IgnoreWrapper; +import com.orion.visor.framework.web.core.annotation.RestWrapper; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; +import com.orion.visor.module.asset.entity.request.host.TerminalSftpLogQueryRequest; +import com.orion.visor.module.asset.entity.vo.TerminalSftpLogVO; +import com.orion.visor.module.asset.service.TerminalSftpService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; + +import javax.annotation.Resource; +import javax.annotation.security.PermitAll; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * SFTP 操作服务 api + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023-12-26 22:09 + */ +@Tag(name = "asset - SFTP 操作服务") +@Slf4j +@Validated +@RestWrapper +@RestController +@RequestMapping("/asset/terminal-sftp") +public class TerminalSftpController { + + @Resource + private TerminalSftpService terminalSftpService; + + @IgnoreLog(IgnoreLogMode.RET) + @PostMapping("/query-log") + @Operation(summary = "分页查询 SFTP 操作日志") + @PreAuthorize("@ss.hasAnyPermission('infra:operator-log:query', 'asset:terminal-sftp-log:management:query')") + public DataGrid getTerminalSftpLogPage(@Validated(Page.class) @RequestBody TerminalSftpLogQueryRequest request) { + return terminalSftpService.getTerminalSftpLogPage(request); + } + + @OperatorLog(TerminalOperatorType.DELETE_SFTP_LOG) + @DeleteMapping("/delete-log") + @Operation(summary = "删除 SFTP 操作日志") + @Parameter(name = "idList", description = "idList", required = true) + @PreAuthorize("@ss.hasAnyPermission('infra:operator-log:delete', 'asset:terminal-sftp-log:management:delete')") + public Integer deleteTerminalSftpLog(@RequestParam("idList") List idList) { + return terminalSftpService.deleteTerminalSftpLog(idList); + } + + @IgnoreLog(IgnoreLogMode.RET) + @GetMapping("/get-content") + @Operation(summary = "获取文件内容") + @Parameter(name = "token", description = "token", required = true) + public void getFileContentByToken(@RequestParam("token") String token, HttpServletResponse response) throws Exception { + terminalSftpService.getFileContentByToken(token, response); + } + + @PostMapping("/set-content") + @Operation(summary = "设置文件内容") + @Parameter(name = "token", description = "token", required = true) + @Parameter(name = "file", description = "file", required = true) + public Boolean setFileContentByToken(@RequestParam("token") String token, + @RequestParam("file") MultipartFile file) throws Exception { + terminalSftpService.setFileContentByToken(token, file); + return true; + } + + @PermitAll + @IgnoreWrapper + @IgnoreLog(IgnoreLogMode.RET) + @GetMapping("/download") + @Operation(summary = "下载文件") + @Parameter(name = "channelId", description = "channelId", required = true) + @Parameter(name = "transferToken", description = "transferToken", required = true) + public StreamingResponseBody downloadWithTransferToken(@RequestParam("channelId") String channelId, + @RequestParam("transferToken") String transferToken, + HttpServletResponse response) { + return terminalSftpService.downloadWithTransferToken(channelId, transferToken, response); + } + +} + diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/UploadTaskController.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/UploadTaskController.java index 8104b475..1ebc8112 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/UploadTaskController.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/controller/UploadTaskController.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.controller; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/CommandSnippetConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/CommandSnippetConvert.java index 7192b9ef..31ff4124 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/CommandSnippetConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/CommandSnippetConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.CommandSnippetDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/CommandSnippetGroupConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/CommandSnippetGroupConvert.java index c067957e..b73f82c1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/CommandSnippetGroupConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/CommandSnippetGroupConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.request.command.CommandSnippetGroupCreateRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecConvert.java index 3e48a896..846f55d6 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.dto.ExecCommandExecDTO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecHostLogConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecHostLogConvert.java index 92c2ac23..851cd2e8 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecHostLogConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecHostLogConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.ExecHostLogDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecJobConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecJobConvert.java index dd337f87..b38fb302 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecJobConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecJobConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.ExecJobDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecLogConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecLogConvert.java index 81d4615f..ca9ca144 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecLogConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecLogConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.ExecLogDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecTemplateConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecTemplateConvert.java index a00793ce..f9ca0d46 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecTemplateConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/ExecTemplateConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.ExecTemplateDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostConnectLogConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostConnectLogConvert.java deleted file mode 100644 index b4463c53..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostConnectLogConvert.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.orion.visor.module.asset.convert; - -import com.orion.visor.module.asset.entity.domain.HostConnectLogDO; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogCreateRequest; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogQueryRequest; -import com.orion.visor.module.asset.entity.vo.HostConnectLogVO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -import java.util.List; - -/** - * 主机连接日志 内部对象转换器 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023-12-26 22:09 - */ -@Mapper -public interface HostConnectLogConvert { - - HostConnectLogConvert MAPPER = Mappers.getMapper(HostConnectLogConvert.class); - - HostConnectLogDO to(HostConnectLogCreateRequest request); - - HostConnectLogDO to(HostConnectLogQueryRequest request); - - HostConnectLogVO to(HostConnectLogDO domain); - - HostConnectLogCreateRequest to(HostTerminalConnectDTO dto); - - List to(List list); - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostConvert.java index ff6eefc2..7f24d3d7 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.HostDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostGroupConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostGroupConvert.java index 68119fc7..b8a38fa6 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostGroupConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostGroupConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.vo.HostGroupTreeVO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostIdentityConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostIdentityConvert.java index fd6c5ea1..6cd0d77a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostIdentityConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostIdentityConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.HostIdentityDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostKeyConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostKeyConvert.java index d5ebc20a..58f3be74 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostKeyConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostKeyConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.HostKeyDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostSftpLogConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostSftpLogConvert.java deleted file mode 100644 index 64f3c025..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/HostSftpLogConvert.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.orion.visor.module.asset.convert; - -import com.orion.visor.module.asset.entity.vo.HostSftpLogVO; -import com.orion.visor.module.infra.entity.dto.operator.OperatorLogDTO; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.factory.Mappers; - -/** - * SFTP 操作日志 内部对象转换器 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023-12-26 22:09 - */ -@Mapper -public interface HostSftpLogConvert { - - HostSftpLogConvert MAPPER = Mappers.getMapper(HostSftpLogConvert.class); - - @Mapping(target = "extra", ignore = true) - HostSftpLogVO to(OperatorLogDTO request); - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/PathBookmarkConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/PathBookmarkConvert.java index 930234a5..43c94790 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/PathBookmarkConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/PathBookmarkConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.PathBookmarkDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/PathBookmarkGroupConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/PathBookmarkGroupConvert.java index 734c9367..abf1a8ef 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/PathBookmarkGroupConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/PathBookmarkGroupConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.request.path.PathBookmarkGroupCreateRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/TerminalConnectLogConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/TerminalConnectLogConvert.java new file mode 100644 index 00000000..4ed878d7 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/TerminalConnectLogConvert.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.convert; + +import com.orion.visor.module.asset.entity.domain.TerminalConnectLogDO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogCreateRequest; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogQueryRequest; +import com.orion.visor.module.asset.entity.vo.TerminalConnectLogVO; +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; + +import java.util.List; + +/** + * 终端连接日志 内部对象转换器 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023-12-26 22:09 + */ +@Mapper +public interface TerminalConnectLogConvert { + + TerminalConnectLogConvert MAPPER = Mappers.getMapper(TerminalConnectLogConvert.class); + + TerminalConnectLogDO to(TerminalConnectLogCreateRequest request); + + TerminalConnectLogDO to(TerminalConnectLogQueryRequest request); + + TerminalConnectLogVO to(TerminalConnectLogDO domain); + + TerminalConnectLogCreateRequest to(TerminalConnectDTO dto); + + List to(List list); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/TerminalSftpLogConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/TerminalSftpLogConvert.java new file mode 100644 index 00000000..edd84e31 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/TerminalSftpLogConvert.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.convert; + +import com.orion.visor.module.asset.entity.vo.TerminalSftpLogVO; +import com.orion.visor.module.infra.entity.dto.operator.OperatorLogDTO; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.factory.Mappers; + +/** + * SFTP 操作日志 内部对象转换器 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023-12-26 22:09 + */ +@Mapper +public interface TerminalSftpLogConvert { + + TerminalSftpLogConvert MAPPER = Mappers.getMapper(TerminalSftpLogConvert.class); + + @Mapping(target = "extra", ignore = true) + TerminalSftpLogVO to(OperatorLogDTO request); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/UploadTaskConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/UploadTaskConvert.java index 0d629ae4..15a47816 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/UploadTaskConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/UploadTaskConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.UploadTaskDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/UploadTaskFileConvert.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/UploadTaskFileConvert.java index 874050eb..a10c43be 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/UploadTaskFileConvert.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/convert/UploadTaskFileConvert.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.convert; import com.orion.visor.module.asset.entity.domain.UploadTaskFileDO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/CommandSnippetDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/CommandSnippetDAO.java index 66b22123..3852590f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/CommandSnippetDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/CommandSnippetDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecHostLogDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecHostLogDAO.java index 5a1c5db3..45d45cd1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecHostLogDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecHostLogDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.orion.visor.framework.mybatis.core.mapper.IMapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecJobDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecJobDAO.java index 49c7c6ee..b6bfc8a5 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecJobDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecJobDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.orion.visor.framework.mybatis.core.mapper.IMapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecJobHostDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecJobHostDAO.java index 3dfe18ac..e45eb4d4 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecJobHostDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecJobHostDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecLogDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecLogDAO.java index 45f76b89..a88370cc 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecLogDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecLogDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.orion.visor.framework.mybatis.core.mapper.IMapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecTemplateDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecTemplateDAO.java index 4760fb58..f6751064 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecTemplateDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecTemplateDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.orion.visor.framework.mybatis.core.mapper.IMapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecTemplateHostDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecTemplateHostDAO.java index 4ab0467b..b526e97a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecTemplateHostDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/ExecTemplateHostDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.orion.visor.framework.mybatis.core.mapper.IMapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostConnectLogDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostConnectLogDAO.java deleted file mode 100644 index 6aa605a2..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostConnectLogDAO.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.orion.visor.module.asset.dao; - -import com.orion.visor.framework.mybatis.core.mapper.IMapper; -import com.orion.visor.module.asset.entity.domain.HostConnectLogDO; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 主机连接日志 Mapper 接口 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023-12-26 22:09 - */ -@Mapper -public interface HostConnectLogDAO extends IMapper { - - /** - * 查询最近连接的 hostId - * - * @param userId userId - * @param type type - * @param limit limit - * @return hostId - */ - List selectLatestConnectHostId(@Param("userId") Long userId, @Param("type") String type, @Param("limit") Integer limit); - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostDAO.java index c4ebd651..7152eff0 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.baomidou.mybatisplus.core.toolkit.support.SFunction; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostIdentityDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostIdentityDAO.java index c2e131fb..cded801f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostIdentityDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostIdentityDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostKeyDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostKeyDAO.java index 6daa64a7..06e798d4 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostKeyDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/HostKeyDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.orion.visor.framework.mybatis.core.mapper.IMapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/PathBookmarkDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/PathBookmarkDAO.java index 870b3176..c8c01873 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/PathBookmarkDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/PathBookmarkDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/TerminalConnectLogDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/TerminalConnectLogDAO.java new file mode 100644 index 00000000..77bdd4e2 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/TerminalConnectLogDAO.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.dao; + +import com.orion.visor.framework.mybatis.core.mapper.IMapper; +import com.orion.visor.module.asset.entity.domain.TerminalConnectLogDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 终端连接日志 Mapper 接口 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023-12-26 22:09 + */ +@Mapper +public interface TerminalConnectLogDAO extends IMapper { + + /** + * 查询最近连接的 hostId + * + * @param userId userId + * @param type type + * @param limit limit + * @return hostId + */ + List selectLatestConnectHostId(@Param("userId") Long userId, @Param("type") String type, @Param("limit") Integer limit); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/UploadTaskDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/UploadTaskDAO.java index a55f751a..a45f7a82 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/UploadTaskDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/UploadTaskDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.orion.visor.framework.mybatis.core.mapper.IMapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/UploadTaskFileDAO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/UploadTaskFileDAO.java index 74eebe43..47ade1c4 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/UploadTaskFileDAO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/dao/UploadTaskFileDAO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.dao; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/AssetThreadPools.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/AssetThreadPools.java index 3b55a3ee..a1d68010 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/AssetThreadPools.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/AssetThreadPools.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define; import com.orion.lang.define.thread.ExecutorBuilder; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/CommandSnippetCacheKeyDefine.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/CommandSnippetCacheKeyDefine.java index d5f693b8..549bb4c1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/CommandSnippetCacheKeyDefine.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/CommandSnippetCacheKeyDefine.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.cache; import com.orion.lang.define.cache.key.CacheKeyBuilder; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/ExecCacheKeyDefine.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/ExecCacheKeyDefine.java index 31fbcacd..d3337b2f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/ExecCacheKeyDefine.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/ExecCacheKeyDefine.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.cache; import com.orion.lang.define.cache.key.CacheKeyBuilder; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/HostCacheKeyDefine.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/HostCacheKeyDefine.java index 5e53798f..931582a1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/HostCacheKeyDefine.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/HostCacheKeyDefine.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.cache; import com.orion.lang.define.cache.key.CacheKeyBuilder; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/HostTerminalCacheKeyDefine.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/HostTerminalCacheKeyDefine.java deleted file mode 100644 index 9ce86b12..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/HostTerminalCacheKeyDefine.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.orion.visor.module.asset.define.cache; - -import com.orion.lang.define.cache.key.CacheKeyBuilder; -import com.orion.lang.define.cache.key.CacheKeyDefine; -import com.orion.lang.define.cache.key.struct.RedisCacheStruct; -import com.orion.visor.module.asset.entity.dto.HostTerminalAccessDTO; -import com.orion.visor.module.asset.entity.dto.HostTerminalTransferDTO; - -import java.util.concurrent.TimeUnit; - -/** - * 主机终端服务缓存 key - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023/12/27 18:13 - */ -public interface HostTerminalCacheKeyDefine { - - CacheKeyDefine HOST_TERMINAL_ACCESS = new CacheKeyBuilder() - .key("host:terminal:access:{}") - .desc("主机终端访问token ${token}") - .type(HostTerminalAccessDTO.class) - .struct(RedisCacheStruct.STRING) - .timeout(3, TimeUnit.MINUTES) - .build(); - - CacheKeyDefine HOST_TERMINAL_TRANSFER = new CacheKeyBuilder() - .key("host:terminal:transfer:{}") - .desc("主机终端传输token ${token}") - .type(HostTerminalTransferDTO.class) - .struct(RedisCacheStruct.STRING) - .timeout(3, TimeUnit.MINUTES) - .build(); - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/PathBookmarkCacheKeyDefine.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/PathBookmarkCacheKeyDefine.java index cb40fb8a..e31ae8eb 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/PathBookmarkCacheKeyDefine.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/PathBookmarkCacheKeyDefine.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.cache; import com.orion.lang.define.cache.key.CacheKeyBuilder; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/TerminalCacheKeyDefine.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/TerminalCacheKeyDefine.java new file mode 100644 index 00000000..1c215359 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/cache/TerminalCacheKeyDefine.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.define.cache; + +import com.orion.lang.define.cache.key.CacheKeyBuilder; +import com.orion.lang.define.cache.key.CacheKeyDefine; +import com.orion.lang.define.cache.key.struct.RedisCacheStruct; +import com.orion.visor.module.asset.entity.dto.SftpGetContentCacheDTO; +import com.orion.visor.module.asset.entity.dto.SftpSetContentCacheDTO; +import com.orion.visor.module.asset.entity.dto.TerminalAccessDTO; +import com.orion.visor.module.asset.entity.dto.TerminalTransferDTO; + +import java.util.concurrent.TimeUnit; + +/** + * 终端服务缓存 key + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023/12/27 18:13 + */ +public interface TerminalCacheKeyDefine { + + CacheKeyDefine TERMINAL_ACCESS = new CacheKeyBuilder() + .key("terminal:access:{}") + .desc("终端访问token ${token}") + .type(TerminalAccessDTO.class) + .struct(RedisCacheStruct.STRING) + .timeout(3, TimeUnit.MINUTES) + .build(); + + CacheKeyDefine TERMINAL_TRANSFER = new CacheKeyBuilder() + .key("terminal:transfer:{}") + .desc("终端传输token ${token}") + .type(TerminalTransferDTO.class) + .struct(RedisCacheStruct.STRING) + .timeout(3, TimeUnit.MINUTES) + .build(); + + CacheKeyDefine TERMINAL_SFTP_GET_CONTENT = new CacheKeyBuilder() + .key("terminal:sftp:gc:{}") + .desc("sftp 获取文件内容 ${token}") + .type(SftpGetContentCacheDTO.class) + .struct(RedisCacheStruct.STRING) + .timeout(5, TimeUnit.MINUTES) + .build(); + + CacheKeyDefine TERMINAL_SFTP_SET_CONTENT = new CacheKeyBuilder() + .key("terminal:sftp:sc:{}") + .desc("sftp 设置文件内容 ${token}") + .type(SftpSetContentCacheDTO.class) + .struct(RedisCacheStruct.STRING) + .timeout(5, TimeUnit.MINUTES) + .build(); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppExecLogAutoClearConfig.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppExecLogAutoClearConfig.java index da4a5d68..4de7a576 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppExecLogAutoClearConfig.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppExecLogAutoClearConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.config; import com.orion.visor.framework.common.entity.AutoClearConfig; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppExecLogConfig.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppExecLogConfig.java index d2262949..d9acc5f8 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppExecLogConfig.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppExecLogConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.config; import lombok.Data; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppHostConnectLogAutoClearConfig.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppHostConnectLogAutoClearConfig.java deleted file mode 100644 index 3c7a2906..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppHostConnectLogAutoClearConfig.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.orion.visor.module.asset.define.config; - -import com.orion.visor.framework.common.entity.AutoClearConfig; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * 主机连接日志自动清理配置 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2024/6/24 15:01 - */ -@Data -@Component -@EqualsAndHashCode(callSuper = true) -@ConfigurationProperties(prefix = "app.auto-clear.host-connect-log") -public class AppHostConnectLogAutoClearConfig extends AutoClearConfig { - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppSftpConfig.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppSftpConfig.java index 88d72b79..9a8c3aac 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppSftpConfig.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppSftpConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.config; import lombok.Data; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppTerminalConnectLogAutoClearConfig.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppTerminalConnectLogAutoClearConfig.java new file mode 100644 index 00000000..c745780b --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppTerminalConnectLogAutoClearConfig.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.define.config; + +import com.orion.visor.framework.common.entity.AutoClearConfig; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * 终端连接日志自动清理配置 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/6/24 15:01 + */ +@Data +@Component +@EqualsAndHashCode(callSuper = true) +@ConfigurationProperties(prefix = "app.auto-clear.terminal-connect-log") +public class AppTerminalConnectLogAutoClearConfig extends AutoClearConfig { + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppTrackerConfig.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppTrackerConfig.java index 5a136550..97adb072 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppTrackerConfig.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/config/AppTrackerConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.config; import lombok.Data; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/message/ExecMessageDefine.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/message/ExecMessageDefine.java index b762fc9d..a4db2114 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/message/ExecMessageDefine.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/message/ExecMessageDefine.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.message; import com.orion.visor.module.infra.define.SystemMessageDefine; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/message/UploadMessageDefine.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/message/UploadMessageDefine.java index 439bf25a..ff08c0a8 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/message/UploadMessageDefine.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/message/UploadMessageDefine.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.message; import com.orion.visor.module.infra.define.SystemMessageDefine; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecCommandLogOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecCommandLogOperatorType.java index 1ef0a1d3..52e680f8 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecCommandLogOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecCommandLogOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecCommandOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecCommandOperatorType.java index 8656d94c..0300f873 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecCommandOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecCommandOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecJobLogOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecJobLogOperatorType.java index 0de5ae07..3e13ad5f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecJobLogOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecJobLogOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecJobOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecJobOperatorType.java index e09509e2..4f8a0bec 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecJobOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecJobOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecTemplateOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecTemplateOperatorType.java index 3db4cb3a..1c52f9c9 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecTemplateOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/ExecTemplateOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostConnectLogOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostConnectLogOperatorType.java deleted file mode 100644 index 313c037e..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostConnectLogOperatorType.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.orion.visor.module.asset.define.operator; - -import com.orion.visor.framework.biz.operator.log.core.annotation.Module; -import com.orion.visor.framework.biz.operator.log.core.factory.InitializingOperatorTypes; -import com.orion.visor.framework.biz.operator.log.core.model.OperatorType; - -import static com.orion.visor.framework.biz.operator.log.core.enums.OperatorRiskLevel.H; -import static com.orion.visor.framework.biz.operator.log.core.enums.OperatorRiskLevel.M; - -/** - * 主机连接日志 操作日志类型 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2024/3/2 14:37 - */ -@Module("asset:host-connect-log") -public class HostConnectLogOperatorType extends InitializingOperatorTypes { - - public static final String DELETE = "host-connect-log:delete"; - - public static final String CLEAR = "host-connect-log:clear"; - - public static final String FORCE_OFFLINE = "host-connect-log:force-offline"; - - @Override - public OperatorType[] types() { - return new OperatorType[]{ - new OperatorType(H, DELETE, "删除主机连接记录 ${count} 条"), - new OperatorType(H, CLEAR, "清空主机连接记录 ${count} 条"), - new OperatorType(M, FORCE_OFFLINE, "强制下线主机连接 ${hostName}"), - }; - } - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostGroupOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostGroupOperatorType.java index 288605ed..5b096e7a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostGroupOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostGroupOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostIdentityOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostIdentityOperatorType.java index df41eb22..97b37476 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostIdentityOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostIdentityOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostKeyOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostKeyOperatorType.java index c05c0131..bc6158cf 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostKeyOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostKeyOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostOperatorType.java index 17abbfec..15d56652 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/TerminalConnectLogOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/TerminalConnectLogOperatorType.java new file mode 100644 index 00000000..79067726 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/TerminalConnectLogOperatorType.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.define.operator; + +import com.orion.visor.framework.biz.operator.log.core.annotation.Module; +import com.orion.visor.framework.biz.operator.log.core.factory.InitializingOperatorTypes; +import com.orion.visor.framework.biz.operator.log.core.model.OperatorType; + +import static com.orion.visor.framework.biz.operator.log.core.enums.OperatorRiskLevel.H; +import static com.orion.visor.framework.biz.operator.log.core.enums.OperatorRiskLevel.M; + +/** + * 终端连接日志 操作日志类型 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/3/2 14:37 + */ +@Module("asset:terminal-connect-log") +public class TerminalConnectLogOperatorType extends InitializingOperatorTypes { + + public static final String DELETE = "terminal-connect-log:delete"; + + public static final String CLEAR = "terminal-connect-log:clear"; + + public static final String FORCE_OFFLINE = "terminal-connect-log:force-offline"; + + @Override + public OperatorType[] types() { + return new OperatorType[]{ + new OperatorType(H, DELETE, "删除终端连接记录 ${count} 条"), + new OperatorType(H, CLEAR, "清空终端连接记录 ${count} 条"), + new OperatorType(M, FORCE_OFFLINE, "强制下线终端连接 ${hostName}"), + }; + } + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostTerminalOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/TerminalOperatorType.java similarity index 57% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostTerminalOperatorType.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/TerminalOperatorType.java index 1d6cfa35..ff1fe069 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/HostTerminalOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/TerminalOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.lang.utils.collect.Lists; @@ -10,36 +25,36 @@ import java.util.List; import static com.orion.visor.framework.biz.operator.log.core.enums.OperatorRiskLevel.*; /** - * 主机终端 操作日志类型 + * 终端 操作日志类型 * * @author Jiahang Li * @version 1.0.0 * @since 2023/10/10 17:30 */ -@Module("asset:host-terminal") -public class HostTerminalOperatorType extends InitializingOperatorTypes { +@Module("asset:terminal") +public class TerminalOperatorType extends InitializingOperatorTypes { - public static final String CONNECT = "host-terminal:connect"; + public static final String CONNECT = "terminal:connect"; - public static final String DELETE_SFTP_LOG = "host-terminal:delete-sftp-log"; + public static final String DELETE_SFTP_LOG = "terminal:delete-sftp-log"; - public static final String SFTP_MKDIR = "host-terminal:sftp-mkdir"; + public static final String SFTP_MKDIR = "terminal:sftp-mkdir"; - public static final String SFTP_TOUCH = "host-terminal:sftp-touch"; + public static final String SFTP_TOUCH = "terminal:sftp-touch"; - public static final String SFTP_MOVE = "host-terminal:sftp-move"; + public static final String SFTP_MOVE = "terminal:sftp-move"; - public static final String SFTP_REMOVE = "host-terminal:sftp-remove"; + public static final String SFTP_REMOVE = "terminal:sftp-remove"; - public static final String SFTP_TRUNCATE = "host-terminal:sftp-truncate"; + public static final String SFTP_TRUNCATE = "terminal:sftp-truncate"; - public static final String SFTP_CHMOD = "host-terminal:sftp-chmod"; + public static final String SFTP_CHMOD = "terminal:sftp-chmod"; - public static final String SFTP_SET_CONTENT = "host-terminal:sftp-set-content"; + public static final String SFTP_SET_CONTENT = "terminal:sftp-set-content"; - public static final String SFTP_UPLOAD = "host-terminal:sftp-upload"; + public static final String SFTP_UPLOAD = "terminal:sftp-upload"; - public static final String SFTP_DOWNLOAD = "host-terminal:sftp-download"; + public static final String SFTP_DOWNLOAD = "terminal:sftp-download"; public static final List SFTP_TYPES = Lists.of( SFTP_MKDIR, diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/UploadTaskOperatorType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/UploadTaskOperatorType.java index c42aaedb..b9d5250d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/UploadTaskOperatorType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/define/operator/UploadTaskOperatorType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.define.operator; import com.orion.visor.framework.biz.operator.log.core.annotation.Module; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/CommandSnippetDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/CommandSnippetDO.java index 8bb7093a..87db44c1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/CommandSnippetDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/CommandSnippetDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecHostLogDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecHostLogDO.java index 445fa769..7b8cef41 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecHostLogDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecHostLogDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecJobDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecJobDO.java index 5854fc94..15af00bf 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecJobDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecJobDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecJobHostDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecJobHostDO.java index edaf5d52..d065cebb 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecJobHostDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecJobHostDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecLogDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecLogDO.java index f75e902c..035bef1f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecLogDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecLogDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecTemplateDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecTemplateDO.java index 33c1ff5a..98d1647f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecTemplateDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecTemplateDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecTemplateHostDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecTemplateHostDO.java index dbf594d2..28880ade 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecTemplateHostDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/ExecTemplateHostDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostDO.java index 25c609ea..8c5faf2a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostIdentityDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostIdentityDO.java index 37b0b678..31884c4c 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostIdentityDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostIdentityDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostKeyDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostKeyDO.java index d5f88366..7e3ae288 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostKeyDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostKeyDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/PathBookmarkDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/PathBookmarkDO.java index d5d8eec5..cb21c6ab 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/PathBookmarkDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/PathBookmarkDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostConnectLogDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/TerminalConnectLogDO.java similarity index 69% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostConnectLogDO.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/TerminalConnectLogDO.java index c9121254..b7033316 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/HostConnectLogDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/TerminalConnectLogDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; @@ -11,7 +26,7 @@ import lombok.*; import java.util.Date; /** - * 主机连接日志 实体对象 + * 终端连接日志 实体对象 * * @author Jiahang Li * @version 1.0.0 @@ -22,9 +37,9 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -@TableName(value = "host_connect_log", autoResultMap = true) -@Schema(name = "HostConnectLogDO", description = "主机连接日志 实体对象") -public class HostConnectLogDO extends BaseDO { +@TableName(value = "terminal_connect_log", autoResultMap = true) +@Schema(name = "TerminalConnectLogDO", description = "终端连接日志 实体对象") +public class TerminalConnectLogDO extends BaseDO { private static final long serialVersionUID = 1L; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/UploadTaskDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/UploadTaskDO.java index 30dba529..2fe8e03b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/UploadTaskDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/UploadTaskDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/UploadTaskFileDO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/UploadTaskFileDO.java index 0f76c622..e7318c3e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/UploadTaskFileDO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/domain/UploadTaskFileDO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.domain; import com.baomidou.mybatisplus.annotation.IdType; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/CommandSnippetCacheDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/CommandSnippetCacheDTO.java index b8a0d200..a7d5c9c7 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/CommandSnippetCacheDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/CommandSnippetCacheDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import com.orion.lang.define.cache.key.model.LongCacheIdModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecCommandExecDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecCommandExecDTO.java index 601610d8..7e05e7cd 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecCommandExecDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecCommandExecDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecHostLogTailDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecHostLogTailDTO.java index fa9dee79..b7c99540 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecHostLogTailDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecHostLogTailDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecLogTailDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecLogTailDTO.java index cbe15a99..ca5b6532 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecLogTailDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecLogTailDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecParameterSchemaDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecParameterSchemaDTO.java index ea148c2d..1fe34cae 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecParameterSchemaDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/ExecParameterSchemaDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostCacheDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostCacheDTO.java index d1dc4eec..adb2863d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostCacheDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostCacheDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import com.orion.lang.define.cache.key.model.LongCacheIdModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostIdentityCacheDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostIdentityCacheDTO.java index 945d7d20..f2b9aa00 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostIdentityCacheDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostIdentityCacheDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import com.orion.lang.define.cache.key.model.LongCacheIdModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostKeyCacheDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostKeyCacheDTO.java index c99a3e5c..8fc4ad9a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostKeyCacheDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostKeyCacheDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import com.orion.lang.define.cache.key.model.LongCacheIdModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostTerminalAccessDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostTerminalAccessDTO.java deleted file mode 100644 index e2b922e5..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostTerminalAccessDTO.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.orion.visor.module.asset.entity.dto; - -import com.orion.visor.framework.desensitize.core.annotation.DesensitizeObject; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 主机终端访问参数 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023/12/26 15:47 - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -@DesensitizeObject -@Schema(name = "HostTerminalAccessDTO", description = "主机终端访问参数") -public class HostTerminalAccessDTO { - - @Schema(description = "userId") - private Long userId; - - @Schema(description = "username") - private String username; - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostTerminalTransferDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostTerminalTransferDTO.java deleted file mode 100644 index d6eb5ebd..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostTerminalTransferDTO.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.orion.visor.module.asset.entity.dto; - -import com.orion.visor.framework.desensitize.core.annotation.DesensitizeObject; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 主机终端传输参数 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023/12/26 15:47 - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -@DesensitizeObject -@Schema(name = "HostTerminalTransferDTO", description = "主机终端传输参数") -public class HostTerminalTransferDTO { - - @Schema(description = "userId") - private Long userId; - - @Schema(description = "username") - private String username; - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/PathBookmarkCacheDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/PathBookmarkCacheDTO.java index fad016e4..193c4e20 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/PathBookmarkCacheDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/PathBookmarkCacheDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import com.orion.lang.define.cache.key.model.LongCacheIdModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/SftpGetContentCacheDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/SftpGetContentCacheDTO.java new file mode 100644 index 00000000..6c9ffe0c --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/SftpGetContentCacheDTO.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.entity.dto; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * sftp 获取文件内容缓存对象 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/10/10 20:49 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Schema(name = "SftpGetContentCacheDTO", description = "sftp 获取文件内容缓存对象") +public class SftpGetContentCacheDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @Schema(description = "主机id") + private Long hostId; + + @Schema(description = "文件路径") + private String path; + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/SftpSetContentCacheDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/SftpSetContentCacheDTO.java new file mode 100644 index 00000000..e3d39b90 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/SftpSetContentCacheDTO.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.entity.dto; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * sftp 获取文件内容缓存对象 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/10/10 20:49 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Schema(name = "SftpSetContentCacheDTO", description = "sftp 设置文件内容缓存对象") +public class SftpSetContentCacheDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @Schema(description = "主机id") + private Long hostId; + + @Schema(description = "文件路径") + private String path; + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalAccessDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalAccessDTO.java new file mode 100644 index 00000000..21656f4b --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalAccessDTO.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.entity.dto; + +import com.orion.visor.framework.desensitize.core.annotation.DesensitizeObject; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 终端访问参数 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023/12/26 15:47 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@DesensitizeObject +@Schema(name = "TerminalAccessDTO", description = "终端访问参数") +public class TerminalAccessDTO { + + @Schema(description = "userId") + private Long userId; + + @Schema(description = "username") + private String username; + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostTerminalConnectDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalConnectDTO.java similarity index 70% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostTerminalConnectDTO.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalConnectDTO.java index 27adc933..b4570d4e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostTerminalConnectDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalConnectDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import com.orion.visor.framework.desensitize.core.annotation.Desensitize; @@ -9,7 +24,7 @@ import lombok.Data; import lombok.NoArgsConstructor; /** - * 主机终端连接参数 + * 终端连接参数 * * @author Jiahang Li * @version 1.0.0 @@ -20,8 +35,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @AllArgsConstructor @DesensitizeObject -@Schema(name = "HostTerminalConnectDTO", description = "主机终端连接参数") -public class HostTerminalConnectDTO { +@Schema(name = "TerminalConnectDTO", description = "终端连接参数") +public class TerminalConnectDTO { @Schema(description = "logId") private Long logId; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostConnectLogExtraDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalConnectLogExtraDTO.java similarity index 55% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostConnectLogExtraDTO.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalConnectLogExtraDTO.java index dfb8344c..531f2a5c 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/HostConnectLogExtraDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalConnectLogExtraDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import io.swagger.v3.oas.annotations.media.Schema; @@ -7,7 +22,7 @@ import lombok.Data; import lombok.NoArgsConstructor; /** - * 主机连接日志拓展信息对象 + * 终端连接日志拓展信息对象 * * @author Jiahang Li * @version 1.0.0 @@ -17,8 +32,8 @@ import lombok.NoArgsConstructor; @Builder @NoArgsConstructor @AllArgsConstructor -@Schema(name = "HostConnectLogExtraDTO", description = "主机连接日志拓展信息对象") -public class HostConnectLogExtraDTO { +@Schema(name = "TerminalConnectLogExtraDTO", description = "终端连接日志拓展信息对象") +public class TerminalConnectLogExtraDTO { @Schema(description = "hostId") private Long hostId; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalTransferDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalTransferDTO.java new file mode 100644 index 00000000..7fc4b29e --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/TerminalTransferDTO.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.entity.dto; + +import com.orion.visor.framework.desensitize.core.annotation.DesensitizeObject; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 终端传输参数 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023/12/26 15:47 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@DesensitizeObject +@Schema(name = "TerminalTransferDTO", description = "终端传输参数") +public class TerminalTransferDTO { + + @Schema(description = "userId") + private Long userId; + + @Schema(description = "username") + private String username; + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/UploadTaskExtraDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/UploadTaskExtraDTO.java index a4135035..c7795f4d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/UploadTaskExtraDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/dto/UploadTaskExtraDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.dto; import com.orion.visor.module.asset.entity.vo.HostBaseVO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/asset/AssetAuthorizedDataQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/asset/AssetAuthorizedDataQueryRequest.java index e559b6b6..39e532ba 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/asset/AssetAuthorizedDataQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/asset/AssetAuthorizedDataQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.asset; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/asset/AssetDataGrantRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/asset/AssetDataGrantRequest.java index 69547ecf..459dbef7 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/asset/AssetDataGrantRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/asset/AssetDataGrantRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.asset; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetCreateRequest.java index bd950faf..04040632 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.command; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupCreateRequest.java index 55e1a07f..dd192f53 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.command; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupDeleteRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupDeleteRequest.java index 2d2664ce..3acf32b5 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupDeleteRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupDeleteRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.command; import com.orion.visor.framework.common.validator.group.Id; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupUpdateRequest.java index c6a6c238..d18a68cc 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetGroupUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.command; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetUpdateRequest.java index 443ba89d..4e074e3e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/command/CommandSnippetUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.command; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecCommandRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecCommandRequest.java index 32e3a833..4f001c85 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecCommandRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecCommandRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import com.orion.visor.framework.desensitize.core.annotation.Desensitize; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecInterruptRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecInterruptRequest.java index e32b45b2..0ad5928a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecInterruptRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecInterruptRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobCreateRequest.java index 4eac2a9c..6d1cbe9d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import com.orion.visor.framework.desensitize.core.annotation.Desensitize; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobQueryRequest.java index c6abc30e..83402b4d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import com.orion.visor.framework.common.entity.PageRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobTriggerRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobTriggerRequest.java index 03f9a21f..c1a17281 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobTriggerRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobTriggerRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobUpdateRequest.java index 29e68b80..fb730729 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import com.orion.visor.framework.desensitize.core.annotation.Desensitize; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobUpdateStatusRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobUpdateStatusRequest.java index 53ccbd89..f70e8c5b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobUpdateStatusRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecJobUpdateStatusRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogClearRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogClearRequest.java index 22951fbd..6d50499b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogClearRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogClearRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import com.orion.visor.framework.common.entity.DataClearRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogQueryRequest.java index 4e42d0d3..1870d45f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogTailRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogTailRequest.java index 93dcd1ca..39f7424a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogTailRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecLogTailRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateCreateRequest.java index 86795b39..44ced258 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import com.orion.visor.framework.desensitize.core.annotation.Desensitize; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateQueryRequest.java index 55fe76fc..6f5b435a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import com.orion.visor.framework.common.entity.PageRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateUpdateRequest.java index 30f39f6c..02c1389d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ExecTemplateUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import com.orion.visor.framework.desensitize.core.annotation.Desensitize; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ReExecCommandRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ReExecCommandRequest.java index 7371a8db..f00c5998 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ReExecCommandRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/exec/ReExecCommandRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.exec; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostConnectLogClearRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostConnectLogClearRequest.java deleted file mode 100644 index b9a11e9f..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostConnectLogClearRequest.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.orion.visor.module.asset.entity.request.host; - -import com.orion.visor.framework.common.entity.DataClearRequest; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import javax.validation.constraints.Max; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotNull; - -/** - * 主机连接日志 清理请求对象 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023-12-26 22:09 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@Schema(name = "HostConnectLogClearRequest", description = "主机连接日志 清理请求对象") -public class HostConnectLogClearRequest extends HostConnectLogQueryRequest implements DataClearRequest { - - @NotNull - @Min(value = 1) - @Max(value = 2000) - @Schema(description = "清理数量限制") - private Integer limit; - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostCreateRequest.java index af781b15..1b57e6e1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostExtraQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostExtraQueryRequest.java index 8d173097..385155e5 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostExtraQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostExtraQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostExtraUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostExtraUpdateRequest.java index 3f707756..a51629ec 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostExtraUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostExtraUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostGroupRelUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostGroupRelUpdateRequest.java index b2f78cbc..0e12e18f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostGroupRelUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostGroupRelUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityCreateRequest.java index 10c95a55..1420713b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityQueryRequest.java index 01aae9db..ab6a1520 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import com.orion.visor.framework.common.entity.PageRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityUpdateRequest.java index da877fb5..f5c9079c 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostIdentityUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import com.orion.visor.framework.common.security.UpdatePasswordAction; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyCreateRequest.java index f547bd39..14ffeef1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyQueryRequest.java index fd87ed54..81d63fda 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import com.orion.visor.framework.common.entity.PageRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyUpdateRequest.java index 00a9b8ba..42108507 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostKeyUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import com.orion.visor.framework.common.security.UpdatePasswordAction; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostQueryRequest.java index c42e36f9..1ef3b73b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import com.orion.visor.framework.common.entity.PageRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateConfigRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateConfigRequest.java index 609fb36e..336aa595 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateConfigRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateConfigRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateRequest.java index e282e0a5..05852372 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateStatusRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateStatusRequest.java index 60a9c2fe..e3b04eb6 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateStatusRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostUpdateStatusRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalConnectLogClearRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalConnectLogClearRequest.java new file mode 100644 index 00000000..1c7c8d31 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalConnectLogClearRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.entity.request.host; + +import com.orion.visor.framework.common.entity.DataClearRequest; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; + +/** + * 终端连接日志 清理请求对象 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023-12-26 22:09 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@Schema(name = "TerminalConnectLogClearRequest", description = "终端连接日志 清理请求对象") +public class TerminalConnectLogClearRequest extends TerminalConnectLogQueryRequest implements DataClearRequest { + + @NotNull + @Min(value = 1) + @Max(value = 2000) + @Schema(description = "清理数量限制") + private Integer limit; + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostConnectLogCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalConnectLogCreateRequest.java similarity index 54% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostConnectLogCreateRequest.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalConnectLogCreateRequest.java index 23aea4be..bd414b6b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostConnectLogCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalConnectLogCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import io.swagger.v3.oas.annotations.media.Schema; @@ -10,7 +25,7 @@ import javax.validation.constraints.Size; import java.util.Map; /** - * 主机连接日志 创建请求对象 + * 终端连接日志 创建请求对象 * * @author Jiahang Li * @version 1.0.0 @@ -20,8 +35,8 @@ import java.util.Map; @Builder @NoArgsConstructor @AllArgsConstructor -@Schema(name = "HostConnectLogCreateRequest", description = "主机连接日志 创建请求对象") -public class HostConnectLogCreateRequest { +@Schema(name = "TerminalConnectLogCreateRequest", description = "终端连接日志 创建请求对象") +public class TerminalConnectLogCreateRequest { @Schema(description = "用户id") private Long userId; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostConnectLogQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalConnectLogQueryRequest.java similarity index 65% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostConnectLogQueryRequest.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalConnectLogQueryRequest.java index 9c3fa462..5b7d756e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostConnectLogQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalConnectLogQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import com.fasterxml.jackson.annotation.JsonFormat; @@ -12,7 +27,7 @@ import java.util.Date; import java.util.List; /** - * 主机连接日志 查询请求对象 + * 终端连接日志 查询请求对象 * * @author Jiahang Li * @version 1.0.0 @@ -23,8 +38,8 @@ import java.util.List; @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -@Schema(name = "HostConnectLogQueryRequest", description = "主机连接日志 查询请求对象") -public class HostConnectLogQueryRequest extends PageRequest { +@Schema(name = "TerminalConnectLogQueryRequest", description = "终端连接日志 查询请求对象") +public class TerminalConnectLogQueryRequest extends PageRequest { @NotNull(groups = Id.class) @Schema(description = "id") diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostSftpLogQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalSftpLogQueryRequest.java similarity index 55% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostSftpLogQueryRequest.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalSftpLogQueryRequest.java index 072e5e13..2f859901 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/HostSftpLogQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/host/TerminalSftpLogQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.host; import com.fasterxml.jackson.annotation.JsonFormat; @@ -20,8 +35,8 @@ import java.util.Date; @NoArgsConstructor @AllArgsConstructor @EqualsAndHashCode(callSuper = true) -@Schema(name = "HostSftpLogQueryRequest", description = "SFTP 操作日志 查询请求对象") -public class HostSftpLogQueryRequest extends PageRequest { +@Schema(name = "TerminalSftpLogQueryRequest", description = "SFTP 操作日志 查询请求对象") +public class TerminalSftpLogQueryRequest extends PageRequest { @Schema(description = "用户id") private Long userId; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkCreateRequest.java index 4b90d68b..2aba8b6a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.path; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupCreateRequest.java index a7475e4a..90250442 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.path; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupDeleteRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupDeleteRequest.java index 2402ff41..3c42d210 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupDeleteRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupDeleteRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.path; import com.orion.visor.framework.common.validator.group.Id; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupUpdateRequest.java index 1f4950c6..03e81557 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkGroupUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.path; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkUpdateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkUpdateRequest.java index ec0bdc77..e9ebfaeb 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkUpdateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/path/PathBookmarkUpdateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.path; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskClearRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskClearRequest.java index f68e0d77..e1d62a4a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskClearRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskClearRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.upload; import com.orion.visor.framework.common.entity.DataClearRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskCreateRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskCreateRequest.java index 898c4b97..87eb82e7 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskCreateRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskCreateRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.upload; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskFileRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskFileRequest.java index ff4d3752..3cd10bb1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskFileRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskFileRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.upload; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskQueryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskQueryRequest.java index ab77d3b4..f46f146e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskQueryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskQueryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.upload; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskRequest.java index 6c84e8a7..0efa1e54 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/request/upload/UploadTaskRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.request.upload; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/AuthorizedHostWrapperVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/AuthorizedHostWrapperVO.java index 0ed76505..647de273 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/AuthorizedHostWrapperVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/AuthorizedHostWrapperVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; @@ -33,7 +48,4 @@ public class AuthorizedHostWrapperVO { @Schema(description = "分组树节点映射 groupId:hostIdList") private Map> treeNodes; - @Schema(description = "最近访问的主机") - private Set latestHosts; - } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetGroupVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetGroupVO.java index d854f97e..4c68a748 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetGroupVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetGroupVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetVO.java index 700c1187..27f50513 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetWrapperVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetWrapperVO.java index fb1989c6..68e32f87 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetWrapperVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/CommandSnippetWrapperVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecHostLogVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecHostLogVO.java index 6395a0b0..24f6ea38 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecHostLogVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecHostLogVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecJobHostVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecJobHostVO.java index b9dcd925..ffb0814f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecJobHostVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecJobHostVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecJobVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecJobVO.java index cae4bcea..4534c9cb 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecJobVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecJobVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecLogStatusVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecLogStatusVO.java index df679df3..1449b2c1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecLogStatusVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecLogStatusVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecLogVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecLogVO.java index ad11f910..993acd6a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecLogVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecLogVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecTemplateVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecTemplateVO.java index 5836f418..78472726 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecTemplateVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/ExecTemplateVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostBaseVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostBaseVO.java index 8afde82a..2cb734e3 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostBaseVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostBaseVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostConfigVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostConfigVO.java index 79cd1e31..85753e18 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostConfigVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostConfigVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostGroupTreeVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostGroupTreeVO.java index 6aceb309..0a19e665 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostGroupTreeVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostGroupTreeVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostIdentityVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostIdentityVO.java index c0fb2c06..1266f4f1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostIdentityVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostIdentityVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostKeyVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostKeyVO.java index a678175b..10153a14 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostKeyVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostKeyVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostTerminalThemeVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostTerminalThemeVO.java deleted file mode 100644 index 8e944ea8..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostTerminalThemeVO.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.orion.visor.module.asset.entity.vo; - -import com.alibaba.fastjson.JSONObject; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 主机终端主题 视图响应对象 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2024/7/4 19:27 - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -@Schema(name = "HostTerminalThemeVO", description = "主机终端主题 视图响应对象") -public class HostTerminalThemeVO { - - @Schema(description = "主题名称") - private String name; - - @Schema(description = "是否为暗色") - private Boolean dark; - - @Schema(description = "主题 schema") - private JSONObject schema; - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostVO.java index 3b842bf5..8d5e0c39 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import com.orion.visor.module.infra.entity.dto.tag.TagDTO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkGroupVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkGroupVO.java index 58c894f3..c452ce91 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkGroupVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkGroupVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkVO.java index 5d4b7dc5..7ccb56dd 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkWrapperVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkWrapperVO.java index 943c1b7a..58ddd439 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkWrapperVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/PathBookmarkWrapperVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostConnectLogVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/TerminalConnectLogVO.java similarity index 54% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostConnectLogVO.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/TerminalConnectLogVO.java index e6cabd1b..59c5ed8f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostConnectLogVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/TerminalConnectLogVO.java @@ -1,6 +1,21 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; -import com.orion.visor.module.asset.entity.dto.HostConnectLogExtraDTO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectLogExtraDTO; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; @@ -11,7 +26,7 @@ import java.io.Serializable; import java.util.Date; /** - * 主机连接日志 视图响应对象 + * 终端连接日志 视图响应对象 * * @author Jiahang Li * @version 1.0.0 @@ -21,8 +36,8 @@ import java.util.Date; @Builder @NoArgsConstructor @AllArgsConstructor -@Schema(name = "HostConnectLogVO", description = "主机连接日志 视图响应对象") -public class HostConnectLogVO implements Serializable { +@Schema(name = "TerminalConnectLogVO", description = "终端连接日志 视图响应对象") +public class TerminalConnectLogVO implements Serializable { private static final long serialVersionUID = 1L; @@ -57,6 +72,6 @@ public class HostConnectLogVO implements Serializable { private Date endTime; @Schema(description = "额外信息") - private HostConnectLogExtraDTO extra; + private TerminalConnectLogExtraDTO extra; } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostSftpLogVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/TerminalSftpLogVO.java similarity index 65% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostSftpLogVO.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/TerminalSftpLogVO.java index 86960c05..34223d95 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/HostSftpLogVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/TerminalSftpLogVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; @@ -21,8 +36,8 @@ import java.util.Map; @Builder @NoArgsConstructor @AllArgsConstructor -@Schema(name = "HostSftpLogVO", description = "SFTP 操作日志 实体对象") -public class HostSftpLogVO implements Serializable { +@Schema(name = "TerminalSftpLogVO", description = "SFTP 操作日志 实体对象") +public class TerminalSftpLogVO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/TerminalThemeVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/TerminalThemeVO.java new file mode 100644 index 00000000..f6c29d38 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/TerminalThemeVO.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.entity.vo; + +import com.alibaba.fastjson.JSONObject; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 终端主题 视图响应对象 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/7/4 19:27 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@Schema(name = "TerminalThemeVO", description = "终端主题 视图响应对象") +public class TerminalThemeVO { + + @Schema(description = "主题名称") + private String name; + + @Schema(description = "是否为暗色") + private Boolean dark; + + @Schema(description = "主题 schema") + private JSONObject schema; + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskCreateVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskCreateVO.java index 5de4368b..845a4190 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskCreateVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskCreateVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskFileVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskFileVO.java index 5ade5702..1aa0711d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskFileVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskFileVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskHostVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskHostVO.java index abb7b578..dd75325d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskHostVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskHostVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskStatusVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskStatusVO.java index 3363af91..796b3eca 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskStatusVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskStatusVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskVO.java index 20a284c9..2464b81b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/entity/vo/UploadTaskVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.entity.vo; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecHostStatusEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecHostStatusEnum.java index eaa4e054..3e14f3e7 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecHostStatusEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecHostStatusEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecJobStatusEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecJobStatusEnum.java index c6549aa9..5c1849e6 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecJobStatusEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecJobStatusEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecSourceEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecSourceEnum.java index dbb692b2..180eaf88 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecSourceEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecSourceEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; /** diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecStatusEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecStatusEnum.java index a8516db2..b31cb6bc 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecStatusEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ExecStatusEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; import com.orion.lang.utils.collect.Lists; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostConnectStatusEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostConnectStatusEnum.java deleted file mode 100644 index 892eaffa..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostConnectStatusEnum.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.orion.visor.module.asset.enums; - -import com.orion.lang.utils.collect.Lists; - -import java.util.List; - -/** - * 主机连接状态 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023/12/26 22:27 - */ -public enum HostConnectStatusEnum { - - /** - * 连接中 - */ - CONNECTING, - - /** - * 完成 - */ - COMPLETE, - - /** - * 失败 - */ - FAILED, - - /** - * 强制下线 - */ - FORCE_OFFLINE, - - ; - - public static final List FINISH_STATUS_LIST = Lists.of(COMPLETE.name(), FAILED.name(), FORCE_OFFLINE.name()); - - public static HostConnectStatusEnum of(String type) { - if (type == null) { - return null; - } - for (HostConnectStatusEnum value : values()) { - if (value.name().equals(type)) { - return value; - } - } - return null; - } - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostConnectTypeEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostConnectTypeEnum.java deleted file mode 100644 index 9269865f..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostConnectTypeEnum.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.orion.visor.module.asset.enums; - -/** - * 主机连接类型 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023/12/26 22:27 - */ -public enum HostConnectTypeEnum { - - /** - * ssh - */ - SSH, - - /** - * sftp - */ - SFTP, - - ; - - public static HostConnectTypeEnum of(String type) { - if (type == null) { - return null; - } - for (HostConnectTypeEnum value : values()) { - if (value.name().equalsIgnoreCase(type)) { - return value; - } - } - return null; - } - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostExtraItemEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostExtraItemEnum.java index 6f97b04f..420ed1be 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostExtraItemEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostExtraItemEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; import com.orion.visor.framework.common.handler.data.GenericsDataDefinition; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostExtraSshAuthTypeEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostExtraSshAuthTypeEnum.java index 628a9bc0..a6e59e9e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostExtraSshAuthTypeEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostExtraSshAuthTypeEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; /** diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostIdentityTypeEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostIdentityTypeEnum.java index e152c8ed..d1159317 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostIdentityTypeEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostIdentityTypeEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; /** diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostSshAuthTypeEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostSshAuthTypeEnum.java index 7d7f5021..51fca2d5 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostSshAuthTypeEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostSshAuthTypeEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; /** diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostSshOsTypeEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostSshOsTypeEnum.java index 393ac2fe..89538b03 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostSshOsTypeEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostSshOsTypeEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostStatusEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostStatusEnum.java index 3eb0cd4e..714bc864 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostStatusEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostStatusEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; /** diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostTypeEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostTypeEnum.java index f85cea55..1b451ffc 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostTypeEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/HostTypeEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; import com.orion.visor.framework.common.handler.data.GenericsDataDefinition; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ScriptExecEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ScriptExecEnum.java index 69253546..ef3027b5 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ScriptExecEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/ScriptExecEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/TerminalConnectStatusEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/TerminalConnectStatusEnum.java new file mode 100644 index 00000000..0e42dcb4 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/TerminalConnectStatusEnum.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.enums; + +import com.orion.lang.utils.collect.Lists; + +import java.util.List; + +/** + * 终端连接状态 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023/12/26 22:27 + */ +public enum TerminalConnectStatusEnum { + + /** + * 连接中 + */ + CONNECTING, + + /** + * 完成 + */ + COMPLETE, + + /** + * 失败 + */ + FAILED, + + /** + * 强制下线 + */ + FORCE_OFFLINE, + + ; + + public static final List FINISH_STATUS_LIST = Lists.of(COMPLETE.name(), FAILED.name(), FORCE_OFFLINE.name()); + + public static TerminalConnectStatusEnum of(String type) { + if (type == null) { + return null; + } + for (TerminalConnectStatusEnum value : values()) { + if (value.name().equals(type)) { + return value; + } + } + return null; + } + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/TerminalConnectTypeEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/TerminalConnectTypeEnum.java new file mode 100644 index 00000000..42c3c8ab --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/TerminalConnectTypeEnum.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.enums; + +/** + * 终端连接类型 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023/12/26 22:27 + */ +public enum TerminalConnectTypeEnum { + + /** + * ssh + */ + SSH, + + /** + * sftp + */ + SFTP, + + ; + + public static TerminalConnectTypeEnum of(String type) { + if (type == null) { + return null; + } + for (TerminalConnectTypeEnum value : values()) { + if (value.name().equalsIgnoreCase(type)) { + return value; + } + } + return null; + } + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/UploadTaskFileStatusEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/UploadTaskFileStatusEnum.java index c4dcf17d..86d76f59 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/UploadTaskFileStatusEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/UploadTaskFileStatusEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; /** diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/UploadTaskStatusEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/UploadTaskStatusEnum.java index 43072363..9a4b6429 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/UploadTaskStatusEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/enums/UploadTaskStatusEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/config/model/HostSshConfigModel.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/config/model/HostSshConfigModel.java index a55bcaa6..b97ccb2e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/config/model/HostSshConfigModel.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/config/model/HostSshConfigModel.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.config.model; import com.orion.visor.framework.common.handler.data.model.GenericsDataModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/config/strategy/HostSshConfigStrategy.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/config/strategy/HostSshConfigStrategy.java index c05f480e..ae4db016 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/config/strategy/HostSshConfigStrategy.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/config/strategy/HostSshConfigStrategy.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.config.strategy; import com.orion.lang.utils.Booleans; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/ExecTaskExecutors.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/ExecTaskExecutors.java index a819b8cc..27815f84 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/ExecTaskExecutors.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/ExecTaskExecutors.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.command; import com.orion.visor.module.asset.define.AssetThreadPools; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/BaseExecCommandHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/BaseExecCommandHandler.java index 0d63c03e..c0331d4b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/BaseExecCommandHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/BaseExecCommandHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.command.handler; import com.alibaba.fastjson.JSON; @@ -20,13 +35,13 @@ import com.orion.visor.framework.common.file.FileClient; import com.orion.visor.framework.common.utils.PathUtils; import com.orion.visor.module.asset.dao.ExecHostLogDAO; import com.orion.visor.module.asset.entity.domain.ExecHostLogDO; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; import com.orion.visor.module.asset.enums.ExecHostStatusEnum; import com.orion.visor.module.asset.handler.host.exec.command.model.ExecCommandDTO; import com.orion.visor.module.asset.handler.host.exec.command.model.ExecCommandHostDTO; import com.orion.visor.module.asset.handler.host.exec.log.manager.ExecLogManager; import com.orion.visor.module.asset.handler.host.jsch.SessionStores; -import com.orion.visor.module.asset.service.HostTerminalService; +import com.orion.visor.module.asset.service.TerminalService; import lombok.Getter; import lombok.extern.slf4j.Slf4j; @@ -49,7 +64,7 @@ public abstract class BaseExecCommandHandler implements IExecCommandHandler { private static final ExecLogManager execLogManager = SpringHolder.getBean(ExecLogManager.class); - private static final HostTerminalService hostTerminalService = SpringHolder.getBean(HostTerminalService.class); + private static final TerminalService terminalService = SpringHolder.getBean(TerminalService.class); private static final ExecHostLogDAO execHostLogDAO = SpringHolder.getBean(ExecHostLogDAO.class); @@ -131,7 +146,7 @@ public abstract class BaseExecCommandHandler implements IExecCommandHandler { // 初始化日志 this.initLogOutputStream(); // 打开会话 - HostTerminalConnectDTO connect = hostTerminalService.getTerminalConnectInfo(execHostCommand.getHostId()); + TerminalConnectDTO connect = terminalService.getTerminalConnectInfo(execHostCommand.getHostId()); this.sessionStore = SessionStores.openSessionStore(connect); if (Booleans.isTrue(execCommand.getScriptExec())) { // 上传脚本文件 diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecCommandAnsiHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecCommandAnsiHandler.java index 45514cfa..e9640e0c 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecCommandAnsiHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecCommandAnsiHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.command.handler; import com.orion.lang.support.timeout.TimeoutChecker; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecCommandOriginHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecCommandOriginHandler.java index 76cc1a6a..26cc036b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecCommandOriginHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecCommandOriginHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.command.handler; import com.orion.lang.support.timeout.TimeoutChecker; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecTaskHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecTaskHandler.java index bcbeb0aa..ea3f97b9 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecTaskHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/ExecTaskHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.command.handler; import com.orion.lang.support.timeout.TimeoutChecker; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/IExecCommandHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/IExecCommandHandler.java index 920c2d4b..8254f74a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/IExecCommandHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/IExecCommandHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.command.handler; import com.orion.lang.able.SafeCloseable; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/IExecTaskHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/IExecTaskHandler.java index b520ac65..efebd9e0 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/IExecTaskHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/handler/IExecTaskHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.command.handler; import com.orion.lang.able.SafeCloseable; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/manager/ExecTaskManager.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/manager/ExecTaskManager.java index d1f4768d..5e02c147 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/manager/ExecTaskManager.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/manager/ExecTaskManager.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.command.manager; import com.orion.visor.module.asset.handler.host.exec.command.handler.IExecTaskHandler; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/model/ExecCommandDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/model/ExecCommandDTO.java index a6376084..782ca4c4 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/model/ExecCommandDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/model/ExecCommandDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.command.model; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/model/ExecCommandHostDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/model/ExecCommandHostDTO.java index defbdb60..2c7d6dbf 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/model/ExecCommandHostDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/command/model/ExecCommandHostDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.command.model; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/job/ExecCommandJob.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/job/ExecCommandJob.java index ae44006d..722064d3 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/job/ExecCommandJob.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/job/ExecCommandJob.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.job; import com.orion.spring.SpringHolder; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/ExecLogTailHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/ExecLogTailHandler.java index 3b29d9e6..1f18d1c2 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/ExecLogTailHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/ExecLogTailHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.log; import com.orion.lang.annotation.Keep; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/constant/LogConst.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/constant/LogConst.java index 3249566a..7747118c 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/constant/LogConst.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/constant/LogConst.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.log.constant; /** diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/manager/ExecLogManager.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/manager/ExecLogManager.java index 07462a23..5912901b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/manager/ExecLogManager.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/manager/ExecLogManager.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.log.manager; import com.orion.lang.utils.Threads; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/tracker/ExecLogTracker.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/tracker/ExecLogTracker.java index edafff01..a17cfed9 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/tracker/ExecLogTracker.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/tracker/ExecLogTracker.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.log.tracker; import com.orion.ext.tail.Tracker; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/tracker/IExecLogTracker.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/tracker/IExecLogTracker.java index 2de09476..6a881ae3 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/tracker/IExecLogTracker.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/exec/log/tracker/IExecLogTracker.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.exec.log.tracker; import com.orion.ext.tail.handler.DataHandler; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/model/HostLabelExtraModel.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/model/HostLabelExtraModel.java index a9fd70a0..016cbd19 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/model/HostLabelExtraModel.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/model/HostLabelExtraModel.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.extra.model; import com.orion.visor.framework.common.handler.data.model.GenericsDataModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/model/HostSshExtraModel.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/model/HostSshExtraModel.java index 6344ff40..ff3ab45a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/model/HostSshExtraModel.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/model/HostSshExtraModel.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.extra.model; import com.orion.visor.framework.common.handler.data.model.GenericsDataModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/strategy/HostLabelExtraStrategy.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/strategy/HostLabelExtraStrategy.java index bb7fc4c6..0b1a2c96 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/strategy/HostLabelExtraStrategy.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/strategy/HostLabelExtraStrategy.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.extra.strategy; import com.orion.visor.framework.common.constant.Const; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/strategy/HostSshExtraStrategy.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/strategy/HostSshExtraStrategy.java index bf80a679..0720feaa 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/strategy/HostSshExtraStrategy.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/extra/strategy/HostSshExtraStrategy.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.extra.strategy; import com.orion.visor.framework.common.constant.ErrorMessage; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/jsch/SessionMessage.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/jsch/SessionMessage.java index 1b5a29d4..be90f668 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/jsch/SessionMessage.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/jsch/SessionMessage.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.jsch; /** diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/jsch/SessionStores.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/jsch/SessionStores.java index b8e9168b..3bf24570 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/jsch/SessionStores.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/jsch/SessionStores.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.jsch; import com.orion.lang.exception.AuthenticationException; @@ -10,7 +25,7 @@ import com.orion.net.host.SessionStore; import com.orion.visor.framework.common.constant.AppConst; import com.orion.visor.framework.common.constant.Const; import com.orion.visor.framework.common.utils.CryptoUtils; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; import lombok.extern.slf4j.Slf4j; import java.util.Optional; @@ -33,7 +48,7 @@ public class SessionStores { * @param conn conn * @return sessionStore */ - public static SessionStore openSessionStore(HostTerminalConnectDTO conn) { + public static SessionStore openSessionStore(TerminalConnectDTO conn) { Long hostId = conn.getHostId(); String address = conn.getHostAddress(); String username = conn.getUsername(); @@ -66,7 +81,7 @@ public class SessionStores { * @param sessionHolder sessionHolder * @return sessionStore */ - private static SessionStore createSessionStore(HostTerminalConnectDTO conn, SessionHolder sessionHolder) { + private static SessionStore createSessionStore(TerminalConnectDTO conn, SessionHolder sessionHolder) { final boolean useKey = conn.getKeyId() != null; // 使用密钥认证 if (useKey) { diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/TerminalMessageDispatcher.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/TerminalMessageDispatcher.java index d60beb22..c8d53cf4 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/TerminalMessageDispatcher.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/TerminalMessageDispatcher.java @@ -1,8 +1,23 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal; import com.orion.visor.module.asset.define.AssetThreadPools; import com.orion.visor.module.asset.handler.host.terminal.enums.InputTypeEnum; -import com.orion.visor.module.asset.handler.host.terminal.manager.HostTerminalManager; +import com.orion.visor.module.asset.handler.host.terminal.manager.TerminalManager; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import org.springframework.web.socket.CloseStatus; @@ -24,7 +39,7 @@ import javax.annotation.Resource; public class TerminalMessageDispatcher extends AbstractWebSocketHandler { @Resource - private HostTerminalManager hostTerminalManager; + private TerminalManager terminalManager; @Override protected void handleTextMessage(WebSocketSession session, TextMessage message) { @@ -65,7 +80,7 @@ public class TerminalMessageDispatcher extends AbstractWebSocketHandler { String id = session.getId(); log.info("TerminalMessageDispatcher-afterConnectionClosed id: {}, code: {}, reason: {}", id, status.getCode(), status.getReason()); // 关闭会话 - hostTerminalManager.closeSession(id); + terminalManager.closeSession(id); } } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/constant/TerminalMessage.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/constant/TerminalMessage.java index 88d74f96..b0052458 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/constant/TerminalMessage.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/constant/TerminalMessage.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.constant; /** diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/enums/InputTypeEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/enums/InputTypeEnum.java index 7914f165..d83b0059 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/enums/InputTypeEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/enums/InputTypeEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.enums; import com.alibaba.fastjson.JSONObject; @@ -20,7 +35,7 @@ import javax.annotation.PostConstruct; public enum InputTypeEnum { /** - * 主机连接检查 + * 终端连接检查 */ CHECK("ck", TerminalCheckHandler.class, @@ -159,8 +174,8 @@ public enum InputTypeEnum { */ SFTP_SET_CONTENT("sc", SftpSetContentHandler.class, - new String[]{"type", "sessionId", "path", "content"}, - SftpSetContentRequest.class, + new String[]{"type", "sessionId", "path"}, + SftpBaseRequest.class, true), ; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/enums/OutputTypeEnum.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/enums/OutputTypeEnum.java index 413e56ca..71ac0887 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/enums/OutputTypeEnum.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/enums/OutputTypeEnum.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.enums; import com.orion.lang.utils.json.matcher.ReplacementFormatters; @@ -16,12 +31,12 @@ import lombok.Getter; public enum OutputTypeEnum { /** - * 主机连接检查 + * 终端连接检查 */ CHECK("ck", "${type}|${sessionId}|${result}|${msg}"), /** - * 主机连接 + * 终端连接 */ CONNECT("co", "${type}|${sessionId}|${result}|${msg}"), @@ -83,12 +98,12 @@ public enum OutputTypeEnum { /** * SFTP 获取文件内容 */ - SFTP_GET_CONTENT("gc", "${type}|${sessionId}|${path}|${result}|${msg}|${content}"), + SFTP_GET_CONTENT("gc", "${type}|${sessionId}|${result}|${msg}|${token}"), /** * SFTP 修改文件内容 */ - SFTP_SET_CONTENT("sc", "${type}|${sessionId}|${result}|${msg}"), + SFTP_SET_CONTENT("sc", "${type}|${sessionId}|${result}|${msg}|${token}"), ; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/AbstractTerminalHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/AbstractTerminalHandler.java index 179b0fb8..3b7119ea 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/AbstractTerminalHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/AbstractTerminalHandler.java @@ -1,13 +1,27 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; -import com.orion.lang.exception.argument.InvalidArgumentException; import com.orion.visor.framework.biz.operator.log.core.model.OperatorLogModel; import com.orion.visor.framework.biz.operator.log.core.service.OperatorLogFrameworkService; import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; import com.orion.visor.framework.common.constant.ErrorMessage; import com.orion.visor.framework.websocket.core.utils.WebSockets; import com.orion.visor.module.asset.handler.host.terminal.enums.OutputTypeEnum; -import com.orion.visor.module.asset.handler.host.terminal.manager.HostTerminalManager; +import com.orion.visor.module.asset.handler.host.terminal.manager.TerminalManager; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalConfig; import com.orion.visor.module.asset.handler.host.terminal.session.ITerminalSession; @@ -27,7 +41,7 @@ import java.util.Map; public abstract class AbstractTerminalHandler implements ITerminalHandler { @Resource - protected HostTerminalManager hostTerminalManager; + protected TerminalManager terminalManager; @Resource private OperatorLogFrameworkService operatorLogFrameworkService; @@ -75,7 +89,7 @@ public abstract class AbstractTerminalHandler imp String channelId = channel.getId(); String sessionId = payload.getSessionId(); // 获取会话并且设置参数 - ITerminalSession session = hostTerminalManager.getSession(channelId, sessionId); + ITerminalSession session = terminalManager.getSession(channelId, sessionId); if (session != null) { TerminalConfig config = session.getConfig(); extra.put(OperatorLogs.HOST_ID, config.getHostId()); diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/ITerminalHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/ITerminalHandler.java index 469da46d..4a7899af 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/ITerminalHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/ITerminalHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpChangeModeHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpChangeModeHandler.java index c449bb73..57f10aea 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpChangeModeHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpChangeModeHandler.java @@ -1,9 +1,24 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; import com.orion.lang.utils.collect.Maps; import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; import com.orion.visor.framework.common.enums.BooleanBit; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; import com.orion.visor.module.asset.handler.host.terminal.enums.OutputTypeEnum; import com.orion.visor.module.asset.handler.host.terminal.model.request.SftpChangeModeRequest; import com.orion.visor.module.asset.handler.host.terminal.model.response.SftpBaseResponse; @@ -30,7 +45,7 @@ public class SftpChangeModeHandler extends AbstractTerminalHandler { public void handle(WebSocketSession channel, SftpListRequest payload) { // 获取会话 String sessionId = payload.getSessionId(); - ISftpSession session = hostTerminalManager.getSession(channel.getId(), sessionId); + ISftpSession session = terminalManager.getSession(channel.getId(), sessionId); String path = payload.getPath(); log.info("SftpListHandler-handle start sessionId: {}, path: {}", sessionId, path); Exception ex = null; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpMakeDirectoryHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpMakeDirectoryHandler.java index e6e2d9b6..7a58da44 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpMakeDirectoryHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpMakeDirectoryHandler.java @@ -1,9 +1,24 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; import com.orion.lang.utils.collect.Maps; import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; import com.orion.visor.framework.common.enums.BooleanBit; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; import com.orion.visor.module.asset.handler.host.terminal.enums.OutputTypeEnum; import com.orion.visor.module.asset.handler.host.terminal.model.request.SftpBaseRequest; import com.orion.visor.module.asset.handler.host.terminal.model.response.SftpBaseResponse; @@ -30,7 +45,7 @@ public class SftpMakeDirectoryHandler extends AbstractTerminalHandler extra = Maps.newMap(); extra.put(OperatorLogs.PATH, path); this.saveOperatorLog(payload, channel, - extra, HostTerminalOperatorType.SFTP_MKDIR, + extra, TerminalOperatorType.SFTP_MKDIR, startTime, ex); } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpMoveHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpMoveHandler.java index 256a796f..e24f3e74 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpMoveHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpMoveHandler.java @@ -1,9 +1,24 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; import com.orion.lang.utils.collect.Maps; import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; import com.orion.visor.framework.common.enums.BooleanBit; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; import com.orion.visor.module.asset.handler.host.terminal.enums.OutputTypeEnum; import com.orion.visor.module.asset.handler.host.terminal.model.request.SftpMoveRequest; import com.orion.visor.module.asset.handler.host.terminal.model.response.SftpBaseResponse; @@ -30,7 +45,7 @@ public class SftpMoveHandler extends AbstractTerminalHandler { long startTime = System.currentTimeMillis(); // 获取会话 String sessionId = payload.getSessionId(); - ISftpSession session = hostTerminalManager.getSession(channel.getId(), sessionId); + ISftpSession session = terminalManager.getSession(channel.getId(), sessionId); String path = payload.getPath(); String target = payload.getTarget(); log.info("SftpMoveHandler-handle start sessionId: {}, path: {}, target: {}", sessionId, path, target); @@ -56,7 +71,7 @@ public class SftpMoveHandler extends AbstractTerminalHandler { extra.put(OperatorLogs.PATH, path); extra.put(OperatorLogs.TARGET, target); this.saveOperatorLog(payload, channel, - extra, HostTerminalOperatorType.SFTP_MOVE, + extra, TerminalOperatorType.SFTP_MOVE, startTime, ex); } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpRemoveHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpRemoveHandler.java index 2b4759b6..294c9a29 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpRemoveHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpRemoveHandler.java @@ -1,9 +1,24 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; import com.orion.lang.utils.collect.Maps; import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; import com.orion.visor.framework.common.enums.BooleanBit; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; import com.orion.visor.module.asset.handler.host.terminal.enums.OutputTypeEnum; import com.orion.visor.module.asset.handler.host.terminal.model.request.SftpBaseRequest; import com.orion.visor.module.asset.handler.host.terminal.model.response.SftpBaseResponse; @@ -32,7 +47,7 @@ public class SftpRemoveHandler extends AbstractTerminalHandler String path = payload.getPath(); String sessionId = payload.getSessionId(); // 获取会话 - ISftpSession session = hostTerminalManager.getSession(channel.getId(), sessionId); + ISftpSession session = terminalManager.getSession(channel.getId(), sessionId); String[] paths = path.split("\\|"); log.info("SftpRemoveHandler-handle start sessionId: {}, path: {}", sessionId, Arrays.toString(paths)); Exception ex = null; @@ -56,7 +71,7 @@ public class SftpRemoveHandler extends AbstractTerminalHandler Map extra = Maps.newMap(); extra.put(OperatorLogs.PATH, path); this.saveOperatorLog(payload, channel, - extra, HostTerminalOperatorType.SFTP_REMOVE, + extra, TerminalOperatorType.SFTP_REMOVE, startTime, ex); } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpSetContentHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpSetContentHandler.java index 98eae143..6f3d4ec4 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpSetContentHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpSetContentHandler.java @@ -1,12 +1,31 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; +import com.orion.lang.id.UUIds; import com.orion.lang.utils.collect.Maps; import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; import com.orion.visor.framework.common.enums.BooleanBit; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; +import com.orion.visor.framework.redis.core.utils.RedisStrings; +import com.orion.visor.module.asset.define.cache.TerminalCacheKeyDefine; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; +import com.orion.visor.module.asset.entity.dto.SftpSetContentCacheDTO; import com.orion.visor.module.asset.handler.host.terminal.enums.OutputTypeEnum; -import com.orion.visor.module.asset.handler.host.terminal.model.request.SftpSetContentRequest; -import com.orion.visor.module.asset.handler.host.terminal.model.response.SftpBaseResponse; +import com.orion.visor.module.asset.handler.host.terminal.model.request.SftpBaseRequest; +import com.orion.visor.module.asset.handler.host.terminal.model.response.SftpSetContentResponse; import com.orion.visor.module.asset.handler.host.terminal.session.ISftpSession; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -23,20 +42,28 @@ import java.util.Map; */ @Slf4j @Component -public class SftpSetContentHandler extends AbstractTerminalHandler { +public class SftpSetContentHandler extends AbstractTerminalHandler { @Override - public void handle(WebSocketSession channel, SftpSetContentRequest payload) { + public void handle(WebSocketSession channel, SftpBaseRequest payload) { long startTime = System.currentTimeMillis(); // 获取会话 String sessionId = payload.getSessionId(); - ISftpSession session = hostTerminalManager.getSession(channel.getId(), sessionId); + ISftpSession session = terminalManager.getSession(channel.getId(), sessionId); String path = payload.getPath(); log.info("SftpSetContentHandler-handle start sessionId: {}, path: {}", sessionId, path); + String token = UUIds.random32(); Exception ex = null; - // 修改内容 try { - session.setContent(path, payload.getContent()); + // 检查文件是否可编辑 + session.checkCanEdit(path); + // 设置缓存 + String key = TerminalCacheKeyDefine.TERMINAL_SFTP_SET_CONTENT.format(token); + SftpSetContentCacheDTO cache = SftpSetContentCacheDTO.builder() + .hostId(session.getConfig().getHostId()) + .path(path) + .build(); + RedisStrings.setJson(key, TerminalCacheKeyDefine.TERMINAL_SFTP_SET_CONTENT, cache); log.info("SftpSetContentHandler-handle success sessionId: {}, path: {}", sessionId, path); } catch (Exception e) { log.error("SftpSetContentHandler-handle error sessionId: {}", sessionId, e); @@ -45,16 +72,17 @@ public class SftpSetContentHandler extends AbstractTerminalHandler extra = Maps.newMap(); extra.put(OperatorLogs.PATH, path); this.saveOperatorLog(payload, channel, - extra, HostTerminalOperatorType.SFTP_SET_CONTENT, + extra, TerminalOperatorType.SFTP_SET_CONTENT, startTime, ex); } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpTouchHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpTouchHandler.java index 047dc87e..cc5a1c5e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpTouchHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpTouchHandler.java @@ -1,9 +1,24 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; import com.orion.lang.utils.collect.Maps; import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; import com.orion.visor.framework.common.enums.BooleanBit; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; import com.orion.visor.module.asset.handler.host.terminal.enums.OutputTypeEnum; import com.orion.visor.module.asset.handler.host.terminal.model.request.SftpBaseRequest; import com.orion.visor.module.asset.handler.host.terminal.model.response.SftpBaseResponse; @@ -30,7 +45,7 @@ public class SftpTouchHandler extends AbstractTerminalHandler { long startTime = System.currentTimeMillis(); // 获取会话 String sessionId = payload.getSessionId(); - ISftpSession session = hostTerminalManager.getSession(channel.getId(), sessionId); + ISftpSession session = terminalManager.getSession(channel.getId(), sessionId); String path = payload.getPath(); log.info("SftpTouchHandler-handle start sessionId: {}, path: {}", sessionId, path); Exception ex = null; @@ -54,7 +69,7 @@ public class SftpTouchHandler extends AbstractTerminalHandler { Map extra = Maps.newMap(); extra.put(OperatorLogs.PATH, path); this.saveOperatorLog(payload, channel, - extra, HostTerminalOperatorType.SFTP_TOUCH, + extra, TerminalOperatorType.SFTP_TOUCH, startTime, ex); } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpTruncateHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpTruncateHandler.java index d6652033..386648e8 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpTruncateHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SftpTruncateHandler.java @@ -1,9 +1,24 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; import com.orion.lang.utils.collect.Maps; import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; import com.orion.visor.framework.common.enums.BooleanBit; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; import com.orion.visor.module.asset.handler.host.terminal.enums.OutputTypeEnum; import com.orion.visor.module.asset.handler.host.terminal.model.request.SftpBaseRequest; import com.orion.visor.module.asset.handler.host.terminal.model.response.SftpBaseResponse; @@ -30,7 +45,7 @@ public class SftpTruncateHandler extends AbstractTerminalHandler extra = Maps.newMap(); extra.put(OperatorLogs.PATH, path); this.saveOperatorLog(payload, channel, - extra, HostTerminalOperatorType.SFTP_TRUNCATE, + extra, TerminalOperatorType.SFTP_TRUNCATE, startTime, ex); } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SshInputHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SshInputHandler.java index 56554408..bb4d2f11 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SshInputHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SshInputHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; import com.orion.visor.module.asset.handler.host.terminal.model.request.SshInputRequest; @@ -20,7 +35,7 @@ public class SshInputHandler extends AbstractTerminalHandler { @Override public void handle(WebSocketSession channel, SshInputRequest payload) { // 获取会话 - ISshSession session = hostTerminalManager.getSession(channel.getId(), payload.getSessionId()); + ISshSession session = terminalManager.getSession(channel.getId(), payload.getSessionId()); // 处理输入 session.write(payload.getCommand()); } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SshResizeHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SshResizeHandler.java index 88c1df18..9c61e521 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SshResizeHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/SshResizeHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; import com.orion.visor.module.asset.handler.host.terminal.model.request.SshResizeRequest; @@ -20,7 +35,7 @@ public class SshResizeHandler extends AbstractTerminalHandler @Override public void handle(WebSocketSession channel, SshResizeRequest payload) { // 获取会话 - ISshSession session = hostTerminalManager.getSession(channel.getId(), payload.getSessionId()); + ISshSession session = terminalManager.getSession(channel.getId(), payload.getSessionId()); // 修改大小 session.resize(payload.getCols(), payload.getRows()); } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/TerminalCheckHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/TerminalCheckHandler.java index 7e1f8426..ec614d45 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/TerminalCheckHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/handler/TerminalCheckHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.handler; import com.orion.lang.exception.DisabledException; @@ -12,21 +27,21 @@ import com.orion.visor.framework.common.constant.ExtraFieldConst; import com.orion.visor.framework.common.enums.BooleanBit; import com.orion.visor.framework.websocket.core.utils.WebSockets; import com.orion.visor.module.asset.dao.HostDAO; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; -import com.orion.visor.module.asset.entity.domain.HostConnectLogDO; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; import com.orion.visor.module.asset.entity.domain.HostDO; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogCreateRequest; -import com.orion.visor.module.asset.enums.HostConnectStatusEnum; -import com.orion.visor.module.asset.enums.HostConnectTypeEnum; +import com.orion.visor.module.asset.entity.domain.TerminalConnectLogDO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogCreateRequest; +import com.orion.visor.module.asset.enums.TerminalConnectStatusEnum; +import com.orion.visor.module.asset.enums.TerminalConnectTypeEnum; import com.orion.visor.module.asset.handler.host.terminal.constant.TerminalMessage; import com.orion.visor.module.asset.handler.host.terminal.enums.OutputTypeEnum; import com.orion.visor.module.asset.handler.host.terminal.model.request.TerminalCheckRequest; import com.orion.visor.module.asset.handler.host.terminal.model.response.TerminalCheckResponse; import com.orion.visor.module.asset.handler.host.terminal.session.ITerminalSession; import com.orion.visor.module.asset.handler.host.terminal.utils.TerminalUtils; -import com.orion.visor.module.asset.service.HostConnectLogService; -import com.orion.visor.module.asset.service.HostTerminalService; +import com.orion.visor.module.asset.service.TerminalConnectLogService; +import com.orion.visor.module.asset.service.TerminalService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import org.springframework.web.socket.WebSocketSession; @@ -35,7 +50,7 @@ import javax.annotation.Resource; import java.util.Map; /** - * 主机连接检查 + * 终端连接检查 * * @author Jiahang Li * @version 1.0.0 @@ -49,10 +64,10 @@ public class TerminalCheckHandler extends AbstractTerminalHandler { @Resource - private HostConnectLogService hostConnectLogService; + private TerminalConnectLogService terminalConnectLogService; @Override public void handle(WebSocketSession channel, TerminalConnectRequest payload) { String sessionId = payload.getSessionId(); log.info("TerminalConnectHandler-handle start sessionId: {}", sessionId); - // 获取主机连接信息 - HostTerminalConnectDTO connect = WebSockets.getAttr(channel, sessionId); + // 获取终端连接信息 + TerminalConnectDTO connect = WebSockets.getAttr(channel, sessionId); if (connect == null) { log.info("TerminalConnectHandler-handle unknown sessionId: {}", sessionId); this.send(channel, @@ -70,14 +85,14 @@ public class TerminalConnectHandler extends AbstractTerminalHandler extra = Maps.newMap(4); extra.put(ExtraFieldConst.ERROR_MESSAGE, this.getConnectErrorMessage(e)); - hostConnectLogService.updateStatusById(connect.getLogId(), HostConnectStatusEnum.FAILED, extra); + terminalConnectLogService.updateStatusById(connect.getLogId(), TerminalConnectStatusEnum.FAILED, extra); } // 返回连接状态 this.send(channel, @@ -99,7 +114,7 @@ public class TerminalConnectHandler extends AbstractTerminalHandler sessions = hostTerminalManager.getSession(channel.getId()); + Map sessions = terminalManager.getSession(channel.getId()); if (!Maps.isEmpty(sessions)) { for (ITerminalSession session : sessions.values()) { session.keepAlive(); diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/manager/HostTerminalManager.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/manager/TerminalManager.java similarity index 77% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/manager/HostTerminalManager.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/manager/TerminalManager.java index 53eca693..fb4913e6 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/manager/HostTerminalManager.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/manager/TerminalManager.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.manager; import com.orion.lang.define.collect.MultiConcurrentHashMap; @@ -10,14 +25,14 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** - * 主机终端管理器 + * 终端管理器 * * @author Jiahang Li * @version 1.0.0 * @since 2024/1/3 11:35 */ @Component -public class HostTerminalManager { +public class TerminalManager { /** * 会话存储器 diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/TerminalBasePayload.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/TerminalBasePayload.java index 2a217901..bf608f73 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/TerminalBasePayload.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/TerminalBasePayload.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/TerminalConfig.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/TerminalConfig.java index d6559ec0..3baffb68 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/TerminalConfig.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/TerminalConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model; import lombok.AllArgsConstructor; @@ -6,7 +21,7 @@ import lombok.Data; import lombok.NoArgsConstructor; /** - * 主机终端连接参数 + * 终端连接参数 * * @author Jiahang Li * @version 1.0.0 diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpBaseRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpBaseRequest.java index 8eaeab04..9cfc50dd 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpBaseRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpBaseRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.request; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpChangeModeRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpChangeModeRequest.java index 141fa8db..30af5d2d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpChangeModeRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpChangeModeRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.request; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpDownloadFlatDirectoryRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpDownloadFlatDirectoryRequest.java index b5991824..c2437e27 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpDownloadFlatDirectoryRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpDownloadFlatDirectoryRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.request; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpListRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpListRequest.java index c96f101c..22afde4d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpListRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpListRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.request; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpMoveRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpMoveRequest.java index 687f97f7..0650d9aa 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpMoveRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpMoveRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.request; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpSetContentRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpSetContentRequest.java deleted file mode 100644 index fe714966..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SftpSetContentRequest.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.orion.visor.module.asset.handler.host.terminal.model.request; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -/** - * sftp 设置文件内容 实体对象 - *

- * i|eff00a1|path|content - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2024/2/6 13:31 - */ -@Data -@SuperBuilder -@NoArgsConstructor -@AllArgsConstructor -@EqualsAndHashCode(callSuper = true) -public class SftpSetContentRequest extends SftpBaseRequest { - - /** - * content - */ - private String content; - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SshInputRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SshInputRequest.java index 89ea4cb9..43a5e97d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SshInputRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SshInputRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.request; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SshResizeRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SshResizeRequest.java index 660178b7..a512063b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SshResizeRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/SshResizeRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.request; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/TerminalCheckRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/TerminalCheckRequest.java index 7ae548d2..1df7cf60 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/TerminalCheckRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/TerminalCheckRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.request; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; @@ -8,7 +23,7 @@ import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; /** - * 主机连接检查请求 实体对象 + * 终端连接检查请求 实体对象 *

* ck|eff00a1|1 * diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/TerminalConnectRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/TerminalConnectRequest.java index 4c42208a..fb81faff 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/TerminalConnectRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/request/TerminalConnectRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.request; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpBaseResponse.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpBaseResponse.java index bbe46a75..b550598c 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpBaseResponse.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpBaseResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.response; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpDownloadFlatDirectoryResponse.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpDownloadFlatDirectoryResponse.java index 83b694fd..7ebbf268 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpDownloadFlatDirectoryResponse.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpDownloadFlatDirectoryResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.response; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpFileVO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpFileVO.java index 75fa1bcf..51f0e511 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpFileVO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpFileVO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.response; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpGetContentResponse.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpGetContentResponse.java index 7dbedac0..247f092f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpGetContentResponse.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpGetContentResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.response; import lombok.AllArgsConstructor; @@ -20,14 +35,9 @@ import lombok.experimental.SuperBuilder; @EqualsAndHashCode(callSuper = true) public class SftpGetContentResponse extends SftpBaseResponse { - /** - * path - */ - private String path; - /** * content */ - private String content; + private String token; } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpListResponse.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpListResponse.java index 76e0e1c9..5686f20f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpListResponse.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpListResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.response; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpSetContentResponse.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpSetContentResponse.java new file mode 100644 index 00000000..26b398cb --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SftpSetContentResponse.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.handler.host.terminal.model.response; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +/** + * sftp 设置内容响应 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/2/6 16:20 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SftpSetContentResponse extends SftpBaseResponse { + + /** + * content + */ + private String token; + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SshOutputResponse.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SshOutputResponse.java index b36efd6a..83d8dbaf 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SshOutputResponse.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/SshOutputResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.response; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalCheckResponse.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalCheckResponse.java index 47d412f6..2ae16fda 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalCheckResponse.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalCheckResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.response; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; @@ -8,7 +23,7 @@ import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; /** - * 主机连接检查响应 实体对象 + * 终端连接检查响应 实体对象 * * @author Jiahang Li * @version 1.0.0 diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalCloseResponse.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalCloseResponse.java index 6ebff9d9..0efdc158 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalCloseResponse.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalCloseResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.response; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; @@ -8,7 +23,7 @@ import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; /** - * 主机连接关闭响应 实体对象 + * 终端连接关闭响应 实体对象 * * @author Jiahang Li * @version 1.0.0 diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalConnectResponse.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalConnectResponse.java index 1a883ef4..e33602dc 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalConnectResponse.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/model/response/TerminalConnectResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.model.response; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalBasePayload; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ISftpSession.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ISftpSession.java index 5baa459a..b2e130aa 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ISftpSession.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ISftpSession.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.session; import com.orion.visor.module.asset.handler.host.terminal.model.response.SftpFileVO; @@ -102,4 +117,11 @@ public interface ISftpSession extends ITerminalSession { */ void setContent(String path, String content); + /** + * 检测文件是否可编辑 + * + * @param path path + */ + void checkCanEdit(String path); + } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ISshSession.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ISshSession.java index 7d8cf0d7..ca4b3a63 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ISshSession.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ISshSession.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.session; /** diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ITerminalSession.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ITerminalSession.java index 2d379a45..a87d67dc 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ITerminalSession.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/ITerminalSession.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.session; import com.orion.lang.able.SafeCloseable; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/SftpSession.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/SftpSession.java index c33b1173..392885cb 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/SftpSession.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/SftpSession.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.session; import com.orion.lang.utils.Exceptions; @@ -9,6 +24,7 @@ import com.orion.net.host.SessionStore; import com.orion.net.host.sftp.SftpExecutor; import com.orion.net.host.sftp.SftpFile; import com.orion.visor.framework.common.constant.Const; +import com.orion.visor.framework.common.constant.ErrorMessage; import com.orion.visor.framework.common.utils.Valid; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalConfig; import com.orion.visor.module.asset.handler.host.terminal.model.response.SftpFileVO; @@ -145,6 +161,13 @@ public class SftpSession extends TerminalSession implements ISftpSession { } } + @Override + public void checkCanEdit(String path) { + path = Valid.checkNormalize(path); + // 检查文件是否存在 + Valid.isTrue(executor.isExist(path), ErrorMessage.FILE_ABSENT); + } + @Override public void keepAlive() { try { diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/SshSession.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/SshSession.java index e49d668b..bb67f113 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/SshSession.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/SshSession.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.session; import com.orion.lang.utils.io.Streams; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/TerminalSession.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/TerminalSession.java index 86ea3334..a1b7be9b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/TerminalSession.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/session/TerminalSession.java @@ -1,14 +1,29 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.session; import com.orion.spring.SpringHolder; import com.orion.visor.framework.common.enums.BooleanBit; import com.orion.visor.framework.websocket.core.utils.WebSockets; -import com.orion.visor.module.asset.enums.HostConnectStatusEnum; +import com.orion.visor.module.asset.enums.TerminalConnectStatusEnum; import com.orion.visor.module.asset.handler.host.terminal.constant.TerminalMessage; import com.orion.visor.module.asset.handler.host.terminal.enums.OutputTypeEnum; import com.orion.visor.module.asset.handler.host.terminal.model.TerminalConfig; import com.orion.visor.module.asset.handler.host.terminal.model.response.TerminalCloseResponse; -import com.orion.visor.module.asset.service.HostConnectLogService; +import com.orion.visor.module.asset.service.TerminalConnectLogService; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import org.springframework.web.socket.WebSocketSession; @@ -68,8 +83,8 @@ public abstract class TerminalSession implements ITerminalSession { // 检查并且关闭 if (this.checkAndClose()) { // 修改状态 - SpringHolder.getBean(HostConnectLogService.class) - .updateStatusById(config.getLogId(), HostConnectStatusEnum.COMPLETE, null); + SpringHolder.getBean(TerminalConnectLogService.class) + .updateStatusById(config.getLogId(), TerminalConnectStatusEnum.COMPLETE, null); } } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/utils/TerminalUtils.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/utils/TerminalUtils.java index e848c669..ed1612ed 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/utils/TerminalUtils.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/terminal/utils/TerminalUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.terminal.utils; import com.orion.visor.framework.biz.operator.log.core.model.OperatorLogModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/TransferMessageDispatcher.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/TransferMessageDispatcher.java index 6aa9d946..e7653668 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/TransferMessageDispatcher.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/TransferMessageDispatcher.java @@ -1,10 +1,25 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer; import com.alibaba.fastjson.JSON; import com.orion.lang.utils.io.Streams; import com.orion.visor.module.asset.handler.host.transfer.handler.ITransferHandler; import com.orion.visor.module.asset.handler.host.transfer.handler.TransferHandler; -import com.orion.visor.module.asset.handler.host.transfer.manager.HostTransferManager; +import com.orion.visor.module.asset.handler.host.transfer.manager.TerminalTransferManager; import com.orion.visor.module.asset.handler.host.transfer.model.TransferOperatorRequest; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -28,19 +43,19 @@ import javax.annotation.Resource; public class TransferMessageDispatcher extends AbstractWebSocketHandler { @Resource - private HostTransferManager hostTransferManager; + private TerminalTransferManager terminalTransferManager; @Override public void afterConnectionEstablished(WebSocketSession session) { log.info("TransferMessageHandler-afterConnectionEstablished id: {}", session.getId()); // 添加处理器 - hostTransferManager.putHandler(session.getId(), new TransferHandler(session)); + terminalTransferManager.putHandler(session.getId(), new TransferHandler(session)); } @Override protected void handleTextMessage(WebSocketSession session, TextMessage message) { // 获取处理器 - ITransferHandler handler = hostTransferManager.getHandler(session.getId()); + ITransferHandler handler = terminalTransferManager.getHandler(session.getId()); // 处理消息 handler.handleMessage(JSON.parseObject(message.getPayload(), TransferOperatorRequest.class)); } @@ -48,7 +63,7 @@ public class TransferMessageDispatcher extends AbstractWebSocketHandler { @Override protected void handleBinaryMessage(WebSocketSession session, BinaryMessage message) { // 获取处理器 - ITransferHandler handler = hostTransferManager.getHandler(session.getId()); + ITransferHandler handler = terminalTransferManager.getHandler(session.getId()); // 添加数据 handler.handleMessage(message.getPayload().array()); } @@ -63,7 +78,7 @@ public class TransferMessageDispatcher extends AbstractWebSocketHandler { String id = session.getId(); log.info("TransferMessageHandler-afterConnectionClosed id: {}, code: {}, reason: {}", id, status.getCode(), status.getReason()); // 关闭会话 - Streams.close(hostTransferManager.removeHandler(id)); + Streams.close(terminalTransferManager.removeHandler(id)); } } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferOperator.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferOperator.java index 6dc0bccc..ccee357b 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferOperator.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferOperator.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferReceiver.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferReceiver.java index c2e099a2..44de4b38 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferReceiver.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferReceiver.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferType.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferType.java index 822d35d7..dc931e39 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferType.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/enums/TransferType.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.enums; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/handler/ITransferHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/handler/ITransferHandler.java index b057a4c1..1d11042a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/handler/ITransferHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/handler/ITransferHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.handler; import com.orion.lang.able.SafeCloseable; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/handler/TransferHandler.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/handler/TransferHandler.java index f21c8653..a02fb33f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/handler/TransferHandler.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/handler/TransferHandler.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.handler; import com.orion.lang.id.UUIds; @@ -6,18 +21,18 @@ import com.orion.net.host.SessionStore; import com.orion.spring.SpringHolder; import com.orion.visor.framework.common.constant.ExtraFieldConst; import com.orion.visor.framework.websocket.core.utils.WebSockets; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; import com.orion.visor.module.asset.handler.host.jsch.SessionStores; import com.orion.visor.module.asset.handler.host.transfer.enums.TransferOperator; import com.orion.visor.module.asset.handler.host.transfer.enums.TransferReceiver; import com.orion.visor.module.asset.handler.host.transfer.enums.TransferType; -import com.orion.visor.module.asset.handler.host.transfer.model.HostConnection; +import com.orion.visor.module.asset.handler.host.transfer.model.TerminalConnection; import com.orion.visor.module.asset.handler.host.transfer.model.TransferOperatorRequest; import com.orion.visor.module.asset.handler.host.transfer.session.DownloadSession; import com.orion.visor.module.asset.handler.host.transfer.session.ITransferSession; import com.orion.visor.module.asset.handler.host.transfer.session.UploadSession; import com.orion.visor.module.asset.handler.host.transfer.utils.TransferUtils; -import com.orion.visor.module.asset.service.HostTerminalService; +import com.orion.visor.module.asset.service.TerminalService; import lombok.extern.slf4j.Slf4j; import org.springframework.web.socket.WebSocketSession; @@ -33,7 +48,7 @@ import java.util.concurrent.ConcurrentHashMap; @Slf4j public class TransferHandler implements ITransferHandler { - private static final HostTerminalService hostTerminalService = SpringHolder.getBean(HostTerminalService.class); + private static final TerminalService terminalService = SpringHolder.getBean(TerminalService.class); private final WebSocketSession channel; @@ -41,12 +56,12 @@ public class TransferHandler implements ITransferHandler { private final ConcurrentHashMap sessions; - private final ConcurrentHashMap hostConnections; + private final ConcurrentHashMap terminalConnections; public TransferHandler(WebSocketSession channel) { this.channel = channel; this.sessions = new ConcurrentHashMap<>(); - this.hostConnections = new ConcurrentHashMap<>(); + this.terminalConnections = new ConcurrentHashMap<>(); } @Override @@ -90,17 +105,17 @@ public class TransferHandler implements ITransferHandler { TransferType type = TransferType.of(payload.getType()); String sessionKey = hostId + "_" + type.getType(); try { - // 获取主机连接信息 - HostConnection hostConnection = hostConnections.get(hostId); - if (hostConnection == null) { - // 获取主机连接信息 + // 获取终端连接信息 + TerminalConnection terminalConnection = terminalConnections.get(hostId); + if (terminalConnection == null) { + // 获取终端连接信息 Long userId = WebSockets.getAttr(channel, ExtraFieldConst.USER_ID); - HostTerminalConnectDTO connectInfo = hostTerminalService.getTerminalConnectInfo(userId, hostId); - hostConnection = new HostConnection(connectInfo, SessionStores.openSessionStore(connectInfo)); - hostConnections.put(hostId, hostConnection); + TerminalConnectDTO connectInfo = terminalService.getTerminalConnectInfo(userId, hostId); + terminalConnection = new TerminalConnection(connectInfo, SessionStores.openSessionStore(connectInfo)); + terminalConnections.put(hostId, terminalConnection); } - SessionStore sessionStore = hostConnection.getSessionStore(); - HostTerminalConnectDTO connectInfo = hostConnection.getConnectInfo(); + SessionStore sessionStore = terminalConnection.getSessionStore(); + TerminalConnectDTO connectInfo = terminalConnection.getConnectInfo(); // 获取会话 ITransferSession session = sessions.get(sessionKey); if (session == null) { diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/manager/HostTransferManager.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/manager/TerminalTransferManager.java similarity index 58% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/manager/HostTransferManager.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/manager/TerminalTransferManager.java index f1023154..8a4095d2 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/manager/HostTransferManager.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/manager/TerminalTransferManager.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.manager; import com.orion.visor.module.asset.handler.host.transfer.handler.ITransferHandler; @@ -6,14 +21,14 @@ import org.springframework.stereotype.Component; import java.util.concurrent.ConcurrentHashMap; /** - * 主机传输管理器 + * 终端传输管理器 * * @author Jiahang Li * @version 1.0.0 * @since 2024/6/4 17:58 */ @Component -public class HostTransferManager { +public class TerminalTransferManager { private final ConcurrentHashMap handlers = new ConcurrentHashMap<>(); diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/HostConnection.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/HostConnection.java deleted file mode 100644 index 4a301ed3..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/HostConnection.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.orion.visor.module.asset.handler.host.transfer.model; - -import com.orion.net.host.SessionStore; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 主机连接信息 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2024/7/12 23:52 - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class HostConnection { - - /** - * connectInfo - */ - private HostTerminalConnectDTO connectInfo; - - /** - * sessionStore - */ - private SessionStore sessionStore; - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/SftpFileBackupParams.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/SftpFileBackupParams.java index 6809a0c8..01098b33 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/SftpFileBackupParams.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/SftpFileBackupParams.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.model; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TerminalConnection.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TerminalConnection.java new file mode 100644 index 00000000..4923d6e1 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TerminalConnection.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.handler.host.transfer.model; + +import com.orion.net.host.SessionStore; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 终端连接信息 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/7/12 23:52 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class TerminalConnection { + + /** + * connectInfo + */ + private TerminalConnectDTO connectInfo; + + /** + * sessionStore + */ + private SessionStore sessionStore; + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TransferOperatorRequest.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TransferOperatorRequest.java index 8a88b551..04547d4d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TransferOperatorRequest.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TransferOperatorRequest.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.model; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TransferOperatorResponse.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TransferOperatorResponse.java index e2b20d64..0b1bfa86 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TransferOperatorResponse.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/model/TransferOperatorResponse.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.model; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/DownloadSession.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/DownloadSession.java index 639c5667..a8d7d636 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/DownloadSession.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/DownloadSession.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.session; import com.orion.lang.define.wrapper.Ref; @@ -9,8 +24,8 @@ import com.orion.net.host.sftp.SftpFile; import com.orion.visor.framework.common.constant.Const; import com.orion.visor.framework.common.constant.ErrorMessage; import com.orion.visor.module.asset.define.AssetThreadPools; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; import com.orion.visor.module.asset.handler.host.transfer.enums.TransferReceiver; import com.orion.visor.module.asset.handler.host.transfer.model.TransferOperatorRequest; import com.orion.visor.module.asset.handler.host.transfer.utils.TransferUtils; @@ -39,7 +54,7 @@ public class DownloadSession extends TransferSession implements StreamingRespons private Long fileSize; - public DownloadSession(HostTerminalConnectDTO connectInfo, SessionStore sessionStore, WebSocketSession channel) { + public DownloadSession(TerminalConnectDTO connectInfo, SessionStore sessionStore, WebSocketSession channel) { super(connectInfo, sessionStore, channel); this.fileSize = 0L; } @@ -50,7 +65,7 @@ public class DownloadSession extends TransferSession implements StreamingRespons super.onStart(request); log.info("DownloadSession.startDownload open start channelId: {}, path: {}", channelId, path); // 保存操作日志 - this.saveOperatorLog(HostTerminalOperatorType.SFTP_DOWNLOAD, path); + this.saveOperatorLog(TerminalOperatorType.SFTP_DOWNLOAD, path); // 检查连接 this.init(); // 检查文件是否存在 diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/ITransferSession.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/ITransferSession.java index fa6f29d8..14305527 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/ITransferSession.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/ITransferSession.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.session; import com.orion.lang.able.SafeCloseable; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/TransferSession.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/TransferSession.java index ca9b1925..a875c183 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/TransferSession.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/TransferSession.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.session; import com.orion.lang.exception.argument.InvalidArgumentException; @@ -10,7 +25,7 @@ import com.orion.visor.framework.biz.operator.log.core.model.OperatorLogModel; import com.orion.visor.framework.biz.operator.log.core.service.OperatorLogFrameworkService; import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; import com.orion.visor.module.asset.define.config.AppSftpConfig; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; import com.orion.visor.module.asset.handler.host.terminal.utils.TerminalUtils; import com.orion.visor.module.asset.handler.host.transfer.enums.TransferReceiver; import com.orion.visor.module.asset.handler.host.transfer.model.TransferOperatorRequest; @@ -34,7 +49,7 @@ public abstract class TransferSession implements ITransferSession { protected static final AppSftpConfig SFTP_CONFIG = SpringHolder.getBean(AppSftpConfig.class); - protected final HostTerminalConnectDTO connectInfo; + protected final TerminalConnectDTO connectInfo; protected final SessionStore sessionStore; @@ -51,7 +66,7 @@ public abstract class TransferSession implements ITransferSession { @Setter protected String token; - public TransferSession(HostTerminalConnectDTO connectInfo, SessionStore sessionStore, WebSocketSession channel) { + public TransferSession(TerminalConnectDTO connectInfo, SessionStore sessionStore, WebSocketSession channel) { this.connectInfo = connectInfo; this.sessionStore = sessionStore; this.channel = channel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/UploadSession.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/UploadSession.java index 458bd22a..29bff62e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/UploadSession.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/session/UploadSession.java @@ -1,9 +1,24 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.session; import com.orion.lang.utils.io.Streams; import com.orion.net.host.SessionStore; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; import com.orion.visor.module.asset.handler.host.transfer.enums.TransferReceiver; import com.orion.visor.module.asset.handler.host.transfer.model.TransferOperatorRequest; import com.orion.visor.module.asset.handler.host.transfer.utils.TransferUtils; @@ -26,7 +41,7 @@ public class UploadSession extends TransferSession { protected OutputStream outputStream; - public UploadSession(HostTerminalConnectDTO connectInfo, SessionStore sessionStore, WebSocketSession channel) { + public UploadSession(TerminalConnectDTO connectInfo, SessionStore sessionStore, WebSocketSession channel) { super(connectInfo, sessionStore, channel); } @@ -36,7 +51,7 @@ public class UploadSession extends TransferSession { try { log.info("UploadSession.startUpload start channelId: {}, path: {}", channelId, path); // 保存操作日志 - this.saveOperatorLog(HostTerminalOperatorType.SFTP_UPLOAD, path); + this.saveOperatorLog(TerminalOperatorType.SFTP_UPLOAD, path); // 检查连接 this.init(); // 检查文件是否存在 diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/utils/TransferUtils.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/utils/TransferUtils.java index 1bb7dde6..2516fa56 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/utils/TransferUtils.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/transfer/utils/TransferUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.transfer.utils; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/FileUploadTasks.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/FileUploadTasks.java index 84a7334a..800310bd 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/FileUploadTasks.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/FileUploadTasks.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.upload; import com.orion.visor.module.asset.define.AssetThreadPools; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/manager/FileUploadTaskManager.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/manager/FileUploadTaskManager.java index b81a9db0..32d0fa0e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/manager/FileUploadTaskManager.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/manager/FileUploadTaskManager.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.upload.manager; import com.orion.visor.module.asset.handler.host.upload.task.IFileUploadTask; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/model/FileUploadFileItemDTO.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/model/FileUploadFileItemDTO.java index b67e77ed..f7750cfd 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/model/FileUploadFileItemDTO.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/model/FileUploadFileItemDTO.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.upload.model; import lombok.AllArgsConstructor; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/task/FileUploadTask.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/task/FileUploadTask.java index a73848d1..7e7306ff 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/task/FileUploadTask.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/task/FileUploadTask.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.upload.task; import com.orion.lang.utils.Threads; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/task/IFileUploadTask.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/task/IFileUploadTask.java index 6eb7ade5..5994dd50 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/task/IFileUploadTask.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/task/IFileUploadTask.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.upload.task; import com.orion.lang.able.SafeCloseable; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/uploader/FileUploader.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/uploader/FileUploader.java index 35c8d795..9fd9611e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/uploader/FileUploader.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/uploader/FileUploader.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.upload.uploader; import com.orion.lang.utils.io.Streams; @@ -10,11 +25,11 @@ import com.orion.visor.framework.common.file.FileClient; import com.orion.visor.module.asset.dao.UploadTaskFileDAO; import com.orion.visor.module.asset.define.config.AppSftpConfig; import com.orion.visor.module.asset.entity.domain.UploadTaskFileDO; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; import com.orion.visor.module.asset.enums.UploadTaskFileStatusEnum; import com.orion.visor.module.asset.handler.host.jsch.SessionStores; import com.orion.visor.module.asset.handler.host.upload.model.FileUploadFileItemDTO; -import com.orion.visor.module.asset.service.HostTerminalService; +import com.orion.visor.module.asset.service.TerminalService; import com.orion.visor.module.asset.utils.SftpUtils; import lombok.Getter; import lombok.extern.slf4j.Slf4j; @@ -35,7 +50,7 @@ import java.util.stream.Collectors; @Slf4j public class FileUploader implements IFileUploader { - private static final HostTerminalService hostTerminalService = SpringHolder.getBean(HostTerminalService.class); + private static final TerminalService terminalService = SpringHolder.getBean(TerminalService.class); private static final UploadTaskFileDAO uploadTaskFileDAO = SpringHolder.getBean(UploadTaskFileDAO.class); @@ -101,7 +116,7 @@ public class FileUploader implements IFileUploader { log.info("HostFileUploader.initSession start taskId: {}, hostId: {}", taskId, hostId); try { // 打开会话 - HostTerminalConnectDTO connectInfo = hostTerminalService.getTerminalConnectInfo(hostId); + TerminalConnectDTO connectInfo = terminalService.getTerminalConnectInfo(hostId); this.sessionStore = SessionStores.openSessionStore(connectInfo); this.executor = sessionStore.getSftpExecutor(connectInfo.getFileNameCharset()); executor.connect(); diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/uploader/IFileUploader.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/uploader/IFileUploader.java index 3009bf96..8343ebf1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/uploader/IFileUploader.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/handler/host/upload/uploader/IFileUploader.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.handler.host.upload.uploader; import com.orion.lang.able.SafeCloseable; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/ExecLogTailInterceptor.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/ExecLogTailInterceptor.java index 5d27df56..6e33afee 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/ExecLogTailInterceptor.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/ExecLogTailInterceptor.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.interceptor; import com.orion.lang.utils.Urls; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/TerminalAccessInterceptor.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/TerminalAccessInterceptor.java index 4182cb2d..9f70e9f5 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/TerminalAccessInterceptor.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/TerminalAccessInterceptor.java @@ -1,11 +1,26 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.interceptor; import com.orion.lang.utils.Urls; import com.orion.visor.framework.common.constant.ExtraFieldConst; import com.orion.visor.framework.common.meta.TraceIdHolder; import com.orion.visor.framework.common.utils.Requests; -import com.orion.visor.module.asset.entity.dto.HostTerminalAccessDTO; -import com.orion.visor.module.asset.service.HostTerminalService; +import com.orion.visor.module.asset.entity.dto.TerminalAccessDTO; +import com.orion.visor.module.asset.service.TerminalService; import lombok.extern.slf4j.Slf4j; import org.springframework.http.server.ServerHttpRequest; import org.springframework.http.server.ServerHttpResponse; @@ -28,7 +43,7 @@ import java.util.Map; public class TerminalAccessInterceptor implements HandshakeInterceptor { @Resource - private HostTerminalService hostTerminalService; + private TerminalService terminalService; @Override public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map attributes) throws Exception { @@ -36,7 +51,7 @@ public class TerminalAccessInterceptor implements HandshakeInterceptor { String accessToken = Urls.getUrlSource(request.getURI().getPath()); log.info("TerminalAccessInterceptor-beforeHandshake start accessToken: {}", accessToken); // 获取连接数据 - HostTerminalAccessDTO access = hostTerminalService.getAccessInfoByToken(accessToken); + TerminalAccessDTO access = terminalService.getAccessInfoByToken(accessToken); if (access == null) { log.error("TerminalAccessInterceptor-beforeHandshake absent accessToken: {}", accessToken); return false; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/TerminalTransferInterceptor.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/TerminalTransferInterceptor.java index 50568055..00cd1a90 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/TerminalTransferInterceptor.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/interceptor/TerminalTransferInterceptor.java @@ -1,11 +1,26 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.interceptor; import com.orion.lang.utils.Urls; import com.orion.visor.framework.common.constant.ExtraFieldConst; import com.orion.visor.framework.common.meta.TraceIdHolder; import com.orion.visor.framework.common.utils.Requests; -import com.orion.visor.module.asset.entity.dto.HostTerminalTransferDTO; -import com.orion.visor.module.asset.service.HostTerminalService; +import com.orion.visor.module.asset.entity.dto.TerminalTransferDTO; +import com.orion.visor.module.asset.service.TerminalService; import lombok.extern.slf4j.Slf4j; import org.springframework.http.server.ServerHttpRequest; import org.springframework.http.server.ServerHttpResponse; @@ -28,7 +43,7 @@ import java.util.Map; public class TerminalTransferInterceptor implements HandshakeInterceptor { @Resource - private HostTerminalService hostTerminalService; + private TerminalService terminalService; @Override public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map attributes) throws Exception { @@ -36,7 +51,7 @@ public class TerminalTransferInterceptor implements HandshakeInterceptor { String transferToken = Urls.getUrlSource(request.getURI().getPath()); log.info("TerminalTransferInterceptor-beforeHandshake start transferToken: {}", transferToken); // 获取连接数据 - HostTerminalTransferDTO transfer = hostTerminalService.getTransferInfoByToken(transferToken); + TerminalTransferDTO transfer = terminalService.getTransferInfoByToken(transferToken); if (transfer == null) { log.error("TerminalTransferInterceptor-beforeHandshake absent transferToken: {}", transferToken); return false; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/AssetAuthorizedDataService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/AssetAuthorizedDataService.java index 71a29d3a..56315da0 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/AssetAuthorizedDataService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/AssetAuthorizedDataService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.module.asset.entity.request.asset.AssetAuthorizedDataQueryRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/AssetDataGrantService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/AssetDataGrantService.java index 9d0b06a2..e277827c 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/AssetDataGrantService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/AssetDataGrantService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.module.asset.entity.request.asset.AssetDataGrantRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetGroupService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetGroupService.java index ff3ce6d0..95ead368 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetGroupService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetGroupService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.module.asset.entity.request.command.CommandSnippetGroupCreateRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetService.java index 1caaead8..ca6c9561 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/CommandSnippetService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.module.asset.entity.request.command.CommandSnippetCreateRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecCommandService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecCommandService.java index b7bb5c06..7733ad7a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecCommandService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecCommandService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.module.asset.entity.dto.ExecCommandExecDTO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecHostLogService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecHostLogService.java index de2a7c00..d9e7a07f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecHostLogService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecHostLogService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.module.asset.entity.vo.ExecHostLogVO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecJobHostService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecJobHostService.java index 4e4b5f17..f3e35ec5 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecJobHostService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecJobHostService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import java.util.List; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecJobService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecJobService.java index 8b854c8f..8ea5f40a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecJobService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecJobService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecLogService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecLogService.java index cf2cde80..bdd1392d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecLogService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecLogService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecTemplateHostService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecTemplateHostService.java index e4b3a732..04111146 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecTemplateHostService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecTemplateHostService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import java.util.List; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecTemplateService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecTemplateService.java index 5796df12..b096be5a 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecTemplateService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/ExecTemplateService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostConfigService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostConfigService.java index 49b6c3e6..7444cc1e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostConfigService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostConfigService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.framework.common.handler.data.model.GenericsDataModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostConnectLogService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostConnectLogService.java deleted file mode 100644 index a771acab..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostConnectLogService.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.orion.visor.module.asset.service; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.orion.lang.define.wrapper.DataGrid; -import com.orion.visor.module.asset.entity.domain.HostConnectLogDO; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogClearRequest; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogCreateRequest; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogQueryRequest; -import com.orion.visor.module.asset.entity.vo.HostConnectLogVO; -import com.orion.visor.module.asset.enums.HostConnectStatusEnum; -import com.orion.visor.module.asset.enums.HostConnectTypeEnum; - -import java.util.List; -import java.util.Map; -import java.util.concurrent.Future; - -/** - * 主机连接日志 服务类 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023-12-26 22:09 - */ -public interface HostConnectLogService { - - /** - * 创建主机连接日志 - * - * @param type type - * @param request request - * @return record - */ - HostConnectLogDO create(HostConnectTypeEnum type, HostConnectLogCreateRequest request); - - /** - * 分页查询主机连接日志 - * - * @param request request - * @return rows - */ - DataGrid getHostConnectLogPage(HostConnectLogQueryRequest request); - - /** - * 分页查询主机连接会话 - * - * @param request request - * @return rows - */ - List getHostConnectSessions(HostConnectLogQueryRequest request); - - /** - * 更新连接状态 - * - * @param id id - * @param status status - * @param extra extra - * @return effect - */ - Integer updateStatusById(Long id, HostConnectStatusEnum status, Map extra); - - /** - * 查询用户最近连接的主机 - * - * @param request request - * @return hostId - */ - List getLatestConnectHostId(HostConnectLogQueryRequest request); - - /** - * 查询用户最近连接的主机 - * - * @param type type - * @param userId userId - * @return hostId - */ - Future> getLatestConnectHostIdAsync(HostConnectTypeEnum type, Long userId); - - /** - * 删除主机连接日志 - * - * @param idList idList - * @return effect - */ - Integer deleteHostConnectLog(List idList); - - /** - * 获取主机连接日志数量 - * - * @param request request - * @return count - */ - Long getHostConnectLogCount(HostConnectLogQueryRequest request); - - /** - * 清空主机连接日志 - * - * @param request request - * @return effect - */ - Integer clearHostConnectLog(HostConnectLogClearRequest request); - - /** - * 强制断开主机连接 - * - * @param request request - * @return effect - */ - Integer forceOffline(HostConnectLogQueryRequest request); - - /** - * 构建查询 wrapper - * - * @param request request - * @return wrapper - */ - LambdaQueryWrapper buildQueryWrapper(HostConnectLogQueryRequest request); - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostExtraService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostExtraService.java index 5836ad5c..8c14c283 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostExtraService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostExtraService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.framework.common.handler.data.model.GenericsDataModel; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostGroupService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostGroupService.java index 3c09b7d3..5b5ec6a9 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostGroupService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostGroupService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.module.asset.entity.request.host.HostGroupRelUpdateRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostIdentityService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostIdentityService.java index 0a7aaf17..b8f73098 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostIdentityService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostIdentityService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostKeyService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostKeyService.java index 3d9d339b..32515e80 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostKeyService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostKeyService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.lang.define.wrapper.DataGrid; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostService.java index 3a7ddeb1..412193f1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostSftpService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostSftpService.java deleted file mode 100644 index 6dd47ab5..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostSftpService.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.orion.visor.module.asset.service; - -import com.orion.lang.define.wrapper.DataGrid; -import com.orion.visor.module.asset.entity.request.host.HostSftpLogQueryRequest; -import com.orion.visor.module.asset.entity.vo.HostSftpLogVO; -import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * SFTP 操作 服务类 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023-12-26 22:09 - */ -public interface HostSftpService { - - /** - * 分页查询 SFTP 操作日志 - * - * @param request request - * @return rows - */ - DataGrid getHostSftpLogPage(HostSftpLogQueryRequest request); - - /** - * 删除 SFTP 操作日志 - * - * @param idList idList - * @return effect - */ - Integer deleteHostSftpLog(List idList); - - /** - * 通过 transferToken 下载 - * - * @param channelId channelId - * @param transferToken transferToken - * @param response response - * @return body - */ - StreamingResponseBody downloadWithTransferToken(String channelId, - String transferToken, - HttpServletResponse response); - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostTerminalService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostTerminalService.java deleted file mode 100644 index baed998e..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/HostTerminalService.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.orion.visor.module.asset.service; - -import com.orion.visor.module.asset.entity.domain.HostDO; -import com.orion.visor.module.asset.entity.dto.HostTerminalAccessDTO; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; -import com.orion.visor.module.asset.entity.dto.HostTerminalTransferDTO; -import com.orion.visor.module.asset.entity.vo.HostTerminalThemeVO; - -import java.util.List; - -/** - * 主机终端服务 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023/12/26 14:22 - */ -public interface HostTerminalService { - - /** - * 获取主机终端主题 - * - * @return themes - */ - List getTerminalThemes(); - - /** - * 获取主机终端访问 accessToken - * - * @return accessToken - */ - String getTerminalAccessToken(); - - /** - * 获取主机终端传输 transferToken - * - * @return transferToken - */ - String getTerminalTransferToken(); - - /** - * 通过 accessToken 获取主机终端访问信息 - * - * @param token token - * @return config - */ - HostTerminalAccessDTO getAccessInfoByToken(String token); - - /** - * 通过 transferToken 获取主机终端传输信息 - * - * @param token token - * @return config - */ - HostTerminalTransferDTO getTransferInfoByToken(String token); - - /** - * 获取连接信息 - * - * @param hostId hostId - * @return session - */ - HostTerminalConnectDTO getTerminalConnectInfo(Long hostId); - - /** - * 使用用户配置获取连接信息 - * - * @param hostId hostId - * @param userId userId - * @return session - */ - HostTerminalConnectDTO getTerminalConnectInfo(Long userId, Long hostId); - - /** - * 使用用户配置获取连接信息 - * - * @param host host - * @param userId userId - * @return session - */ - HostTerminalConnectDTO getTerminalConnectInfo(Long userId, HostDO host); - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkGroupService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkGroupService.java index 11976f77..5fef5d75 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkGroupService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkGroupService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.module.asset.entity.request.path.PathBookmarkGroupCreateRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkService.java index 07904847..8a02b2f7 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/PathBookmarkService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.module.asset.entity.request.path.PathBookmarkCreateRequest; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/TerminalConnectLogService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/TerminalConnectLogService.java new file mode 100644 index 00000000..036ed51e --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/TerminalConnectLogService.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.service; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.orion.lang.define.wrapper.DataGrid; +import com.orion.visor.module.asset.entity.domain.TerminalConnectLogDO; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogClearRequest; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogCreateRequest; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogQueryRequest; +import com.orion.visor.module.asset.entity.vo.TerminalConnectLogVO; +import com.orion.visor.module.asset.enums.TerminalConnectStatusEnum; +import com.orion.visor.module.asset.enums.TerminalConnectTypeEnum; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * 终端连接日志 服务类 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023-12-26 22:09 + */ +public interface TerminalConnectLogService { + + /** + * 创建终端连接日志 + * + * @param type type + * @param request request + * @return record + */ + TerminalConnectLogDO create(TerminalConnectTypeEnum type, TerminalConnectLogCreateRequest request); + + /** + * 分页查询终端连接日志 + * + * @param request request + * @return rows + */ + DataGrid getTerminalConnectLogPage(TerminalConnectLogQueryRequest request); + + /** + * 分页查询终端连接会话 + * + * @param request request + * @return rows + */ + List getTerminalConnectSessions(TerminalConnectLogQueryRequest request); + + /** + * 更新连接状态 + * + * @param id id + * @param status status + * @param extra extra + * @return effect + */ + Integer updateStatusById(Long id, TerminalConnectStatusEnum status, Map extra); + + /** + * 查询用户最近连接的主机 + * + * @param request request + * @return hostId + */ + Set getLatestConnectHostId(TerminalConnectLogQueryRequest request); + + /** + * 删除终端连接日志 + * + * @param idList idList + * @return effect + */ + Integer deleteTerminalConnectLog(List idList); + + /** + * 获取终端连接日志数量 + * + * @param request request + * @return count + */ + Long getTerminalConnectLogCount(TerminalConnectLogQueryRequest request); + + /** + * 清空终端连接日志 + * + * @param request request + * @return effect + */ + Integer clearTerminalConnectLog(TerminalConnectLogClearRequest request); + + /** + * 强制断开终端连接 + * + * @param request request + * @return effect + */ + Integer forceOffline(TerminalConnectLogQueryRequest request); + + /** + * 构建查询 wrapper + * + * @param request request + * @return wrapper + */ + LambdaQueryWrapper buildQueryWrapper(TerminalConnectLogQueryRequest request); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/TerminalService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/TerminalService.java new file mode 100644 index 00000000..980e9b7f --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/TerminalService.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.service; + +import com.orion.visor.module.asset.entity.domain.HostDO; +import com.orion.visor.module.asset.entity.dto.TerminalAccessDTO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; +import com.orion.visor.module.asset.entity.dto.TerminalTransferDTO; +import com.orion.visor.module.asset.entity.vo.TerminalThemeVO; + +import java.util.List; + +/** + * 终端服务 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023/12/26 14:22 + */ +public interface TerminalService { + + /** + * 获取主机终端主题 + * + * @return themes + */ + List getTerminalThemes(); + + /** + * 获取主机终端访问 accessToken + * + * @return accessToken + */ + String getTerminalAccessToken(); + + /** + * 获取主机终端传输 transferToken + * + * @return transferToken + */ + String getTerminalTransferToken(); + + /** + * 通过 accessToken 获取终端访问信息 + * + * @param token token + * @return config + */ + TerminalAccessDTO getAccessInfoByToken(String token); + + /** + * 通过 transferToken 获取终端传输信息 + * + * @param token token + * @return config + */ + TerminalTransferDTO getTransferInfoByToken(String token); + + /** + * 获取连接信息 + * + * @param hostId hostId + * @return session + */ + TerminalConnectDTO getTerminalConnectInfo(Long hostId); + + /** + * 使用用户配置获取连接信息 + * + * @param hostId hostId + * @param userId userId + * @return session + */ + TerminalConnectDTO getTerminalConnectInfo(Long userId, Long hostId); + + /** + * 使用用户配置获取连接信息 + * + * @param host host + * @param userId userId + * @return session + */ + TerminalConnectDTO getTerminalConnectInfo(Long userId, HostDO host); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/TerminalSftpService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/TerminalSftpService.java new file mode 100644 index 00000000..54dff506 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/TerminalSftpService.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.service; + +import com.orion.lang.define.wrapper.DataGrid; +import com.orion.visor.module.asset.entity.request.host.TerminalSftpLogQueryRequest; +import com.orion.visor.module.asset.entity.vo.TerminalSftpLogVO; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; + +/** + * SFTP 操作 服务类 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023-12-26 22:09 + */ +public interface TerminalSftpService { + + /** + * 分页查询 SFTP 操作日志 + * + * @param request request + * @return rows + */ + DataGrid getTerminalSftpLogPage(TerminalSftpLogQueryRequest request); + + /** + * 删除 SFTP 操作日志 + * + * @param idList idList + * @return effect + */ + Integer deleteTerminalSftpLog(List idList); + + /** + * 设置文件内容 + * + * @param token token + * @param response response + * @throws IOException IOException + */ + void getFileContentByToken(String token, HttpServletResponse response) throws IOException; + + /** + * 获取文件内容 + * + * @param token token + * @param file file + * @throws IOException IOException + */ + void setFileContentByToken(String token, MultipartFile file) throws IOException; + + /** + * 通过 transferToken 下载 + * + * @param channelId channelId + * @param transferToken transferToken + * @param response response + * @return body + */ + StreamingResponseBody downloadWithTransferToken(String channelId, + String transferToken, + HttpServletResponse response); + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/UploadTaskFileService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/UploadTaskFileService.java index 58cc2a57..0fe9bf26 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/UploadTaskFileService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/UploadTaskFileService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.orion.visor.module.asset.entity.vo.UploadTaskFileVO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/UploadTaskService.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/UploadTaskService.java index e6ef63ac..ddf7bfc1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/UploadTaskService.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/UploadTaskService.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/AssetAuthorizedDataServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/AssetAuthorizedDataServiceImpl.java index 5b5953cd..f36115f7 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/AssetAuthorizedDataServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/AssetAuthorizedDataServiceImpl.java @@ -1,9 +1,23 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.orion.lang.function.Functions; import com.orion.lang.utils.collect.Lists; import com.orion.lang.utils.collect.Maps; -import com.orion.lang.utils.collect.Sets; import com.orion.visor.framework.common.constant.Const; import com.orion.visor.framework.common.utils.TreeUtils; import com.orion.visor.framework.common.utils.Valid; @@ -11,12 +25,14 @@ import com.orion.visor.module.asset.convert.HostGroupConvert; import com.orion.visor.module.asset.dao.HostDAO; import com.orion.visor.module.asset.entity.request.asset.AssetAuthorizedDataQueryRequest; import com.orion.visor.module.asset.entity.vo.*; -import com.orion.visor.module.asset.enums.HostConnectTypeEnum; import com.orion.visor.module.asset.enums.HostExtraItemEnum; import com.orion.visor.module.asset.enums.HostStatusEnum; import com.orion.visor.module.asset.enums.HostTypeEnum; import com.orion.visor.module.asset.handler.host.extra.model.HostLabelExtraModel; -import com.orion.visor.module.asset.service.*; +import com.orion.visor.module.asset.service.AssetAuthorizedDataService; +import com.orion.visor.module.asset.service.HostIdentityService; +import com.orion.visor.module.asset.service.HostKeyService; +import com.orion.visor.module.asset.service.HostService; import com.orion.visor.module.infra.api.*; import com.orion.visor.module.infra.entity.dto.data.DataGroupDTO; import com.orion.visor.module.infra.entity.dto.tag.TagDTO; @@ -63,9 +79,6 @@ public class AssetAuthorizedDataServiceImpl implements AssetAuthorizedDataServic @Resource private HostIdentityService hostIdentityService; - @Resource - private HostConnectLogService hostConnectLogService; - @Resource private FavoriteApi favoriteApi; @@ -129,14 +142,11 @@ public class AssetAuthorizedDataServiceImpl implements AssetAuthorizedDataServic .groupTree(Lists.empty()) .treeNodes(Maps.empty()) .hostList(Lists.empty()) - .latestHosts(Sets.empty()) .build(); } AuthorizedHostWrapperVO wrapper = new AuthorizedHostWrapperVO(); // 查询我的收藏 Future> favoriteResult = favoriteApi.getFavoriteRelIdListAsync(FavoriteTypeEnum.HOST, userId); - // 查询最近连接的主机 - Future> latestConnectHostIdList = hostConnectLogService.getLatestConnectHostIdAsync(HostConnectTypeEnum.of(type), userId); // 查询主机拓展信息 Future> labelExtraResult = dataExtraApi.getExtraItemValuesByCacheAsync(userId, DataExtraTypeEnum.HOST, @@ -157,8 +167,6 @@ public class AssetAuthorizedDataServiceImpl implements AssetAuthorizedDataServic this.getAuthorizedHostExtra(wrapper.getHostList(), favoriteResult.get(), labelExtraResult.get()); - // 设置最近连接的主机 - wrapper.setLatestHosts(new LinkedHashSet<>(latestConnectHostIdList.get())); return wrapper; } diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/AssetDataGrantServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/AssetDataGrantServiceImpl.java index ee4648c9..c76474d6 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/AssetDataGrantServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/AssetDataGrantServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.orion.lang.utils.collect.Lists; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetGroupServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetGroupServiceImpl.java index 5e13529c..2bcb453d 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetGroupServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetGroupServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetServiceImpl.java index bd4a517f..48cf2016 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/CommandSnippetServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecCommandServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecCommandServiceImpl.java index dafedbf3..4c730783 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecCommandServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecCommandServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecHostLogServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecHostLogServiceImpl.java index 0b36ef35..62d535cc 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecHostLogServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecHostLogServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecJobHostServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecJobHostServiceImpl.java index f99c6a79..6b1e04cd 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecJobHostServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecJobHostServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.orion.visor.module.asset.dao.ExecJobHostDAO; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecJobServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecJobServiceImpl.java index 9b44912d..7971b460 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecJobServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecJobServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecLogServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecLogServiceImpl.java index 018a0283..e149c2f1 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecLogServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecLogServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecTemplateHostServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecTemplateHostServiceImpl.java index 44bbfc7b..f7c8d18e 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecTemplateHostServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecTemplateHostServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecTemplateServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecTemplateServiceImpl.java index 482d18c4..ef3c82ac 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecTemplateServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/ExecTemplateServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostConfigServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostConfigServiceImpl.java index c7f0a55b..2ebc4f76 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostConfigServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostConfigServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.orion.lang.function.Functions; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostConnectLogServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostConnectLogServiceImpl.java deleted file mode 100644 index 87eb02f0..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostConnectLogServiceImpl.java +++ /dev/null @@ -1,260 +0,0 @@ -package com.orion.visor.module.asset.service.impl; - -import com.alibaba.fastjson.JSON; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.orion.lang.define.wrapper.DataGrid; -import com.orion.lang.utils.Arrays1; -import com.orion.lang.utils.collect.Lists; -import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; -import com.orion.visor.framework.common.constant.Const; -import com.orion.visor.framework.common.constant.ErrorMessage; -import com.orion.visor.framework.common.utils.SqlUtils; -import com.orion.visor.framework.common.utils.Valid; -import com.orion.visor.framework.security.core.utils.SecurityUtils; -import com.orion.visor.module.asset.convert.HostConnectLogConvert; -import com.orion.visor.module.asset.dao.HostConnectLogDAO; -import com.orion.visor.module.asset.entity.domain.HostConnectLogDO; -import com.orion.visor.module.asset.entity.dto.HostConnectLogExtraDTO; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogClearRequest; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogCreateRequest; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogQueryRequest; -import com.orion.visor.module.asset.entity.vo.HostConnectLogVO; -import com.orion.visor.module.asset.enums.HostConnectStatusEnum; -import com.orion.visor.module.asset.enums.HostConnectTypeEnum; -import com.orion.visor.module.asset.handler.host.terminal.manager.HostTerminalManager; -import com.orion.visor.module.asset.handler.host.terminal.model.TerminalConfig; -import com.orion.visor.module.asset.handler.host.terminal.session.ITerminalSession; -import com.orion.visor.module.asset.service.HostConnectLogService; -import lombok.extern.slf4j.Slf4j; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import javax.annotation.Resource; -import java.util.*; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.Future; -import java.util.stream.Collectors; - -/** - * 主机连接日志 服务实现类 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2023-12-26 22:09 - */ -@Slf4j -@Service -public class HostConnectLogServiceImpl implements HostConnectLogService { - - @Resource - private HostConnectLogDAO hostConnectLogDAO; - - @Resource - private HostTerminalManager hostTerminalManager; - - @Override - public HostConnectLogDO create(HostConnectTypeEnum type, HostConnectLogCreateRequest request) { - HostConnectLogDO record = HostConnectLogConvert.MAPPER.to(request); - record.setType(type.name()); - String status = request.getStatus(); - record.setStatus(status); - record.setStartTime(new Date()); - record.setExtraInfo(JSON.toJSONString(request.getExtra())); - // 失败直接设置结束时间 - if (HostConnectStatusEnum.FAILED.name().equals(status)) { - record.setEndTime(new Date()); - } - hostConnectLogDAO.insert(record); - return record; - } - - @Override - public DataGrid getHostConnectLogPage(HostConnectLogQueryRequest request) { - // 条件 - LambdaQueryWrapper wrapper = this.buildQueryWrapper(request) - .orderByDesc(HostConnectLogDO::getId); - // 查询 - return hostConnectLogDAO.of(wrapper) - .page(request) - .dataGrid(s -> { - HostConnectLogVO vo = HostConnectLogConvert.MAPPER.to(s); - vo.setExtra(JSON.parseObject(s.getExtraInfo(), HostConnectLogExtraDTO.class)); - return vo; - }); - } - - @Override - public List getHostConnectSessions(HostConnectLogQueryRequest request) { - // 查询全部 - List idList = hostTerminalManager.getChannelSessions() - .values() - .stream() - .map(ConcurrentHashMap::values) - .flatMap(Collection::stream) - .filter(s -> !s.isClosed()) - .map(ITerminalSession::getConfig) - .filter(Objects::nonNull) - .map(TerminalConfig::getLogId) - .filter(Objects::nonNull) - .collect(Collectors.toList()); - if (idList.isEmpty()) { - return Lists.empty(); - } - // 条件 - request.setIdList(idList); - request.setStatus(HostConnectStatusEnum.CONNECTING.name()); - LambdaQueryWrapper wrapper = this.buildQueryWrapper(request) - .orderByDesc(HostConnectLogDO::getId); - // 查询 - return hostConnectLogDAO.of(wrapper) - .list(s -> { - HostConnectLogVO vo = HostConnectLogConvert.MAPPER.to(s); - vo.setExtra(JSON.parseObject(s.getExtraInfo(), HostConnectLogExtraDTO.class)); - return vo; - }); - } - - @Override - public Integer updateStatusById(Long id, HostConnectStatusEnum status, Map partial) { - log.info("HostConnectLogService-updateStatusById start id: {}, status: {}", id, status); - // 查询 - HostConnectLogDO record = hostConnectLogDAO.of() - .createWrapper() - .eq(HostConnectLogDO::getId, id) - .orderByDesc(HostConnectLogDO::getId) - .then() - .getOne(); - if (record == null) { - log.info("HostConnectLogService-updateStatusById no record id: {}", id); - return Const.N_0; - } - return this.updateStatus(record, status, partial); - } - - /** - * 更新状态 - * - * @param record record - * @param status status - * @param partial partial - * @return effect - */ - private int updateStatus(HostConnectLogDO record, HostConnectStatusEnum status, Map partial) { - // 更新 - HostConnectLogDO update = new HostConnectLogDO(); - update.setId(record.getId()); - update.setStatus(status.name()); - update.setEndTime(new Date()); - if (partial != null) { - Map extra = JSON.parseObject(record.getExtraInfo()); - if (extra == null) { - extra = partial; - } else { - extra.putAll(partial); - } - update.setExtraInfo(JSON.toJSONString(extra)); - } - return hostConnectLogDAO.updateById(update); - } - - @Override - public List getLatestConnectHostId(HostConnectLogQueryRequest request) { - return hostConnectLogDAO.selectLatestConnectHostId(SecurityUtils.getLoginUserId(), request.getType(), request.getLimit()); - } - - @Override - @Async("asyncExecutor") - public Future> getLatestConnectHostIdAsync(HostConnectTypeEnum type, Long userId) { - List hostIdList = hostConnectLogDAO.selectLatestConnectHostId(userId, type.name(), Const.N_10); - return CompletableFuture.completedFuture(hostIdList); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Integer deleteHostConnectLog(List idList) { - log.info("HostConnectLogService.deleteHostConnectLog start {}", JSON.toJSONString(idList)); - if (Lists.isEmpty(idList)) { - OperatorLogs.add(OperatorLogs.COUNT, Const.N_0); - return Const.N_0; - } - // 删除日志表 - int effect = hostConnectLogDAO.deleteBatchIds(idList); - log.info("HostConnectLogService.deleteHostConnectLog finish {}", effect); - // 设置日志参数 - OperatorLogs.add(OperatorLogs.COUNT, effect); - return effect; - } - - @Override - public Long getHostConnectLogCount(HostConnectLogQueryRequest request) { - // 条件 - LambdaQueryWrapper wrapper = this.buildQueryWrapper(request); - // 查询 - return hostConnectLogDAO.of() - .wrapper(wrapper) - .countMax(request.getLimit()); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Integer clearHostConnectLog(HostConnectLogClearRequest request) { - log.info("HostConnectLogService.clearHostConnectLog start {}", JSON.toJSONString(request)); - // 查询 - LambdaQueryWrapper wrapper = this.buildQueryWrapper(request) - .select(HostConnectLogDO::getId) - .orderByAsc(HostConnectLogDO::getId) - .last(SqlUtils.limit(request.getLimit())); - List list = hostConnectLogDAO.selectList(wrapper); - if (list.isEmpty()) { - log.info("HostConnectLogService.clearHostConnectLog empty"); - // 设置日志参数 - OperatorLogs.add(OperatorLogs.COUNT, Const.N_0); - return Const.N_0; - } - // 删除 - List idList = list.stream() - .map(HostConnectLogDO::getId) - .collect(Collectors.toList()); - return this.deleteHostConnectLog(idList); - } - - @Override - public Integer forceOffline(HostConnectLogQueryRequest request) { - Long id = request.getId(); - // 查询数据是否存在 - HostConnectLogDO record = hostConnectLogDAO.selectById(id); - Valid.notNull(record, ErrorMessage.LOG_ABSENT); - Valid.eq(record.getStatus(), HostConnectStatusEnum.CONNECTING.name(), ErrorMessage.ILLEGAL_STATUS); - // 设置日志参数 - OperatorLogs.add(OperatorLogs.HOST_NAME, record.getHostName()); - // 获取会话 - HostConnectLogExtraDTO extra = JSON.parseObject(record.getExtraInfo(), HostConnectLogExtraDTO.class); - ITerminalSession session = hostTerminalManager.getSession(extra.getChannelId(), extra.getSessionId()); - if (session != null) { - // 关闭会话 - session.forceOffline(); - } - // 更新状态 - return this.updateStatus(record, HostConnectStatusEnum.FORCE_OFFLINE, null); - } - - @Override - public LambdaQueryWrapper buildQueryWrapper(HostConnectLogQueryRequest request) { - return hostConnectLogDAO.wrapper() - .eq(HostConnectLogDO::getId, request.getId()) - .in(HostConnectLogDO::getId, request.getIdList()) - .eq(HostConnectLogDO::getUserId, request.getUserId()) - .eq(HostConnectLogDO::getHostId, request.getHostId()) - .like(HostConnectLogDO::getHostAddress, request.getHostAddress()) - .eq(HostConnectLogDO::getType, request.getType()) - .like(HostConnectLogDO::getToken, request.getToken()) - .eq(HostConnectLogDO::getStatus, request.getStatus()) - .in(HostConnectLogDO::getStatus, request.getStatusList()) - .ge(HostConnectLogDO::getStartTime, Arrays1.getIfPresent(request.getStartTimeRange(), 0)) - .le(HostConnectLogDO::getStartTime, Arrays1.getIfPresent(request.getStartTimeRange(), 1)) - .le(HostConnectLogDO::getCreateTime, request.getCreateTimeLe()); - } - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostExtraServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostExtraServiceImpl.java index 106105be..1bce1fcb 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostExtraServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostExtraServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.orion.lang.function.Functions; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostGroupServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostGroupServiceImpl.java index 5d0de6d3..30c1c9a7 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostGroupServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostGroupServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.orion.visor.module.asset.convert.HostGroupConvert; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostIdentityServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostIdentityServiceImpl.java index 4cb1caa2..6078c7be 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostIdentityServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostIdentityServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostKeyServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostKeyServiceImpl.java index 9563a51c..574d1c99 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostKeyServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostKeyServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostServiceImpl.java index 607b91a6..4e5c97a6 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostSftpServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostSftpServiceImpl.java deleted file mode 100644 index 765982d6..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostSftpServiceImpl.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.orion.visor.module.asset.service.impl; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.orion.lang.constant.StandardContentType; -import com.orion.lang.define.wrapper.DataGrid; -import com.orion.lang.utils.Arrays1; -import com.orion.lang.utils.Strings; -import com.orion.lang.utils.io.Files1; -import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; -import com.orion.visor.framework.common.constant.Const; -import com.orion.visor.framework.common.constant.ErrorMessage; -import com.orion.visor.framework.common.constant.ExtraFieldConst; -import com.orion.visor.module.asset.convert.HostSftpLogConvert; -import com.orion.visor.module.asset.define.operator.HostTerminalOperatorType; -import com.orion.visor.module.asset.entity.request.host.HostSftpLogQueryRequest; -import com.orion.visor.module.asset.entity.vo.HostSftpLogVO; -import com.orion.visor.module.asset.handler.host.transfer.manager.HostTransferManager; -import com.orion.visor.module.asset.handler.host.transfer.session.DownloadSession; -import com.orion.visor.module.asset.service.HostSftpService; -import com.orion.visor.module.infra.api.OperatorLogApi; -import com.orion.visor.module.infra.entity.dto.operator.OperatorLogQueryDTO; -import com.orion.web.servlet.web.Servlets; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; -import java.util.List; -import java.util.Optional; - -/** - * SFTP 操作 服务实现类 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2024/3/4 23:35 - */ -@Slf4j -@Service -public class HostSftpServiceImpl implements HostSftpService { - - @Resource - private OperatorLogApi operatorLogApi; - - @Resource - private HostTransferManager hostTransferManager; - - @Override - public DataGrid getHostSftpLogPage(HostSftpLogQueryRequest request) { - // 查询 - OperatorLogQueryDTO query = this.buildQueryInfo(request); - // 转换 - return operatorLogApi.getOperatorLogPage(query) - .map(s -> { - JSONObject extra = JSON.parseObject(s.getExtra()); - HostSftpLogVO vo = HostSftpLogConvert.MAPPER.to(s); - vo.setHostId(extra.getLong(ExtraFieldConst.HOST_ID)); - vo.setHostName(extra.getString(ExtraFieldConst.HOST_NAME)); - vo.setHostAddress(extra.getString(ExtraFieldConst.ADDRESS)); - String[] paths = Optional.ofNullable(extra.getString(ExtraFieldConst.PATH)) - .map(p -> p.split("\\|")) - .orElse(new String[0]); - vo.setPaths(paths); - vo.setExtra(extra); - return vo; - }); - } - - @Override - public Integer deleteHostSftpLog(List idList) { - log.info("HostSftpLogService.deleteSftpLog start {}", JSON.toJSONString(idList)); - Integer effect = operatorLogApi.deleteOperatorLog(idList); - log.info("HostSftpLogService.deleteSftpLog finish {}", effect); - // 设置日志参数 - OperatorLogs.add(OperatorLogs.COUNT, effect); - return effect; - } - - @Override - public StreamingResponseBody downloadWithTransferToken(String channelId, String transferToken, HttpServletResponse response) { - // 获取会话 - DownloadSession session = (DownloadSession) Optional.ofNullable(channelId) - .map(hostTransferManager::getHandler) - .map(s -> s.getSessionByToken(transferToken)) - .filter(s -> s instanceof DownloadSession) - .orElse(null); - // 响应会话 - if (session == null) { - Servlets.setContentType(response, StandardContentType.TEXT_HTML); - Servlets.setCharset(response, Const.UTF_8); - return outputStream -> outputStream.write(Strings.bytes(ErrorMessage.SESSION_ABSENT)); - } - // 响应文件 - Servlets.setAttachmentHeader(response, Files1.getFileName(session.getPath())); - return session; - } - - /** - * 构建查询对象 - * - * @param request request - * @return query - */ - private OperatorLogQueryDTO buildQueryInfo(HostSftpLogQueryRequest request) { - Long hostId = request.getHostId(); - String type = request.getType(); - // 构建参数 - OperatorLogQueryDTO query = OperatorLogQueryDTO.builder() - .userId(request.getUserId()) - .result(request.getResult()) - .startTimeStart(Arrays1.getIfPresent(request.getStartTimeRange(), 0)) - .startTimeEnd(Arrays1.getIfPresent(request.getStartTimeRange(), 1)) - .build(); - query.setPage(request.getPage()); - query.setLimit(request.getLimit()); - if (Strings.isBlank(type)) { - // 查询全部 SFTP 类型 - query.setTypeList(HostTerminalOperatorType.SFTP_TYPES); - } else { - query.setType(type); - } - // 模糊查询 - if (hostId != null) { - query.setExtra("\"hostId\": " + hostId + ","); - } - return query; - } - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkGroupServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkGroupServiceImpl.java index e21f4d38..165f1bac 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkGroupServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkGroupServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkServiceImpl.java index e507fc4c..733b82bf 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/PathBookmarkServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/TerminalConnectLogServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/TerminalConnectLogServiceImpl.java new file mode 100644 index 00000000..1c0f3f3c --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/TerminalConnectLogServiceImpl.java @@ -0,0 +1,267 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.service.impl; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.orion.lang.define.wrapper.DataGrid; +import com.orion.lang.utils.Arrays1; +import com.orion.lang.utils.collect.Lists; +import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; +import com.orion.visor.framework.common.constant.Const; +import com.orion.visor.framework.common.constant.ErrorMessage; +import com.orion.visor.framework.common.utils.SqlUtils; +import com.orion.visor.framework.common.utils.Valid; +import com.orion.visor.framework.security.core.utils.SecurityUtils; +import com.orion.visor.module.asset.convert.TerminalConnectLogConvert; +import com.orion.visor.module.asset.dao.TerminalConnectLogDAO; +import com.orion.visor.module.asset.entity.domain.TerminalConnectLogDO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectLogExtraDTO; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogClearRequest; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogCreateRequest; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogQueryRequest; +import com.orion.visor.module.asset.entity.vo.TerminalConnectLogVO; +import com.orion.visor.module.asset.enums.TerminalConnectStatusEnum; +import com.orion.visor.module.asset.enums.TerminalConnectTypeEnum; +import com.orion.visor.module.asset.handler.host.terminal.manager.TerminalManager; +import com.orion.visor.module.asset.handler.host.terminal.model.TerminalConfig; +import com.orion.visor.module.asset.handler.host.terminal.session.ITerminalSession; +import com.orion.visor.module.asset.service.TerminalConnectLogService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.stream.Collectors; + +/** + * 终端连接日志 服务实现类 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2023-12-26 22:09 + */ +@Slf4j +@Service +public class TerminalConnectLogServiceImpl implements TerminalConnectLogService { + + @Resource + private TerminalConnectLogDAO terminalConnectLogDAO; + + @Resource + private TerminalManager terminalManager; + + @Override + public TerminalConnectLogDO create(TerminalConnectTypeEnum type, TerminalConnectLogCreateRequest request) { + TerminalConnectLogDO record = TerminalConnectLogConvert.MAPPER.to(request); + record.setType(type.name()); + String status = request.getStatus(); + record.setStatus(status); + record.setStartTime(new Date()); + record.setExtraInfo(JSON.toJSONString(request.getExtra())); + // 失败直接设置结束时间 + if (TerminalConnectStatusEnum.FAILED.name().equals(status)) { + record.setEndTime(new Date()); + } + terminalConnectLogDAO.insert(record); + return record; + } + + @Override + public DataGrid getTerminalConnectLogPage(TerminalConnectLogQueryRequest request) { + // 条件 + LambdaQueryWrapper wrapper = this.buildQueryWrapper(request) + .orderByDesc(TerminalConnectLogDO::getId); + // 查询 + return terminalConnectLogDAO.of(wrapper) + .page(request) + .dataGrid(s -> { + TerminalConnectLogVO vo = TerminalConnectLogConvert.MAPPER.to(s); + vo.setExtra(JSON.parseObject(s.getExtraInfo(), TerminalConnectLogExtraDTO.class)); + return vo; + }); + } + + @Override + public List getTerminalConnectSessions(TerminalConnectLogQueryRequest request) { + // 查询全部 + List idList = terminalManager.getChannelSessions() + .values() + .stream() + .map(ConcurrentHashMap::values) + .flatMap(Collection::stream) + .filter(s -> !s.isClosed()) + .map(ITerminalSession::getConfig) + .filter(Objects::nonNull) + .map(TerminalConfig::getLogId) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + if (idList.isEmpty()) { + return Lists.empty(); + } + // 条件 + request.setIdList(idList); + request.setStatus(TerminalConnectStatusEnum.CONNECTING.name()); + LambdaQueryWrapper wrapper = this.buildQueryWrapper(request) + .orderByDesc(TerminalConnectLogDO::getId); + // 查询 + return terminalConnectLogDAO.of(wrapper) + .list(s -> { + TerminalConnectLogVO vo = TerminalConnectLogConvert.MAPPER.to(s); + vo.setExtra(JSON.parseObject(s.getExtraInfo(), TerminalConnectLogExtraDTO.class)); + return vo; + }); + } + + @Override + public Integer updateStatusById(Long id, TerminalConnectStatusEnum status, Map partial) { + log.info("TerminalConnectLogService-updateStatusById start id: {}, status: {}", id, status); + // 查询 + TerminalConnectLogDO record = terminalConnectLogDAO.of() + .createWrapper() + .eq(TerminalConnectLogDO::getId, id) + .orderByDesc(TerminalConnectLogDO::getId) + .then() + .getOne(); + if (record == null) { + log.info("TerminalConnectLogService-updateStatusById no record id: {}", id); + return Const.N_0; + } + return this.updateStatus(record, status, partial); + } + + /** + * 更新状态 + * + * @param record record + * @param status status + * @param partial partial + * @return effect + */ + private int updateStatus(TerminalConnectLogDO record, TerminalConnectStatusEnum status, Map partial) { + // 更新 + TerminalConnectLogDO update = new TerminalConnectLogDO(); + update.setId(record.getId()); + update.setStatus(status.name()); + update.setEndTime(new Date()); + if (partial != null) { + Map extra = JSON.parseObject(record.getExtraInfo()); + if (extra == null) { + extra = partial; + } else { + extra.putAll(partial); + } + update.setExtraInfo(JSON.toJSONString(extra)); + } + return terminalConnectLogDAO.updateById(update); + } + + @Override + public Set getLatestConnectHostId(TerminalConnectLogQueryRequest request) { + // 查询最近连接的主机 + List hostIdList = terminalConnectLogDAO.selectLatestConnectHostId(SecurityUtils.getLoginUserId(), request.getType(), request.getLimit()); + return new LinkedHashSet<>(hostIdList); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Integer deleteTerminalConnectLog(List idList) { + log.info("TerminalConnectLogService.deleteTerminalConnectLog start {}", JSON.toJSONString(idList)); + if (Lists.isEmpty(idList)) { + OperatorLogs.add(OperatorLogs.COUNT, Const.N_0); + return Const.N_0; + } + // 删除日志表 + int effect = terminalConnectLogDAO.deleteBatchIds(idList); + log.info("TerminalConnectLogService.deleteTerminalConnectLog finish {}", effect); + // 设置日志参数 + OperatorLogs.add(OperatorLogs.COUNT, effect); + return effect; + } + + @Override + public Long getTerminalConnectLogCount(TerminalConnectLogQueryRequest request) { + // 条件 + LambdaQueryWrapper wrapper = this.buildQueryWrapper(request); + // 查询 + return terminalConnectLogDAO.of() + .wrapper(wrapper) + .countMax(request.getLimit()); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Integer clearTerminalConnectLog(TerminalConnectLogClearRequest request) { + log.info("TerminalConnectLogService.clearTerminalConnectLog start {}", JSON.toJSONString(request)); + // 查询 + LambdaQueryWrapper wrapper = this.buildQueryWrapper(request) + .select(TerminalConnectLogDO::getId) + .orderByAsc(TerminalConnectLogDO::getId) + .last(SqlUtils.limit(request.getLimit())); + List list = terminalConnectLogDAO.selectList(wrapper); + if (list.isEmpty()) { + log.info("TerminalConnectLogService.clearTerminalConnectLog empty"); + // 设置日志参数 + OperatorLogs.add(OperatorLogs.COUNT, Const.N_0); + return Const.N_0; + } + // 删除 + List idList = list.stream() + .map(TerminalConnectLogDO::getId) + .collect(Collectors.toList()); + return this.deleteTerminalConnectLog(idList); + } + + @Override + public Integer forceOffline(TerminalConnectLogQueryRequest request) { + Long id = request.getId(); + // 查询数据是否存在 + TerminalConnectLogDO record = terminalConnectLogDAO.selectById(id); + Valid.notNull(record, ErrorMessage.LOG_ABSENT); + Valid.eq(record.getStatus(), TerminalConnectStatusEnum.CONNECTING.name(), ErrorMessage.ILLEGAL_STATUS); + // 设置日志参数 + OperatorLogs.add(OperatorLogs.HOST_NAME, record.getHostName()); + // 获取会话 + TerminalConnectLogExtraDTO extra = JSON.parseObject(record.getExtraInfo(), TerminalConnectLogExtraDTO.class); + ITerminalSession session = terminalManager.getSession(extra.getChannelId(), extra.getSessionId()); + if (session != null) { + // 关闭会话 + session.forceOffline(); + } + // 更新状态 + return this.updateStatus(record, TerminalConnectStatusEnum.FORCE_OFFLINE, null); + } + + @Override + public LambdaQueryWrapper buildQueryWrapper(TerminalConnectLogQueryRequest request) { + return terminalConnectLogDAO.wrapper() + .eq(TerminalConnectLogDO::getId, request.getId()) + .in(TerminalConnectLogDO::getId, request.getIdList()) + .eq(TerminalConnectLogDO::getUserId, request.getUserId()) + .eq(TerminalConnectLogDO::getHostId, request.getHostId()) + .like(TerminalConnectLogDO::getHostAddress, request.getHostAddress()) + .eq(TerminalConnectLogDO::getType, request.getType()) + .like(TerminalConnectLogDO::getToken, request.getToken()) + .eq(TerminalConnectLogDO::getStatus, request.getStatus()) + .in(TerminalConnectLogDO::getStatus, request.getStatusList()) + .ge(TerminalConnectLogDO::getStartTime, Arrays1.getIfPresent(request.getStartTimeRange(), 0)) + .le(TerminalConnectLogDO::getStartTime, Arrays1.getIfPresent(request.getStartTimeRange(), 1)) + .le(TerminalConnectLogDO::getCreateTime, request.getCreateTimeLe()); + } + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostTerminalServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/TerminalServiceImpl.java similarity index 75% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostTerminalServiceImpl.java rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/TerminalServiceImpl.java index b8c8cee6..93bb23db 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/HostTerminalServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/TerminalServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSONObject; @@ -11,20 +26,20 @@ import com.orion.visor.framework.security.core.utils.SecurityUtils; import com.orion.visor.module.asset.dao.HostDAO; import com.orion.visor.module.asset.dao.HostIdentityDAO; import com.orion.visor.module.asset.dao.HostKeyDAO; -import com.orion.visor.module.asset.define.cache.HostTerminalCacheKeyDefine; +import com.orion.visor.module.asset.define.cache.TerminalCacheKeyDefine; import com.orion.visor.module.asset.entity.domain.HostDO; import com.orion.visor.module.asset.entity.domain.HostIdentityDO; import com.orion.visor.module.asset.entity.domain.HostKeyDO; -import com.orion.visor.module.asset.entity.dto.HostTerminalAccessDTO; -import com.orion.visor.module.asset.entity.dto.HostTerminalConnectDTO; -import com.orion.visor.module.asset.entity.dto.HostTerminalTransferDTO; -import com.orion.visor.module.asset.entity.vo.HostTerminalThemeVO; +import com.orion.visor.module.asset.entity.dto.TerminalAccessDTO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; +import com.orion.visor.module.asset.entity.dto.TerminalTransferDTO; +import com.orion.visor.module.asset.entity.vo.TerminalThemeVO; import com.orion.visor.module.asset.enums.*; import com.orion.visor.module.asset.handler.host.config.model.HostSshConfigModel; import com.orion.visor.module.asset.handler.host.extra.model.HostSshExtraModel; import com.orion.visor.module.asset.service.HostConfigService; import com.orion.visor.module.asset.service.HostExtraService; -import com.orion.visor.module.asset.service.HostTerminalService; +import com.orion.visor.module.asset.service.TerminalService; import com.orion.visor.module.infra.api.DataPermissionApi; import com.orion.visor.module.infra.api.DictValueApi; import com.orion.visor.module.infra.enums.DataPermissionTypeEnum; @@ -37,7 +52,7 @@ import java.util.Optional; import java.util.stream.Collectors; /** - * 主机连接服务 + * 终端连接服务 * * @author Jiahang Li * @version 1.0.0 @@ -45,7 +60,7 @@ import java.util.stream.Collectors; */ @Slf4j @Service -public class HostTerminalServiceImpl implements HostTerminalService { +public class TerminalServiceImpl implements TerminalService { private static final String THEME_DICT_KEY = "terminalTheme"; @@ -74,14 +89,14 @@ public class HostTerminalServiceImpl implements HostTerminalService { private DictValueApi dictValueApi; @Override - public List getTerminalThemes() { + public List getTerminalThemes() { // if (true) { // String arr = ""; // return JSON.parseArray(arr, HostTerminalThemeVO.class); // } List themes = dictValueApi.getDictValue(THEME_DICT_KEY); return themes.stream() - .map(s -> HostTerminalThemeVO.builder() + .map(s -> TerminalThemeVO.builder() .name(s.getString(ExtraFieldConst.LABEL)) .dark(s.getBoolean(ExtraFieldConst.DARK)) .schema(s.getJSONObject(ExtraFieldConst.VALUE)) @@ -92,38 +107,38 @@ public class HostTerminalServiceImpl implements HostTerminalService { @Override public String getTerminalAccessToken() { LoginUser user = Valid.notNull(SecurityUtils.getLoginUser()); - log.info("HostConnectService.getHostAccessToken userId: {}", user.getId()); + log.info("HostTerminalService.getTerminalAccessToken userId: {}", user.getId()); String accessToken = UUIds.random19(); - HostTerminalAccessDTO access = HostTerminalAccessDTO.builder() + TerminalAccessDTO access = TerminalAccessDTO.builder() .userId(user.getId()) .username(user.getUsername()) .build(); // 设置 access 缓存 - String key = HostTerminalCacheKeyDefine.HOST_TERMINAL_ACCESS.format(accessToken); - RedisStrings.setJson(key, HostTerminalCacheKeyDefine.HOST_TERMINAL_ACCESS, access); + String key = TerminalCacheKeyDefine.TERMINAL_ACCESS.format(accessToken); + RedisStrings.setJson(key, TerminalCacheKeyDefine.TERMINAL_ACCESS, access); return accessToken; } @Override public String getTerminalTransferToken() { LoginUser user = Valid.notNull(SecurityUtils.getLoginUser()); - log.info("HostConnectService.getTerminalTransferToken userId: {}", user.getId()); + log.info("HostTerminalService.getTerminalTransferToken userId: {}", user.getId()); String transferToken = UUIds.random19(); - HostTerminalTransferDTO transfer = HostTerminalTransferDTO.builder() + TerminalTransferDTO transfer = TerminalTransferDTO.builder() .userId(user.getId()) .username(user.getUsername()) .build(); // 设置 transfer 缓存 - String key = HostTerminalCacheKeyDefine.HOST_TERMINAL_TRANSFER.format(transferToken); - RedisStrings.setJson(key, HostTerminalCacheKeyDefine.HOST_TERMINAL_TRANSFER, transfer); + String key = TerminalCacheKeyDefine.TERMINAL_TRANSFER.format(transferToken); + RedisStrings.setJson(key, TerminalCacheKeyDefine.TERMINAL_TRANSFER, transfer); return transferToken; } @Override - public HostTerminalAccessDTO getAccessInfoByToken(String token) { + public TerminalAccessDTO getAccessInfoByToken(String token) { // 获取缓存 - String key = HostTerminalCacheKeyDefine.HOST_TERMINAL_ACCESS.format(token); - HostTerminalAccessDTO access = RedisStrings.getJson(key, HostTerminalCacheKeyDefine.HOST_TERMINAL_ACCESS); + String key = TerminalCacheKeyDefine.TERMINAL_ACCESS.format(token); + TerminalAccessDTO access = RedisStrings.getJson(key, TerminalCacheKeyDefine.TERMINAL_ACCESS); // 删除缓存 if (access != null) { RedisStrings.delete(key); @@ -132,10 +147,10 @@ public class HostTerminalServiceImpl implements HostTerminalService { } @Override - public HostTerminalTransferDTO getTransferInfoByToken(String token) { + public TerminalTransferDTO getTransferInfoByToken(String token) { // 获取缓存 - String key = HostTerminalCacheKeyDefine.HOST_TERMINAL_TRANSFER.format(token); - HostTerminalTransferDTO transfer = RedisStrings.getJson(key, HostTerminalCacheKeyDefine.HOST_TERMINAL_TRANSFER); + String key = TerminalCacheKeyDefine.TERMINAL_TRANSFER.format(token); + TerminalTransferDTO transfer = RedisStrings.getJson(key, TerminalCacheKeyDefine.TERMINAL_TRANSFER); // 删除缓存 if (transfer != null) { RedisStrings.delete(key); @@ -144,8 +159,8 @@ public class HostTerminalServiceImpl implements HostTerminalService { } @Override - public HostTerminalConnectDTO getTerminalConnectInfo(Long hostId) { - log.info("HostConnectService.getTerminalConnectInfo-withHost hostId: {}", hostId); + public TerminalConnectDTO getTerminalConnectInfo(Long hostId) { + log.info("HostTerminalService.getTerminalConnectInfo-withHost hostId: {}", hostId); // 查询主机 HostDO host = hostDAO.selectById(hostId); // 查询主机配置 @@ -155,7 +170,7 @@ public class HostTerminalServiceImpl implements HostTerminalService { } @Override - public HostTerminalConnectDTO getTerminalConnectInfo(Long userId, Long hostId) { + public TerminalConnectDTO getTerminalConnectInfo(Long userId, Long hostId) { // 查询主机 HostDO host = hostDAO.selectById(hostId); Valid.notNull(host, ErrorMessage.HOST_ABSENT); @@ -164,9 +179,9 @@ public class HostTerminalServiceImpl implements HostTerminalService { } @Override - public HostTerminalConnectDTO getTerminalConnectInfo(Long userId, HostDO host) { + public TerminalConnectDTO getTerminalConnectInfo(Long userId, HostDO host) { Long hostId = host.getId(); - log.info("HostConnectService.getTerminalConnectInfo hostId: {}, userId: {}", hostId, userId); + log.info("HostTerminalService.getTerminalConnectInfo hostId: {}, userId: {}", hostId, userId); // 验证主机是否有权限 List hostIdList = assetAuthorizedDataService.getUserAuthorizedHostId(userId); Valid.isTrue(hostIdList.contains(hostId), @@ -205,11 +220,11 @@ public class HostTerminalServiceImpl implements HostTerminalService { * @param extra extra * @return session */ - private HostTerminalConnectDTO getHostConnectInfo(HostDO host, - HostSshConfigModel config, - HostSshExtraModel extra) { + private TerminalConnectDTO getHostConnectInfo(HostDO host, + HostSshConfigModel config, + HostSshExtraModel extra) { // 填充认证信息 - HostTerminalConnectDTO conn = new HostTerminalConnectDTO(); + TerminalConnectDTO conn = new TerminalConnectDTO(); conn.setHostId(host.getId()); conn.setHostName(host.getName()); conn.setHostAddress(host.getAddress()); diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/TerminalSftpServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/TerminalSftpServiceImpl.java new file mode 100644 index 00000000..abb4e612 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/TerminalSftpServiceImpl.java @@ -0,0 +1,234 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.orion.lang.constant.StandardContentType; +import com.orion.lang.define.wrapper.DataGrid; +import com.orion.lang.define.wrapper.HttpWrapper; +import com.orion.lang.utils.Arrays1; +import com.orion.lang.utils.Exceptions; +import com.orion.lang.utils.Strings; +import com.orion.lang.utils.Valid; +import com.orion.lang.utils.io.Files1; +import com.orion.lang.utils.io.Streams; +import com.orion.net.host.SessionStore; +import com.orion.net.host.sftp.SftpExecutor; +import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; +import com.orion.visor.framework.common.constant.Const; +import com.orion.visor.framework.common.constant.ErrorMessage; +import com.orion.visor.framework.common.constant.ExtraFieldConst; +import com.orion.visor.framework.redis.core.utils.RedisStrings; +import com.orion.visor.framework.security.core.utils.SecurityUtils; +import com.orion.visor.module.asset.convert.TerminalSftpLogConvert; +import com.orion.visor.module.asset.define.cache.TerminalCacheKeyDefine; +import com.orion.visor.module.asset.define.operator.TerminalOperatorType; +import com.orion.visor.module.asset.entity.dto.SftpGetContentCacheDTO; +import com.orion.visor.module.asset.entity.dto.SftpSetContentCacheDTO; +import com.orion.visor.module.asset.entity.dto.TerminalConnectDTO; +import com.orion.visor.module.asset.entity.request.host.TerminalSftpLogQueryRequest; +import com.orion.visor.module.asset.entity.vo.TerminalSftpLogVO; +import com.orion.visor.module.asset.handler.host.jsch.SessionStores; +import com.orion.visor.module.asset.handler.host.transfer.manager.TerminalTransferManager; +import com.orion.visor.module.asset.handler.host.transfer.session.DownloadSession; +import com.orion.visor.module.asset.service.TerminalService; +import com.orion.visor.module.asset.service.TerminalSftpService; +import com.orion.visor.module.infra.api.OperatorLogApi; +import com.orion.visor.module.infra.entity.dto.operator.OperatorLogQueryDTO; +import com.orion.web.servlet.web.Servlets; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; +import java.util.Optional; + +/** + * SFTP 操作 服务实现类 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/3/4 23:35 + */ +@Slf4j +@Service +public class TerminalSftpServiceImpl implements TerminalSftpService { + + @Resource + private OperatorLogApi operatorLogApi; + + @Resource + private TerminalService terminalService; + + @Resource + private TerminalTransferManager terminalTransferManager; + + @Override + public DataGrid getTerminalSftpLogPage(TerminalSftpLogQueryRequest request) { + // 查询 + OperatorLogQueryDTO query = this.buildQueryInfo(request); + // 转换 + return operatorLogApi.getOperatorLogPage(query) + .map(s -> { + JSONObject extra = JSON.parseObject(s.getExtra()); + TerminalSftpLogVO vo = TerminalSftpLogConvert.MAPPER.to(s); + vo.setHostId(extra.getLong(ExtraFieldConst.HOST_ID)); + vo.setHostName(extra.getString(ExtraFieldConst.HOST_NAME)); + vo.setHostAddress(extra.getString(ExtraFieldConst.ADDRESS)); + String[] paths = Optional.ofNullable(extra.getString(ExtraFieldConst.PATH)) + .map(p -> p.split("\\|")) + .orElse(new String[0]); + vo.setPaths(paths); + vo.setExtra(extra); + return vo; + }); + } + + @Override + public Integer deleteTerminalSftpLog(List idList) { + log.info("TerminalSftpService.deleteSftpLog start {}", JSON.toJSONString(idList)); + Integer effect = operatorLogApi.deleteOperatorLog(idList); + log.info("TerminalSftpService.deleteSftpLog finish {}", effect); + // 设置日志参数 + OperatorLogs.add(OperatorLogs.COUNT, effect); + return effect; + } + + @Override + public void getFileContentByToken(String token, HttpServletResponse response) throws IOException { + // 解析 token + String key = TerminalCacheKeyDefine.TERMINAL_SFTP_GET_CONTENT.format(token); + SftpGetContentCacheDTO cache = RedisStrings.getJson(key, TerminalCacheKeyDefine.TERMINAL_SFTP_GET_CONTENT); + if (cache == null) { + Servlets.writeHttpWrapper(response, HttpWrapper.error(ErrorMessage.FILE_ABSENT)); + return; + } + // 删除缓存 + RedisStrings.delete(key); + // 获取文件内容 + SessionStore sessionStore = null; + SftpExecutor executor = null; + InputStream in = null; + try { + // 获取终端连接信息 + TerminalConnectDTO connectInfo = terminalService.getTerminalConnectInfo(SecurityUtils.getLoginUserId(), cache.getHostId()); + sessionStore = SessionStores.openSessionStore(connectInfo); + executor = sessionStore.getSftpExecutor(connectInfo.getFileNameCharset()); + executor.connect(); + // 读取文件 + in = executor.openInputStream(cache.getPath()); + // 设置返回 + Servlets.setContentType(response, StandardContentType.TEXT_PLAIN); + Servlets.transfer(response, in); + } catch (Exception e) { + Servlets.writeHttpWrapper(response, HttpWrapper.error(ErrorMessage.FILE_READ_ERROR)); + } finally { + Streams.close(executor); + Streams.close(sessionStore); + Streams.close(in); + } + } + + @Override + public void setFileContentByToken(String token, MultipartFile file) { + // 解析 token + String key = TerminalCacheKeyDefine.TERMINAL_SFTP_SET_CONTENT.format(token); + SftpSetContentCacheDTO cache = RedisStrings.getJson(key, TerminalCacheKeyDefine.TERMINAL_SFTP_SET_CONTENT); + Valid.notNull(cache, ErrorMessage.FILE_ABSENT); + // 删除缓存 + RedisStrings.delete(key); + // 写入文件内容 + SessionStore sessionStore = null; + SftpExecutor executor = null; + OutputStream out = null; + InputStream in = null; + try { + // 获取终端连接信息 + TerminalConnectDTO connectInfo = terminalService.getTerminalConnectInfo(SecurityUtils.getLoginUserId(), cache.getHostId()); + sessionStore = SessionStores.openSessionStore(connectInfo); + executor = sessionStore.getSftpExecutor(connectInfo.getFileNameCharset()); + executor.connect(); + // 写入文件 + out = executor.openOutputStream(cache.getPath()); + Streams.transfer(in = file.getInputStream(), out); + } catch (Exception e) { + throw Exceptions.app(ErrorMessage.OPERATE_ERROR); + } finally { + Streams.close(executor); + Streams.close(sessionStore); + Streams.close(out); + Streams.close(in); + } + } + + @Override + public StreamingResponseBody downloadWithTransferToken(String channelId, String transferToken, HttpServletResponse response) { + // 获取会话 + DownloadSession session = (DownloadSession) Optional.ofNullable(channelId) + .map(terminalTransferManager::getHandler) + .map(s -> s.getSessionByToken(transferToken)) + .filter(s -> s instanceof DownloadSession) + .orElse(null); + // 响应会话 + if (session == null) { + Servlets.setContentType(response, StandardContentType.TEXT_HTML); + Servlets.setCharset(response, Const.UTF_8); + return outputStream -> outputStream.write(Strings.bytes(ErrorMessage.SESSION_ABSENT)); + } + // 响应文件 + Servlets.setAttachmentHeader(response, Files1.getFileName(session.getPath())); + return session; + } + + /** + * 构建查询对象 + * + * @param request request + * @return query + */ + private OperatorLogQueryDTO buildQueryInfo(TerminalSftpLogQueryRequest request) { + Long hostId = request.getHostId(); + String type = request.getType(); + // 构建参数 + OperatorLogQueryDTO query = OperatorLogQueryDTO.builder() + .userId(request.getUserId()) + .result(request.getResult()) + .startTimeStart(Arrays1.getIfPresent(request.getStartTimeRange(), 0)) + .startTimeEnd(Arrays1.getIfPresent(request.getStartTimeRange(), 1)) + .build(); + query.setPage(request.getPage()); + query.setLimit(request.getLimit()); + if (Strings.isBlank(type)) { + // 查询全部 SFTP 类型 + query.setTypeList(TerminalOperatorType.SFTP_TYPES); + } else { + query.setType(type); + } + // 模糊查询 + if (hostId != null) { + query.setExtra("\"hostId\": " + hostId + ","); + } + return query; + } + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/UploadTaskFileServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/UploadTaskFileServiceImpl.java index a7d604fb..d3478968 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/UploadTaskFileServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/UploadTaskFileServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/UploadTaskServiceImpl.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/UploadTaskServiceImpl.java index c382e454..9953eaad 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/UploadTaskServiceImpl.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/service/impl/UploadTaskServiceImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.service.impl; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/CommandSnippetGroupAutoClearTask.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/CommandSnippetGroupAutoClearTask.java index 740ef033..33a4b818 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/CommandSnippetGroupAutoClearTask.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/CommandSnippetGroupAutoClearTask.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.task; import com.orion.visor.framework.common.utils.LockerUtils; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/ExecLogFileAutoClearTask.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/ExecLogFileAutoClearTask.java index 40519a9a..22e47ce3 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/ExecLogFileAutoClearTask.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/ExecLogFileAutoClearTask.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.task; import com.orion.lang.utils.time.Dates; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/HostConnectLogAutoClearTask.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/HostConnectLogAutoClearTask.java deleted file mode 100644 index 8b7d01a2..00000000 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/HostConnectLogAutoClearTask.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.orion.visor.module.asset.task; - -import com.orion.lang.utils.time.Dates; -import com.orion.visor.framework.common.utils.LockerUtils; -import com.orion.visor.module.asset.define.config.AppHostConnectLogAutoClearConfig; -import com.orion.visor.module.asset.entity.request.host.HostConnectLogClearRequest; -import com.orion.visor.module.asset.enums.HostConnectStatusEnum; -import com.orion.visor.module.asset.service.HostConnectLogService; -import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -import javax.annotation.Resource; -import java.util.Date; - -/** - * 主机连接日志自动清理 - * - * @author Jiahang Li - * @version 1.0.0 - * @since 2024/4/24 23:50 - */ -@Slf4j -@Component -@ConditionalOnProperty(value = "app.auto-clear.host-connect-log.enabled", havingValue = "true") -public class HostConnectLogAutoClearTask { - - /** - * 分布式锁名称 - */ - private static final String LOCK_KEY = "clear:hcl:lock"; - - @Resource - private AppHostConnectLogAutoClearConfig appHostConnectLogAutoClearConfig; - - @Resource - private HostConnectLogService hostConnectLogService; - - /** - * 清理 - */ - @Scheduled(cron = "0 10 3 * * ?") - public void clear() { - log.info("HostConnectLogAutoClearTask.clear start"); - // 获取锁并执行 - LockerUtils.tryLock(LOCK_KEY, this::doClear); - log.info("HostConnectLogAutoClearTask.clear finish"); - } - - /** - * 执行清理 - */ - private void doClear() { - // 删除的时间区间 - Date createLessEq = Dates.stream() - .subDay(appHostConnectLogAutoClearConfig.getKeepPeriod()) - .date(); - // 清理 - HostConnectLogClearRequest request = new HostConnectLogClearRequest(); - request.setCreateTimeLe(createLessEq); - request.setStatusList(HostConnectStatusEnum.FINISH_STATUS_LIST); - hostConnectLogService.clearHostConnectLog(request); - } - -} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/PathBookmarkGroupAutoClearTask.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/PathBookmarkGroupAutoClearTask.java index 7e29ea22..dea95a46 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/PathBookmarkGroupAutoClearTask.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/PathBookmarkGroupAutoClearTask.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.task; import com.orion.visor.framework.common.utils.LockerUtils; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/TerminalConnectLogAutoClearTask.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/TerminalConnectLogAutoClearTask.java new file mode 100644 index 00000000..fff5c481 --- /dev/null +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/task/TerminalConnectLogAutoClearTask.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.orion.visor.module.asset.task; + +import com.orion.lang.utils.time.Dates; +import com.orion.visor.framework.common.utils.LockerUtils; +import com.orion.visor.module.asset.define.config.AppTerminalConnectLogAutoClearConfig; +import com.orion.visor.module.asset.entity.request.host.TerminalConnectLogClearRequest; +import com.orion.visor.module.asset.enums.TerminalConnectStatusEnum; +import com.orion.visor.module.asset.service.TerminalConnectLogService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.Date; + +/** + * 终端连接日志自动清理 + * + * @author Jiahang Li + * @version 1.0.0 + * @since 2024/4/24 23:50 + */ +@Slf4j +@Component +@ConditionalOnProperty(value = "app.auto-clear.terminal-connect-log.enabled", havingValue = "true") +public class TerminalConnectLogAutoClearTask { + + /** + * 分布式锁名称 + */ + private static final String LOCK_KEY = "clear:tcl:lock"; + + @Resource + private AppTerminalConnectLogAutoClearConfig appTerminalConnectLogAutoClearConfig; + + @Resource + private TerminalConnectLogService terminalConnectLogService; + + /** + * 清理 + */ + @Scheduled(cron = "0 10 3 * * ?") + public void clear() { + log.info("TerminalConnectLogAutoClearTask.clear start"); + // 获取锁并执行 + LockerUtils.tryLock(LOCK_KEY, this::doClear); + log.info("TerminalConnectLogAutoClearTask.clear finish"); + } + + /** + * 执行清理 + */ + private void doClear() { + // 删除的时间区间 + Date createLessEq = Dates.stream() + .subDay(appTerminalConnectLogAutoClearConfig.getKeepPeriod()) + .date(); + // 清理 + TerminalConnectLogClearRequest request = new TerminalConnectLogClearRequest(); + request.setCreateTimeLe(createLessEq); + request.setStatusList(TerminalConnectStatusEnum.FINISH_STATUS_LIST); + terminalConnectLogService.clearTerminalConnectLog(request); + } + +} diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/utils/SftpUtils.java b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/utils/SftpUtils.java index 3aa3af2b..394ae935 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/utils/SftpUtils.java +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/java/com/orion/visor/module/asset/utils/SftpUtils.java @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2023 - present Jiahang Li (visor.orionsec.cn ljh1553488six@139.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.orion.visor.module.asset.utils; import com.alibaba.fastjson.JSON; diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 211c787c..273b96d7 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -21,9 +21,9 @@ "sourceType": "com.orion.visor.module.asset.define.config.AppExecLogAutoClearConfig" }, { - "name": "app.auto-clear.host-connect-log", - "type": "com.orion.visor.module.asset.define.config.AppHostConnectLogAutoClearConfig", - "sourceType": "com.orion.visor.module.asset.define.config.AppHostConnectLogAutoClearConfig" + "name": "app.auto-clear.terminal-connect-log", + "type": "com.orion.visor.module.asset.define.config.AppTerminalConnectLogAutoClearConfig", + "sourceType": "com.orion.visor.module.asset.define.config.AppTerminalConnectLogAutoClearConfig" } ], "properties": [ @@ -74,14 +74,14 @@ "description": "批量执行日志自动清理 保留周期 (天)." }, { - "name": "app.auto-clear.host-connect-log.enabled", + "name": "app.auto-clear.terminal-connect-log.enabled", "type": "java.lang.Boolean", - "description": "开启 主机连接日志自动清理." + "description": "开启 终端连接日志自动清理." }, { - "name": "app.auto-clear.host-connect-log.keep-period", + "name": "app.auto-clear.terminal-connect-log.keep-period", "type": "java.lang.Integer", - "description": "主机连接日志自动清理 保留周期 (天)." + "description": "终端连接日志自动清理 保留周期 (天)." } ] } \ No newline at end of file diff --git a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/resources/mapper/HostConnectLogMapper.xml b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/resources/mapper/TerminalConnectLogMapper.xml similarity index 91% rename from orion-visor-module-asset/orion-visor-module-asset-service/src/main/resources/mapper/HostConnectLogMapper.xml rename to orion-visor-module-asset/orion-visor-module-asset-service/src/main/resources/mapper/TerminalConnectLogMapper.xml index 27303a24..7ebe3c0f 100644 --- a/orion-visor-module-asset/orion-visor-module-asset-service/src/main/resources/mapper/HostConnectLogMapper.xml +++ b/orion-visor-module-asset/orion-visor-module-asset-service/src/main/resources/mapper/TerminalConnectLogMapper.xml @@ -1,9 +1,9 @@ - + - + @@ -28,7 +28,7 @@