From 10c2935df4e01a6c3c0a0998477edfaecae3709c Mon Sep 17 00:00:00 2001 From: xinwen Date: Fri, 20 Aug 2021 09:52:36 +0800 Subject: [PATCH 1/6] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=20500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/serializers/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/users/serializers/user.py b/apps/users/serializers/user.py index a9d55375d..d4abf8d34 100644 --- a/apps/users/serializers/user.py +++ b/apps/users/serializers/user.py @@ -127,7 +127,7 @@ class UserSerializer(CommonBulkSerializerMixin, serializers.ModelSerializer): def validate_password(self, password): from ..utils import check_password_rules password_strategy = self.initial_data.get('password_strategy') - if self.instance is None and password_strategy != self.PasswordStrategy.custom: + if self.instance is None and password_strategy != PasswordStrategy.custom: # 创建用户,使用邮件设置密码 return if self.instance and not password: From cbe0483b46d8296b17162ce73c523f9261e59dbc Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 20 Aug 2021 11:24:11 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20=E8=B5=84=E4=BA=A7mini=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=9B=9Eplatform=E3=80=81protocols?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/serializers/asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/assets/serializers/asset.py b/apps/assets/serializers/asset.py index aeef79152..f387df071 100644 --- a/apps/assets/serializers/asset.py +++ b/apps/assets/serializers/asset.py @@ -71,7 +71,7 @@ class AssetSerializer(BulkOrgResourceModelSerializer): """ class Meta: model = Asset - fields_mini = ['id', 'hostname', 'ip'] + fields_mini = ['id', 'hostname', 'ip', 'platform', 'protocols'] fields_small = fields_mini + [ 'protocol', 'port', 'protocols', 'is_active', 'public_ip', 'number', 'vendor', 'model', 'sn', 'cpu_model', 'cpu_count', From c1579f5fe45ee129ceec4320732e3531046e8cc7 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 19 Aug 2021 17:52:17 +0800 Subject: [PATCH 3/6] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5805573bf..3b842faaf 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,8 @@ JumpServer 采纳分布式架构,支持多机房跨区域部署,支持横向 - [Luna](https://github.com/jumpserver/luna) JumpServer Web Terminal 项目 - [KoKo](https://github.com/jumpserver/koko) JumpServer 字符协议 Connector 项目,替代原来 Python 版本的 [Coco](https://github.com/jumpserver/coco) - [Lion](https://github.com/jumpserver/lion-release) JumpServer 图形协议 Connector 项目,依赖 [Apache Guacamole](https://guacamole.apache.org/) +- [Clients](https://github.com/jumpserver/clients) JumpServer 客户端 项目 +- [Installer](https://github.com/jumpserver/installer) JumpServer 安装包 项目 ### 社区 From 628012a7ee75f9bb572de59e06bafe0484b679bc Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 20 Aug 2021 14:31:52 +0800 Subject: [PATCH 4/6] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E5=81=A5?= =?UTF-8?q?=E5=BA=B7=E7=9B=91=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/check_celery.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/check_celery.sh b/utils/check_celery.sh index dce8edb45..4673e0918 100644 --- a/utils/check_celery.sh +++ b/utils/check_celery.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [[ "$(ps axu | grep 'celery' | grep -v 'grep' | grep -cv 'defunct')" == "5" ]];then +if [[ "$(ps axu | grep 'celery' | grep -v 'grep' | grep -cv 'defunct')" -gt "2" ]];then exit 0 else exit 1 From 9f6e26c4dbdfb6fbaeec6f1baf474ea39a45d0a3 Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 20 Aug 2021 15:20:35 +0800 Subject: [PATCH 5/6] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dws=E5=BC=95?= =?UTF-8?q?=E8=B5=B7=E7=9A=84redis=E8=BF=9E=E6=8E=A5=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/notifications/ws.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/notifications/ws.py b/apps/notifications/ws.py index cbbb25d2d..45cbb6d00 100644 --- a/apps/notifications/ws.py +++ b/apps/notifications/ws.py @@ -1,6 +1,6 @@ import threading import json - +from redis.exceptions import ConnectionError from channels.generic.websocket import JsonWebsocketConsumer from common.utils import get_logger @@ -12,13 +12,14 @@ logger = get_logger(__name__) class SiteMsgWebsocket(JsonWebsocketConsumer): - disconnected = False refresh_every_seconds = 10 + chan = None def connect(self): user = self.scope["user"] if user.is_authenticated: self.accept() + self.chan = new_site_msg_chan.subscribe() thread = threading.Thread(target=self.unread_site_msg_count) thread.start() @@ -48,9 +49,8 @@ class SiteMsgWebsocket(JsonWebsocketConsumer): user_id = str(self.scope["user"].id) self.send_unread_msg_count() - while not self.disconnected: - subscribe = new_site_msg_chan.subscribe() - for message in subscribe.listen(): + try: + for message in self.chan.listen(): if message['type'] != 'message': continue try: @@ -64,7 +64,10 @@ class SiteMsgWebsocket(JsonWebsocketConsumer): self.send_unread_msg_count() except json.JSONDecoder as e: logger.debug('Decode json error: ', e) + except ConnectionError: + logger.debug('Redis chan closed') def disconnect(self, close_code): - self.disconnected = True + if self.chan is not None: + self.chan.close() self.close() From 1fdc558ef72ea82b5e891522f5884bf1ef39b989 Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Fri, 20 Aug 2021 16:47:49 +0800 Subject: [PATCH 6/6] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9readme=20(#6707)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 修改readme * feat: 修改readme * feat: 修改readme * feat: 修改readme Co-authored-by: Bai --- README.md | 18 +++++++++++++++++- README_EN.md | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3b842faaf..bc6dfdd2f 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ JumpServer 采纳分布式架构,支持多机房跨区域部署,支持横向 改变世界,从一点点开始 ... +> 如需进一步了解 JumpServer 开源项目,推荐阅读 [JumpServer 的初心和使命](https://mp.weixin.qq.com/s/S6q_2rP_9MwaVwyqLQnXzA) ### 特色优势 @@ -32,6 +33,21 @@ JumpServer 采纳分布式架构,支持多机房跨区域部署,支持横向 - 多租户: 一套系统,多个子公司和部门同时使用; - 多应用支持: 数据库,Windows远程应用,Kubernetes。 +### UI 展示 + +![UI展示](https://www.jumpserver.org/images/screenshot/1.png) + +### 在线体验 + +- 环境地址: +- 用户名:test +- 密码:test01 + +| :warning: 注意 | +| :--------------------------- | +| 该环境仅作体验目的使用,我们会定时清理、重置数据! | +| 请勿修改体验环境用户的密码! | +| 请勿在环境中添加业务生产环境地址、用户名密码等敏感信息! | ### 快速开始 @@ -110,7 +126,7 @@ JumpServer是一款安全产品,请参考 [基本安全建议](https://docs.ju ### License & Copyright -Copyright (c) 2014-2020 飞致云 FIT2CLOUD, All rights reserved. +Copyright (c) 2014-2021 飞致云 FIT2CLOUD, All rights reserved. Licensed under The GNU General Public License version 2 (GPLv2) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/README_EN.md b/README_EN.md index f1706a3b9..b9dbbff3a 100644 --- a/README_EN.md +++ b/README_EN.md @@ -85,7 +85,7 @@ If you find a security problem, please contact us directly: - 400-052-0755 ### License & Copyright -Copyright (c) 2014-2019 Beijing Duizhan Tech, Inc., All rights reserved. +Copyright (c) 2014-2021 Beijing Duizhan Tech, Inc., All rights reserved. Licensed under The GNU General Public License version 2 (GPLv2) (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at