Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release final horse #7060

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2349846
minor: 3.29.0 版本日志更新
normal-wls Jul 28, 2023
7477ed1
bugfix: 修复快速执行脚本插件国际化问题
normal-wls Jul 28, 2023
4602fe9
bugfix: 修复多环境用户登录 500 问题
normal-wls Aug 1, 2023
fb26f86
minor: release V3.29.1
normal-wls Aug 1, 2023
4a19f66
optimization: 轻应用找不到执行方案入口问题优化
ywywZhou Aug 9, 2023
695b103
bugfix: 修复 ip 选择器 topo 过滤所有节点都失效时选中所有 ip 问题
normal-wls Aug 9, 2023
0fe7f7f
bugfix: 修复job失败时提取变量取不到step_ip_result_list的bug
hanshuaikang Aug 8, 2023
efed02f
minor: release V3.29.2
normal-wls Aug 9, 2023
c1b065d
optimization: 轻应用模式下画布默认进入预览模式
ywywZhou Aug 9, 2023
567b9e3
bugfix: 轻应用初始化支持使用默认执行方案
ywywZhou Aug 9, 2023
d298e2c
bugfix: 修复job作业跳转id的问题
hanshuaikang Aug 4, 2023
5087d32
bugfix: 修复job 执行方案 默认版本跳转连接的问题
hanshuaikang Aug 15, 2023
7e06d18
bugfix: 修复job 执行方案 默认版本跳转连接的问题,处理job host 下划线
hanshuaikang Aug 16, 2023
d537de1
minor: release 3.29.3
hanshuaikang Aug 16, 2023
98124a7
bugfix: 节点详情节点树算法问题修复
ywywZhou Aug 30, 2023
e82326a
minor: release V3.29.4
normal-wls Aug 30, 2023
a2ad300
feature: 支持gse2.0单独作为开关查询
hanshuaikang Aug 31, 2023
b474b55
minor: 修改拼写问题
hanshuaikang Aug 31, 2023
04ba157
minor: 更新bkui-form版本支持密码框只读态展示
luofann Aug 5, 2023
f9b1925
bugfix: 修复ipv6环境下ip过滤器失效的问题
hanshuaikang Sep 5, 2023
ceb4e54
minor: release 3.29.5
hanshuaikang Sep 5, 2023
d2aa6de
feature: 国密改造
ZhuoZhuoCrayon Aug 3, 2023
b985013
feature: 标准插件前端国密改造 (#6965)
luofann Aug 4, 2023
f15b603
optimization: password组件支持texarea模式
luofann Aug 14, 2023
76ac804
feature: 节点管理「新建任务」插件优化
ZhuoZhuoCrayon Aug 10, 2023
cda7a21
minor: review fix
ZhuoZhuoCrayon Aug 10, 2023
b37e29d
feature: 国密改造
ZhuoZhuoCrayon Aug 17, 2023
ae545a8
feature: 国密改造
ZhuoZhuoCrayon Aug 17, 2023
6279fdb
bugfix: 修复password textarea模式加密不正确的问题
luofann Aug 18, 2023
bcb8650
feature: 国密改造
ZhuoZhuoCrayon Aug 18, 2023
3f51587
sprintfix: 变量规范 & 修复节点管理重装操作不显示密码的问题
ZhuoZhuoCrayon Aug 21, 2023
4f77fd0
feature: 启用开发框架内置数据加密
ZhuoZhuoCrayon Aug 22, 2023
f0c1e9d
sprintfix: 修复非法 b64 导致脱敏模式串被误转为空串的问题
ZhuoZhuoCrayon Aug 23, 2023
0f6d91a
sprintfix: 兼容使用密码变量的场景
ZhuoZhuoCrayon Aug 23, 2023
a448a87
minor: sm2加密方式生成的密文增加前缀
luofann Aug 24, 2023
58feabe
bugfix: 修复国密相关的体验问题
luofann Aug 29, 2023
5987361
minor: release V3.30.0
ZhuoZhuoCrayon Aug 30, 2023
9ef27c3
sprintfix: 国密变量适配 PaaSV2 场景
ZhuoZhuoCrayon Sep 4, 2023
38c507f
bugfix: 分批查询gse的agent状态
hanshuaikang Sep 6, 2023
248e903
minor: release 3.29.6
hanshuaikang Sep 7, 2023
0b55c0f
minor: master merge to horse
normal-wls Sep 11, 2023
0f0284c
minor: 国密分支合入 horse
normal-wls Sep 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ is_use_celery: True
author: 蓝鲸智云
introduction: 标准运维是通过一套成熟稳定的任务调度引擎,把在多系统间的工作整合到一个流程,助力运维实现跨系统调度自动化的SaaS应用。
introduction_en: SOPS is a SaaS application that utilizes a set of mature and stable task scheduling engines to help realize cross-system scheduling automation, and integrates the work among multiple systems into a single process.
version: 3.29.0
version: 3.30.0
category: 运维工具
language_support: 中文
desktop:
Expand Down
2 changes: 1 addition & 1 deletion app_desc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spec_version: 2
app_version: "3.29.0"
app_version: "3.30.0"
app:
region: default
bk_app_code: bk_sops
Expand Down
48 changes: 45 additions & 3 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from urllib.parse import urlparse

from bamboo_engine.config import Settings as BambooSettings
from bkcrypto import constants as bkcrypto_constants
from bkcrypto.asymmetric.options import RSAAsymmetricOptions
from blueapps.conf.default_settings import * # noqa
from blueapps.conf.log import get_logging_config_dict
from blueapps.opentelemetry.utils import inject_logging_trace_info
Expand Down Expand Up @@ -155,7 +157,9 @@

ENABLE_IPV6 = env.ENABLE_IPV6
# paasv3 和 开启了ipv6 才会尝试加载 BK_API_URL_TMPL 这个变量
if env.IS_PAAS_V3 or ENABLE_IPV6:
ENABLE_GSE_V2 = env.ENABLE_GSE_V2

if env.IS_PAAS_V3 or ENABLE_IPV6 or ENABLE_GSE_V2:
BK_API_URL_TMPL = env.BK_APIGW_URL_TMPL

if env.IS_PAAS_V3:
Expand Down Expand Up @@ -207,7 +211,7 @@
# mako模板中:<script src="/a.js?v=${ STATIC_VERSION }"></script>
# 如果静态资源修改了以后,上线前改这个版本号即可

STATIC_VERSION = "3.29.0"
STATIC_VERSION = "3.30.0"
DEPLOY_DATETIME = datetime.datetime.now().strftime("%Y%m%d%H%M%S")

STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
Expand Down Expand Up @@ -672,7 +676,6 @@ def monitor_report_config():

from bk_monitor_report import MonitorReporter # noqa
from bk_monitor_report.contrib.celery import MonitorReportStep # noqa

from blueapps.core.celery import celery_app # noqa

reporter = MonitorReporter(
Expand Down Expand Up @@ -787,5 +790,44 @@ def check_engine_admin_permission(request, *args, **kwargs):

PIPELINE_ENGINE_ADMIN_API_PERMISSION = "config.default.check_engine_admin_permission"


BKCRYPTO = {
"ASYMMETRIC_CIPHERS": {
"default": {
"get_key_config": "gcloud.utils.crypto.get_default_asymmetric_key_config",
"cipher_options": {
bkcrypto_constants.AsymmetricCipherType.RSA.value: RSAAsymmetricOptions(
padding=bkcrypto_constants.RSACipherPadding.PKCS1_v1_5
)
},
},
},
"SYMMETRIC_CIPHERS": {"default": {"get_key_config": "gcloud.utils.crypto.get_default_symmetric_key_config"}},
}

# 启用框架内置数据加密
BLUEAPPS_ENABLE_DB_ENCRYPTION = True
# 复用已有的 default 对称加密实例
BKCRYPTO["SYMMETRIC_CIPHERS"]["blueapps"] = BKCRYPTO["SYMMETRIC_CIPHERS"]["default"]


# 加密
if env.BKPAAS_BK_CRYPTO_TYPE == "SHANGMI":
BKCRYPTO_ASYMMETRIC_CIPHER_TYPE = bkcrypto_constants.AsymmetricCipherType.SM2.value
BKCRYPTO.update(
{
"ASYMMETRIC_CIPHER_TYPE": BKCRYPTO_ASYMMETRIC_CIPHER_TYPE,
"SYMMETRIC_CIPHER_TYPE": bkcrypto_constants.SymmetricCipherType.SM4.value,
}
)
else:
BKCRYPTO_ASYMMETRIC_CIPHER_TYPE = bkcrypto_constants.AsymmetricCipherType.RSA.value
BKCRYPTO.update(
{
"ASYMMETRIC_CIPHER_TYPE": BKCRYPTO_ASYMMETRIC_CIPHER_TYPE,
"SYMMETRIC_CIPHER_TYPE": bkcrypto_constants.SymmetricCipherType.AES.value,
}
)

# 任务列表过滤失败任务最大天数
TASK_LIST_STATUS_FILTER_DAYS = env.BKPAAS_TASK_LIST_STATUS_FILTER_DAYS
23 changes: 22 additions & 1 deletion config/sites/community/ver_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
LOah9mmRwLJdcfa3Js+jw2lOCmxzqauYZHVHg/hH7g==
-----END RSA PRIVATE KEY-----
"""
RSA_PRIV_KEY = base64.b64decode(env.RSA_PRIV_KEY).decode("utf-8") if env.RSA_PRIV_KEY else DEFAULT_RSA_PRIV_KEY

# PUB_KEY for frontend, which can not use three quotes
DEFAULT_RSA_PUB_KEY = (
Expand All @@ -49,8 +48,30 @@
+ "-----END PUBLIC KEY-----"
)

RSA_PRIV_KEY = base64.b64decode(env.RSA_PRIV_KEY).decode("utf-8") if env.RSA_PRIV_KEY else DEFAULT_RSA_PRIV_KEY
RSA_PUB_KEY = base64.b64decode(env.RSA_PUB_KEY).decode("utf-8") if env.RSA_PUB_KEY else DEFAULT_RSA_PUB_KEY


DEFAULT_SM2_PRIV_KEY = """
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEICI+zMQDiQ5/xXmnGxGqLSD++Cp+I601cIFLKRd2yrGBoAoGCCqBHM9V
AYItoUQDQgAE95+i3TAfODAzb9QhJmyUmxH/HocisveqkrafHJ25NO/uCtkb2yXH
vrZcCDmoxeO+z5vp88jN/ulVsl9qEqm6vQ==
-----END EC PRIVATE KEY-----
"""


DEFAULT_SM2_PUB_KEY = (
"-----BEGIN PUBLIC KEY-----\\n"
+ "MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAE95+i3TAfODAzb9QhJmyUmxH/Hoci\\n"
+ "sveqkrafHJ25NO/uCtkb2yXHvrZcCDmoxeO+z5vp88jN/ulVsl9qEqm6vQ==\\n"
+ "-----END PUBLIC KEY-----"
)


SM2_PRIV_KEY = base64.b64decode(env.RSA_PRIV_KEY).decode("utf-8") if env.RSA_PRIV_KEY else DEFAULT_RSA_PRIV_KEY
SM2_PUB_KEY = base64.b64decode(env.RSA_PUB_KEY).decode("utf-8") if env.RSA_PUB_KEY else DEFAULT_SM2_PUB_KEY

# APIGW Auth
APIGW_APP_CODE_KEY = "bk_app_code"
APIGW_USER_USERNAME_KEY = "bk_username"
Expand Down
25 changes: 24 additions & 1 deletion config/sites/enterprise/ver_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
T8ow3nMSbvx5X28wOjbk04tmfM/kVqcVhFWhDHjHZzlt
-----END RSA PRIVATE KEY-----
"""
RSA_PRIV_KEY = base64.b64decode(env.RSA_PRIV_KEY).decode("utf-8") if env.RSA_PRIV_KEY else DEFAULT_RSA_PRIV_KEY

# PUB_KEY for frontend, which can not use three quotes
DEFAULT_RSA_PUB_KEY = (
Expand All @@ -48,7 +47,31 @@
+ "iymoAVK67gfTOTvckQIDAQAB\\n"
+ "-----END PUBLIC KEY-----"
)

RSA_PUB_KEY = base64.b64decode(env.RSA_PUB_KEY).decode("utf-8") if env.RSA_PUB_KEY else DEFAULT_RSA_PUB_KEY
RSA_PRIV_KEY = base64.b64decode(env.RSA_PRIV_KEY).decode("utf-8") if env.RSA_PRIV_KEY else DEFAULT_RSA_PRIV_KEY


DEFAULT_SM2_PRIV_KEY = """
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIIn5SYKHr3+m/XyC/ECzDJYuwUoTQHDUkIueKFXTjhSBoAoGCCqBHM9V
AYItoUQDQgAEYxBE08d8yEEK2+DZ7F5RsNrUvCZ578lkYsXFDC1fW2IcRecNz8LG
ZWSZGFfgYMeK1f3fIuYBAJVuna/V3FP4tA==
-----END EC PRIVATE KEY-----
"""


DEFAULT_SM2_PUB_KEY = (
"-----BEGIN PUBLIC KEY-----\\n"
+ "MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEYxBE08d8yEEK2+DZ7F5RsNrUvCZ5\\n"
+ "78lkYsXFDC1fW2IcRecNz8LGZWSZGFfgYMeK1f3fIuYBAJVuna/V3FP4tA==\\n"
+ "-----END PUBLIC KEY-----"
)


SM2_PRIV_KEY = base64.b64decode(env.SM2_PRIV_KEY).decode("utf-8") if env.SM2_PRIV_KEY else DEFAULT_SM2_PRIV_KEY
SM2_PUB_KEY = base64.b64decode(env.SM2_PUB_KEY).decode("utf-8") if env.SM2_PUB_KEY else DEFAULT_SM2_PUB_KEY


# APIGW Auth
APIGW_APP_CODE_KEY = "bk_app_code"
Expand Down
2 changes: 2 additions & 0 deletions docs/develop/tag_usage_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ ip 选择器,支持静态 ip 或动态 ip 的单选和多选。

- `pubKey`: 加密公钥
- `disabled`:设置是否禁用组件
- `canUseVar`: 是否可以使用全局变量,默认为true
- `textareaMode`: 手动输入密码时,表单类型为textarea,默认为false
- `value`:加密后的密码值

**方法**
Expand Down
3 changes: 3 additions & 0 deletions en_docs/develop/tag_usage_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,10 @@ Password input box.

**Attributes**

- `pubKey`: crypto public key
- `disabled`: set whether this component is disabled.
- `canUseVar`: whether global variables can be used, which defaults to true
- `textareaMode`: When entering a password manually, the form type is textarea and the default is false
- `value`: the encrypted password value

**Methods**
Expand Down
10 changes: 10 additions & 0 deletions env.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
ENABLE_SWAGGER_UI = os.getenv("BKAPP_ENABLE_SWAGGER_UI", False)

ENABLE_IPV6 = False if os.getenv("BKAPP_ENABLE_IPV6") is None else True
ENABLE_GSE_V2 = int(os.getenv("BKAPP_ENABLE_GSE_V2", 0)) == 1

# 流程最高嵌套层数
TEMPLATE_MAX_RECURSIVE_NUMBER = int(os.getenv("BKAPP_TEMPLATE_MAX_RECURSIVE_NUMBER", 200))
Expand All @@ -108,5 +109,14 @@
# 获取 PaaS 注入的蓝鲸域名
BKPAAS_BK_DOMAIN = os.getenv("BKPAAS_BK_DOMAIN", "") or os.getenv("BK_DOMAIN", "")


# 获取加密类型
BKPAAS_BK_CRYPTO_TYPE = (
os.getenv("BKPAAS_BK_CRYPTO_TYPE", "")
or os.getenv("BKAPP_BK_CRYPTO_TYPE", "")
or os.getenv("BK_CRYPTO_TYPE")
or "CLASSIC"
)

# 默认六个月
BKPAAS_TASK_LIST_STATUS_FILTER_DAYS = int(os.getenv("BKPAAS_TASK_LIST_STATUS_FILTER_DAYS", 180))
2 changes: 2 additions & 0 deletions env_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@
# RSA KEYS, 保存的是密钥的base64加密形式, 使用base64.b64encode(KEY.encode("utf-8"))进行处理后保存为环境变量
RSA_PRIV_KEY = os.getenv("BKAPP_RSA_PRIV_KEY", None)
RSA_PUB_KEY = os.getenv("BKAPP_RSA_PUB_KEY", None)
SM2_PRIV_KEY = os.getenv("BKAPP_SM2_PRIV_KEY", None)
SM2_PUB_KEY = os.getenv("BKAPP_SM2_PUB_KEY", None)

# 单业务下最大周期任务数量
PERIODIC_TASK_PROJECT_MAX_NUMBER = int(os.getenv("BKAPP_PERIODIC_TASK_PROJECT_MAX_NUMBER", 50))
Expand Down
2 changes: 2 additions & 0 deletions env_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@
# RSA KEYS, 保存的是密钥的base64加密形式, 使用base64.b64encode(KEY.encode("utf-8"))进行处理后保存为环境变量
RSA_PRIV_KEY = os.getenv("BKAPP_RSA_PRIV_KEY", None)
RSA_PUB_KEY = os.getenv("BKAPP_RSA_PUB_KEY", None)
SM2_PRIV_KEY = os.getenv("BKAPP_SM2_PRIV_KEY", None)
SM2_PUB_KEY = os.getenv("BKAPP_SM2_PUB_KEY", None)

# 单业务下最大周期任务数量
PERIODIC_TASK_PROJECT_MAX_NUMBER = int(os.getenv("BKAPP_PERIODIC_TASK_PROJECT_MAX_NUMBER", 50))
Expand Down
3 changes: 2 additions & 1 deletion frontend/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"license": "ISC",
"dependencies": {
"@blueking/bkcharts": "^2.0.11-alpha.5",
"@blueking/bkui-form": "0.0.35",
"@blueking/crypto-js-sdk": "0.0.5",
"@blueking/user-selector": "^1.0.5-beta.2",
"@blueking/bkui-form": "0.0.11",
"@vue/babel-preset-jsx": "^1.3.0",
"ajv": "^6.10.2",
"art-template": "^4.13.0",
Expand Down
3 changes: 3 additions & 0 deletions frontend/desktop/src/assets/html/index-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
// 是否开启导入 V1 模板的入口
var IMPORT_V1_FLAG = Number('0');
var RSA_PUB_KEY = '';
var ASYMMETRIC_CIPHER_TYPE = '';
var ASYMMETRIC_PUBLIC_KEY = '';
var ASYMMETRIC_PREFIX = '';
var APP_CODE = 'bk_sops';
var FILE_UPLOAD_ENTRY = '/package/upload/';
var MAX_NODE_EXECUTE_TIMEOUT = 6000;
Expand Down
3 changes: 3 additions & 0 deletions frontend/desktop/src/assets/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
// 是否开启导入 V1 模板的入口
var IMPORT_V1_FLAG ={{import_v1_flag}};
var RSA_PUB_KEY = '{{RSA_PUB_KEY}}';
var ASYMMETRIC_CIPHER_TYPE = '{{ASYMMETRIC_CIPHER_TYPE}}';
var ASYMMETRIC_PUBLIC_KEY = '{{ASYMMETRIC_PUBLIC_KEY}}';
var ASYMMETRIC_PREFIX = '{{ASYMMETRIC_PREFIX}}';
var APP_CODE = '{{APP_CODE}}';
var FILE_UPLOAD_ENTRY = '{{FILE_UPLOAD_ENTRY}}';
var MEMBER_SELECTOR_DATA_HOST = '{{MEMBER_SELECTOR_DATA_HOST}}';
Expand Down
Loading
Loading