diff --git a/dbm-services/.gitignore b/dbm-services/.gitignore index ec33037082..2b417554a4 100644 --- a/dbm-services/.gitignore +++ b/dbm-services/.gitignore @@ -1,3 +1,5 @@ .codecc .idea -.vscode \ No newline at end of file +.vscode + +pkg/ diff --git a/dbm-services/mysql/db-priv/service/admin_password.go b/dbm-services/mysql/db-priv/service/admin_password.go index f9371bb9fd..3fb919e61b 100644 --- a/dbm-services/mysql/db-priv/service/admin_password.go +++ b/dbm-services/mysql/db-priv/service/admin_password.go @@ -197,12 +197,7 @@ func (m *GetAdminUserPasswordPara) GetMysqlAdminPassword() ([]*TbPasswords, int, where := fmt.Sprintf(" username='%s' and component='%s' and lock_until is not null", m.UserName, m.Component) var filter []string for _, item := range m.Instances { - if item.BkCloudId == nil { - return passwords, 0, errno.CloudIdRequired - } - // 目标实例 - filter = append(filter, fmt.Sprintf("(ip='%s' and port=%d and bk_cloud_id=%d)", - item.Ip, item.Port, *item.BkCloudId)) + filter = append(filter, fmt.Sprintf("(ip='%s' and port=%d)", item.Ip, item.Port)) } filters := strings.Join(filter, " or ") if filters != "" { @@ -260,6 +255,7 @@ func (m *ModifyAdminUserPasswordPara) ModifyMysqlAdminPassword() (BatchResult, e if m.Async && m.Range == "randmize_expired" { errCheck = m.NeedToBeRandomized() if errCheck != nil { + slog.Error("msg", "NeedToBeRandomized", errCheck) return batch, errCheck } } else if m.Async && m.Range == "randmize_daily" { @@ -303,9 +299,11 @@ func (m *ModifyAdminUserPasswordPara) ModifyMysqlAdminPassword() (BatchResult, e for _, cluster := range m.Clusters { if cluster.BkCloudId == nil { + slog.Error("msg", errno.CloudIdRequired) return batch, errno.CloudIdRequired } if cluster.ClusterType == nil { + slog.Error("msg", errno.ClusterTypeIsEmpty) return batch, errno.ClusterTypeIsEmpty } var psw, encrypt string @@ -393,7 +391,7 @@ func (m *ModifyAdminUserPasswordPara) ModifyMysqlAdminPassword() (BatchResult, e result := DB.Self.Exec(sql) if result.Error != nil { notOK.Addresses = append(notOK.Addresses, address) - slog.Error("msg", "excute sql error", result.Error) + slog.Error("msg", "sql", sql, "excute sql error", result.Error) AddError(&errMsg, hostPort, result.Error) continue } @@ -420,6 +418,7 @@ func (m *ModifyAdminUserPasswordPara) ModifyMysqlAdminPassword() (BatchResult, e batch = BatchResult{Success: success.resources, Fail: fail.resources} if len(errMsg.errs) > 0 { errOuter := errno.ModifyUserPasswordFail.Add("\n" + strings.Join(errMsg.errs, "\n")) + slog.Error("msg", "modify error", errOuter) return batch, errOuter } return batch, nil diff --git a/dbm-services/mysql/db-priv/service/admin_password_object.go b/dbm-services/mysql/db-priv/service/admin_password_object.go index 0d340dcbcb..224b4caada 100644 --- a/dbm-services/mysql/db-priv/service/admin_password_object.go +++ b/dbm-services/mysql/db-priv/service/admin_password_object.go @@ -43,13 +43,13 @@ type UserInComponent struct { // GetAdminUserPasswordPara 函数的入参 type GetAdminUserPasswordPara struct { - Instances []Address `json:"instances"` - UserName string `json:"username"` - Component string `json:"component"` - Limit *int `json:"limit"` - Offset *int `json:"offset"` - BeginTime string `json:"begin_time"` - EndTime string `json:"end_time"` + Instances []IpPort `json:"instances"` + UserName string `json:"username"` + Component string `json:"component"` + Limit *int `json:"limit"` + Offset *int `json:"offset"` + BeginTime string `json:"begin_time"` + EndTime string `json:"end_time"` } type TbPasswords struct { diff --git a/dbm-ui/backend/configuration/handlers/password.py b/dbm-ui/backend/configuration/handlers/password.py index 092d3d6826..8154368302 100644 --- a/dbm-ui/backend/configuration/handlers/password.py +++ b/dbm-ui/backend/configuration/handlers/password.py @@ -22,6 +22,7 @@ from backend.core.encrypt.handlers import AsymmetricHandler from backend.db_meta.enums import ClusterType, InstanceInnerRole, InstanceRole, TenDBClusterSpiderRole from backend.db_periodic_task.models import DBPeriodicTask +from backend.db_services.ipchooser.query.resource import ResourceQueryHelper from backend.flow.consts import MySQLPasswordRole @@ -65,8 +66,8 @@ def query_mysql_admin_password( instance_list = [] try: for address in instances: - bk_cloud_id, ip, port = address.split(":") - instance_list.append({"bk_cloud_id": int(bk_cloud_id), "ip": ip, "port": int(port)}) + ip, port = address.split(":") + instance_list.append({"ip": ip, "port": int(port)}) except (IndexError, ValueError): raise PasswordPolicyBaseException(_("请保证查询的实例输入格式合法")) @@ -80,8 +81,10 @@ def query_mysql_admin_password( mysql_admin_password_data = MySQLPrivManagerApi.get_mysql_admin_password(params=filters) mysql_admin_password_data["results"] = mysql_admin_password_data.pop("items") + cloud_info = ResourceQueryHelper.search_cc_cloud(get_cache=True) for data in mysql_admin_password_data["results"]: data["password"] = base64.b64decode(data["password"]).decode("utf-8") + data["bk_cloud_name"] = cloud_info[str(data["bk_cloud_id"])]["bk_cloud_name"] return mysql_admin_password_data diff --git a/dbm-ui/backend/configuration/serializers.py b/dbm-ui/backend/configuration/serializers.py index 2b046d7c07..57312a22bc 100644 --- a/dbm-ui/backend/configuration/serializers.py +++ b/dbm-ui/backend/configuration/serializers.py @@ -17,10 +17,11 @@ from backend.bk_web.serializers import AuditedSerializer from backend.configuration import mock_data from backend.configuration.constants import DEFAULT_SETTINGS, DBType -from backend.configuration.mock_data import BIZ_SETTINGS_DATA, PASSWORD_POLICY +from backend.configuration.mock_data import BIZ_SETTINGS_DATA, PASSWORD_POLICY, VERIFY_PASSWORD_DATA from backend.configuration.models.function_controller import FunctionController from backend.configuration.models.ip_whitelist import IPWhitelist from backend.configuration.models.system import BizSettings, SystemSettings +from backend.db_meta.enums import ClusterType from backend.db_services.mysql.permission.constants import AccountType @@ -93,7 +94,7 @@ class GetMySQLAdminPasswordSerializer(serializers.Serializer): begin_time = serializers.CharField(help_text=_("开始时间"), required=False) end_time = serializers.CharField(help_text=_("结束时间"), required=False) - instances = serializers.CharField(help_text=_("过滤的实例列表(通过,分割,实例格式为--cloud_id:ip:port)"), required=False) + instances = serializers.CharField(help_text=_("过滤的实例列表(通过,分割,实例格式为--ip:port)"), required=False) class GetMySQLAdminPasswordResponseSerializer(serializers.Serializer): diff --git a/dbm-ui/backend/configuration/tasks/password.py b/dbm-ui/backend/configuration/tasks/password.py index e3d78e359c..1cfe09d388 100644 --- a/dbm-ui/backend/configuration/tasks/password.py +++ b/dbm-ui/backend/configuration/tasks/password.py @@ -57,9 +57,7 @@ def get_mysql_instance(cluster_id: int): def _get_instances(_role, _instances): instance_info = { "role": _role, - "addresses": [ - {"ip": instance.machine.ip, "port": instance.port, "id": instance.id} for instance in _instances - ], + "addresses": [{"ip": instance.machine.ip, "port": instance.port} for instance in _instances], } return instance_info diff --git a/dbm-ui/backend/db_meta/api/cluster/tendbha/decommission.py b/dbm-ui/backend/db_meta/api/cluster/tendbha/decommission.py index ab344256b5..c00722ef22 100644 --- a/dbm-ui/backend/db_meta/api/cluster/tendbha/decommission.py +++ b/dbm-ui/backend/db_meta/api/cluster/tendbha/decommission.py @@ -16,8 +16,8 @@ from backend.components import MySQLPrivManagerApi from backend.db_meta.exceptions import DBMetaException from backend.db_meta.models import Cluster, ClusterEntry, StorageInstanceTuple -from backend.flow.consts import MySQLPrivComponent, UserName from backend.db_services.mysql.open_area.models import TendbOpenAreaConfig +from backend.flow.consts import MySQLPrivComponent, UserName from backend.flow.utils.cc_manage import CcManage logger = logging.getLogger("root") diff --git a/dbm-ui/backend/flow/engine/controller/mysql.py b/dbm-ui/backend/flow/engine/controller/mysql.py index a03aad9b79..bdfb660901 100644 --- a/dbm-ui/backend/flow/engine/controller/mysql.py +++ b/dbm-ui/backend/flow/engine/controller/mysql.py @@ -539,6 +539,7 @@ def mysql_ha_standardize_scene(self): def mysql_randomize_password(self): flow = MySQLRandomizePassword(root_id=self.root_id, data=self.ticket_data) flow.mysql_randomize_password() + def mysql_open_area_scene(self): flow = MysqlOpenAreaFlow(root_id=self.root_id, data=self.ticket_data) flow.mysql_open_area_flow() diff --git a/dbm-ui/backend/flow/plugins/components/collections/spider/switch_remote_slave_routing.py b/dbm-ui/backend/flow/plugins/components/collections/spider/switch_remote_slave_routing.py index 520ef94bee..806a058b26 100644 --- a/dbm-ui/backend/flow/plugins/components/collections/spider/switch_remote_slave_routing.py +++ b/dbm-ui/backend/flow/plugins/components/collections/spider/switch_remote_slave_routing.py @@ -11,7 +11,7 @@ from backend.components import DRSApi, MySQLPrivManagerApi from backend.constants import IP_PORT_DIVIDER -from backend.core.encrypt.handlers import RSAHandler +from backend.core.encrypt.handlers import AsymmetricHandler from backend.db_meta.models import Cluster from backend.flow.consts import TDBCTL_USER from backend.flow.plugins.components.collections.common.base_service import BaseService @@ -27,8 +27,8 @@ def _create_tdbctl_user(self, cluster: Cluster, ctl_primary: str, new_ip: str, n 再新的实例对中控primary授权 """ # 添加临时账号 - encrypt_switch_pwd = RSAHandler.encrypt_password( - MySQLPrivManagerApi.fetch_public_key(), tdbctl_pass, salt=None + encrypt_switch_pwd = AsymmetricHandler.encrypt_with_pubkey( + pubkey=MySQLPrivManagerApi.fetch_public_key(), content=tdbctl_pass ) MySQLPrivManagerApi.add_priv_without_account_rule( diff --git a/dbm-ui/backend/flow/utils/cloud/cloud_act_payload.py b/dbm-ui/backend/flow/utils/cloud/cloud_act_payload.py index 9d174f3ffe..228170292b 100644 --- a/dbm-ui/backend/flow/utils/cloud/cloud_act_payload.py +++ b/dbm-ui/backend/flow/utils/cloud/cloud_act_payload.py @@ -19,7 +19,8 @@ from backend.configuration.models import SystemSettings from backend.core.encrypt.constants import AsymmetricCipherConfigType from backend.core.encrypt.handlers import AsymmetricHandler -from backend.db_proxy.constants import NGINX_PUSH_TARGET_PATH, ExtensionType +from backend.db_proxy.constants import NGINX_PUSH_TARGET_PATH, ExtensionServiceStatus, ExtensionType +from backend.db_proxy.models import DBExtension from backend.flow.consts import ( CLOUD_NGINX_DBM_DEFAULT_PORT, CLOUD_NGINX_MANAGE_DEFAULT_HOST, @@ -189,7 +190,7 @@ def get_cloud_nginx_url(bk_cloud_id: int): @staticmethod def get_dns_nameservers(bk_cloud_id): - dns_rows = DBExtension.get_extension_in_cloud(bk_cloud_id=bk_cloud_id, extension_type=CloudServiceName.DNS) + dns_rows = DBExtension.get_extension_in_cloud(bk_cloud_id=bk_cloud_id, extension_type=ExtensionType.DNS) if not dns_rows: raise ServiceDoesNotApply(_("DNS服务未部署,请在DNS服务部署后再进行该服务的部署")) dns_nameservers = ["nameserver {}".format(dns.details["ip"]) for dns in dns_rows] diff --git a/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py b/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py index ade953e6ec..04abe18625 100644 --- a/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py +++ b/dbm-ui/backend/flow/utils/mysql/mysql_act_playload.py @@ -1843,11 +1843,9 @@ def get_open_area_dump_schema_payload(self, **kwargs): @return: """ fileserver = {} - rsa = RSAHandler.get_or_generate_rsa_in_db(RSAConfigType.PROXYPASS.value) - db_cloud_token = RSAHandler.encrypt_password( - rsa.rsa_public_key.content, f"{self.bk_cloud_id}_dbactuator_token" + db_cloud_token = AsymmetricHandler.encrypt( + name=AsymmetricCipherConfigType.PROXYPASS.value, content=f"{self.bk_cloud_id}_dbactuator_token" ) - nginx_ip = DBCloudProxy.objects.filter(bk_cloud_id=self.bk_cloud_id).last().internal_address bkrepo_url = f"http://{nginx_ip}/apis/proxypass" if self.bk_cloud_id else settings.BKREPO_ENDPOINT_URL @@ -1912,9 +1910,8 @@ def get_open_area_dump_data_payload(self, **kwargs): @return: """ fileserver = {} - rsa = RSAHandler.get_or_generate_rsa_in_db(RSAConfigType.PROXYPASS.value) - db_cloud_token = RSAHandler.encrypt_password( - rsa.rsa_public_key.content, f"{self.bk_cloud_id}_dbactuator_token" + db_cloud_token = AsymmetricHandler.encrypt( + name=AsymmetricCipherConfigType.PROXYPASS.value, content=f"{self.bk_cloud_id}_dbactuator_token" ) nginx_ip = DBCloudProxy.objects.filter(bk_cloud_id=self.bk_cloud_id).last().internal_address diff --git a/dbm-ui/poetry.lock b/dbm-ui/poetry.lock index a95f70b6e9..75cac7b5f9 100644 --- a/dbm-ui/poetry.lock +++ b/dbm-ui/poetry.lock @@ -28,9 +28,9 @@ pyyaml = ">=5.4.1" urllib3 = ">=1.25.3" [package.extras] -cryptography = ["cryptography (>=3.1.1)", "pyjwt (>=1.6.4)"] -demo = ["Django (>=1.11.1)", "PyMySQL (>=1.0.2,<2.0.0)", "django-environ (>=0.8.1)", "pyjwt (>=1.6.4)"] -django = ["Django (>=1.11.1)", "pyjwt (>=1.6.4)"] +cryptography = ["pyjwt (>=1.6.4)", "cryptography (>=3.1.1)"] +django = ["pyjwt (>=1.6.4)", "Django (>=1.11.1)"] +demo = ["pyjwt (>=1.6.4)", "django-environ (>=0.8.1)", "Django (>=1.11.1)", "PyMySQL (>=1.0.2,<2.0.0)"] kubernetes = ["kubernetes"] [[package]] @@ -61,7 +61,7 @@ python-versions = ">=3.6" typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [package.extras] -tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] +tests = ["pytest", "pytest-asyncio", "mypy (>=0.800)"] [[package]] name = "astunparse" @@ -91,10 +91,10 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "sphinx", "sphinx-notfound-page", "zope.interface"] -docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six", "zope.interface"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "mypy", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "six"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] +docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] [[package]] name = "backcall" @@ -161,7 +161,21 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" [package.extras] -opentelemetry = ["opentelemetry-api (>=1.7.1,<1.13.0)", "opentelemetry-exporter-otlp (>=1.7.1,<1.13.0)", "opentelemetry-sdk (>=1.7.1,<1.13.0)", "protobuf (>=3.19.5)"] +opentelemetry = ["protobuf (>=3.19.5)", "opentelemetry-api (>=1.7.1,<1.13.0)", "opentelemetry-sdk (>=1.7.1,<1.13.0)", "opentelemetry-exporter-otlp (>=1.7.1,<1.13.0)"] + +[[package]] +name = "bk-crypto-python-sdk" +version = "1.1.1" +description = "bk-crypto-python-sdk is a lightweight cryptography toolkit for Python applications based on Cryptodome / tongsuopy and other encryption libraries." +category = "main" +optional = false +python-versions = ">=3.6.2,<3.11" + +[package.dependencies] +dacite = ">=1.8.1,<2.0.0" +pycryptodomex = ">=3.18.0,<4.0.0" +tongsuopy-crayon = ">=1.0.2b5,<2.0.0" +wrapt = ">=1.15.0,<2.0.0" [[package]] name = "bk-iam" @@ -302,7 +316,7 @@ requests = ">=2.22.0,<3.0.0" whitenoise = ">=3.3.0,<=5.2.0" [package.extras] -opentelemetry = ["django-prometheus (>=2.1.0,<3.0.0)", "opentelemetry-api (>=1.6.2,<2.0.0)", "opentelemetry-exporter-jaeger (>=1.6.2,<2.0.0)", "opentelemetry-exporter-jaeger-proto-grpc (>=1.6.2,<2.0.0)", "opentelemetry-exporter-jaeger-thrift (>=1.6.2,<2.0.0)", "opentelemetry-exporter-otlp (>=1.6.2,<2.0.0)", "opentelemetry-instrumentation (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-celery (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-dbapi (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-django (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-logging (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-redis (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-requests (>=0.25b2,<1.0.0)", "opentelemetry-sdk (>=1.6.2,<2.0.0)", "prometheus-client (>=0.9.0,<1.0.0)"] +opentelemetry = ["opentelemetry-api (>=1.6.2,<2.0.0)", "opentelemetry-sdk (>=1.6.2,<2.0.0)", "opentelemetry-exporter-otlp (>=1.6.2,<2.0.0)", "opentelemetry-exporter-jaeger (>=1.6.2,<2.0.0)", "opentelemetry-exporter-jaeger-proto-grpc (>=1.6.2,<2.0.0)", "opentelemetry-exporter-jaeger-thrift (>=1.6.2,<2.0.0)", "opentelemetry-instrumentation (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-celery (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-django (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-dbapi (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-redis (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-logging (>=0.25b2,<1.0.0)", "opentelemetry-instrumentation-requests (>=0.25b2,<1.0.0)", "prometheus-client (>=0.9.0,<1.0.0)", "django-prometheus (>=2.1.0,<3.0.0)"] [[package]] name = "boto3" @@ -361,7 +375,7 @@ vine = "1.3.0" [package.extras] arangodb = ["pyArango (>=1.3.2)"] auth = ["cryptography"] -azureblockblob = ["azure-common (==1.1.5)", "azure-storage (==0.36.0)", "azure-storage-common (==1.1.0)"] +azureblockblob = ["azure-storage (==0.36.0)", "azure-common (==1.1.5)", "azure-storage-common (==1.1.0)"] brotli = ["brotli (>=1.0.0)", "brotlipy (>=0.7.0)"] cassandra = ["cassandra-driver"] consul = ["python-consul"] @@ -494,10 +508,10 @@ six = ">=1.4.1" [package.extras] docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] -docstest = ["doc8", "pyenchant (>=1.6.11)", "sphinxcontrib-spelling (>=4.0.1)", "twine (>=1.12.0)"] +docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] ssh = ["bcrypt (>=3.1.5)"] -test = ["hypothesis (>=1.11.4,!=3.79.2)", "iso8601", "pretend", "pytest (>=3.6.0,!=3.9.0,!=3.9.1,!=3.9.2)", "pytz"] +test = ["pytest (>=3.6.0,!=3.9.0,!=3.9.1,!=3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] [[package]] name = "curlify" @@ -618,7 +632,7 @@ optional = false python-versions = ">=3.4,<4" [package.extras] -develop = ["coverage[toml] (>=5.0a4)", "furo (>=2021.8.17b43,<2021.9.0)", "pytest (>=4.6.11)", "sphinx (>=3.5.0)", "sphinx-notfound-page"] +develop = ["coverage[toml] (>=5.0a4)", "pytest (>=4.6.11)", "furo (>=2021.8.17b43,<2021.9.0)", "sphinx (>=3.5.0)", "sphinx-notfound-page"] docs = ["furo (>=2021.8.17b43,<2021.9.0)", "sphinx (>=3.5.0)", "sphinx-notfound-page"] testing = ["coverage[toml] (>=5.0a4)", "pytest (>=4.6.11)"] @@ -783,9 +797,9 @@ greenlet = {version = ">=0.4.14", markers = "platform_python_implementation == \ dnspython = ["dnspython (>=1.16.0)", "idna"] docs = ["repoze.sphinx.autointerface", "sphinxcontrib-programoutput"] events = ["zope.event", "zope.interface"] -monitor = ["psutil (==5.6.3)", "psutil (>=5.6.1)"] -recommended = ["cffi (>=1.12.2)", "dnspython (>=1.16.0)", "idna", "psutil (==5.6.3)", "psutil (>=5.6.1)", "zope.event", "zope.interface"] -test = ["cffi (>=1.12.2)", "coverage (<5.0)", "coveralls (>=1.7.0)", "dnspython (>=1.16.0)", "futures", "idna", "mock", "objgraph", "psutil (==5.6.3)", "psutil (>=5.6.1)", "requests", "zope.event", "zope.interface"] +monitor = ["psutil (>=5.6.1)", "psutil (==5.6.3)"] +recommended = ["dnspython (>=1.16.0)", "idna", "zope.event", "zope.interface", "cffi (>=1.12.2)", "psutil (>=5.6.1)", "psutil (==5.6.3)"] +test = ["dnspython (>=1.16.0)", "idna", "zope.event", "zope.interface", "requests", "objgraph", "cffi (>=1.12.2)", "psutil (>=5.6.1)", "psutil (==5.6.3)", "futures", "mock", "coverage (<5.0)", "coveralls (>=1.7.0)"] [[package]] name = "greenlet" @@ -852,9 +866,9 @@ typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pep517", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy", "pytest-perf (>=0.9.2)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "importlib-resources" @@ -868,8 +882,8 @@ python-versions = ">=3.6" zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} [package.extras] -docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] -testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] name = "inflection" @@ -921,10 +935,10 @@ doc = ["Sphinx (>=1.3)"] kernel = ["ipykernel"] nbconvert = ["nbconvert"] nbformat = ["nbformat"] -notebook = ["ipywidgets", "notebook"] +notebook = ["notebook", "ipywidgets"] parallel = ["ipyparallel"] qtconsole = ["qtconsole"] -test = ["ipykernel", "nbformat", "nose (>=0.10.1)", "numpy (>=1.14)", "pygments", "requests", "testpath"] +test = ["nose (>=0.10.1)", "requests", "testpath", "pygments", "nbformat", "ipykernel", "numpy (>=1.14)"] [[package]] name = "ipython-genutils" @@ -943,9 +957,9 @@ optional = false python-versions = ">=3.6,<4.0" [package.extras] -colors = ["colorama (>=0.4.3,<0.5.0)"] pipfile_deprecated_finder = ["pipreqs", "requirementslib"] -requirements_deprecated_finder = ["pip-api", "pipreqs"] +requirements_deprecated_finder = ["pipreqs", "pip-api"] +colors = ["colorama (>=0.4.3,<0.5.0)"] [[package]] name = "itypes" @@ -1082,7 +1096,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" six = "*" [package.extras] -build = ["blurb", "twine", "wheel"] +build = ["twine", "wheel", "blurb"] docs = ["sphinx"] test = ["pytest", "pytest-cov"] @@ -1441,7 +1455,7 @@ coverage = ">=4.4" pytest = ">=4.6" [package.extras] -testing = ["fields", "hunter", "process-tests (==2.0.2)", "pytest-xdist", "six", "virtualenv"] +testing = ["fields", "hunter", "process-tests (==2.0.2)", "six", "pytest-xdist", "virtualenv"] [[package]] name = "pytest-cover" @@ -1591,7 +1605,7 @@ PySocks = {version = ">=1.5.6,<1.5.7 || >1.5.7", optional = true, markers = "ext urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26" [package.extras] -security = ["cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)"] +security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)"] socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] [[package]] @@ -1700,7 +1714,7 @@ ipython-genutils = "*" six = "*" [package.extras] -test = ["mock", "pytest"] +test = ["pytest", "mock"] [[package]] name = "typed-ast" @@ -1744,7 +1758,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" [package.extras] brotli = ["brotlipy (>=0.6.0)"] -secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] @@ -1760,7 +1774,7 @@ decorator = ">=3.4.0" six = ">=1.4.0" [package.extras] -test = ["flake8 (>=2.4.0)", "isort (>=4.2.2)", "pytest (>=2.2.3)"] +test = ["pytest (>=2.2.3)", "flake8 (>=2.4.0)", "isort (>=4.2.2)"] [[package]] name = "vine" @@ -1817,7 +1831,7 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] -dev = ["coverage", "pallets-sphinx-themes", "pytest", "pytest-timeout", "sphinx", "sphinx-issues", "tox"] +dev = ["pytest", "pytest-timeout", "coverage", "tox", "sphinx", "pallets-sphinx-themes", "sphinx-issues"] watchdog = ["watchdog"] [[package]] @@ -1856,13 +1870,13 @@ optional = false python-versions = ">=3.6" [package.extras] -docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] -testing = ["func-timeout", "jaraco.itertools", "pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-flake8", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [metadata] lock-version = "1.1" python-versions = ">=3.6.2,<3.7" -content-hash = "c833f2a22b41547cb2f523bdcb7851ceeea1b5e7adf297eb732a9938b9d8a576" +content-hash = "2386fcba5febd74c6d7608b2e45553ae74d36a90be739d8c3de8bb652bf1ce3f" [metadata.files] amqp = [ @@ -1916,6 +1930,10 @@ bk-audit = [ {file = "bk-audit-1.1.0rc0.tar.gz", hash = "sha256:d0dd804f06758aed72aa8810081e0395e0cee258ffe70bcd3b3a91a3a09ed273"}, {file = "bk_audit-1.1.0rc0-py3-none-any.whl", hash = "sha256:fcbf8f586ef3f7051a157fab77c2982ba1dbbd7472a076e0fa4231f874c16188"}, ] +bk-crypto-python-sdk = [ + {file = "bk-crypto-python-sdk-1.1.1.tar.gz", hash = "sha256:dee920ca58d402cc203a4cc704993685c626a801ff3c60942ec7c412d6b194b2"}, + {file = "bk_crypto_python_sdk-1.1.1-py3-none-any.whl", hash = "sha256:042f1651a927cbf3e3cae2b3c2688b8151d572032e480bff7aa9d96405632c0a"}, +] bk-iam = [ {file = "bk-iam-1.2.0.tar.gz", hash = "sha256:26559daf5a92bcd2d6ff2a2b34bd09c2854693f20f8637d6d5ac7d6e28c92400"}, {file = "bk_iam-1.2.0-py2.py3-none-any.whl", hash = "sha256:76d60ae7b911d787afeb375a51df137daa63822cfb08495720c4d89a6e161108"}, diff --git a/dbm-ui/pyproject.toml b/dbm-ui/pyproject.toml index 2856971e73..6843f7fb06 100644 --- a/dbm-ui/pyproject.toml +++ b/dbm-ui/pyproject.toml @@ -54,6 +54,7 @@ mistune = "0.8.4" bkoauth = "0.1.0" apigw-manager = {extras = ["cryptography"], version = "^2.0.0"} bk-audit = "1.1.0rc0" +bk-crypto-python-sdk = "^1.1.1" [tool.poetry.dev-dependencies] diff --git a/helm-charts/bk-dbm/Chart.yaml b/helm-charts/bk-dbm/Chart.yaml index 3132ca39d2..5136668d38 100644 --- a/helm-charts/bk-dbm/Chart.yaml +++ b/helm-charts/bk-dbm/Chart.yaml @@ -70,5 +70,5 @@ dependencies: description: A Helm chart for bkdbm name: bk-dbm type: application -version: 1.2.0-alpha-password.45 -appVersion: 1.2.0-alpha-password.45 +version: 1.2.0-alpha-password.47 +appVersion: 1.2.0-alpha-password.47 diff --git a/helm-charts/bk-dbm/charts/dbm/Chart.yaml b/helm-charts/bk-dbm/charts/dbm/Chart.yaml index 3baa3321e3..f17457679d 100644 --- a/helm-charts/bk-dbm/charts/dbm/Chart.yaml +++ b/helm-charts/bk-dbm/charts/dbm/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.2.0-alpha.388 +appVersion: 1.2.0-alpha.394 description: A Helm chart for dbm name: dbm type: application diff --git a/helm-charts/bk-dbm/charts/dbpriv/Chart.yaml b/helm-charts/bk-dbm/charts/dbpriv/Chart.yaml index 5f02d8acbe..36443e350d 100644 --- a/helm-charts/bk-dbm/charts/dbpriv/Chart.yaml +++ b/helm-charts/bk-dbm/charts/dbpriv/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.28 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: 0.0.1-alpha.152 +appVersion: 0.0.1-alpha.155