mirror of https://github.com/jumpserver/jumpserver
commit
19c63a0b19
20
README.md
20
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。
|
- 多应用支持: 数据库,Windows远程应用,Kubernetes。
|
||||||
|
|
||||||
|
### UI 展示
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 在线体验
|
||||||
|
|
||||||
|
- 环境地址:<https://demo.jumpserver.org/>
|
||||||
|
- 用户名:test
|
||||||
|
- 密码:test01
|
||||||
|
|
||||||
|
| :warning: 注意 |
|
||||||
|
| :--------------------------- |
|
||||||
|
| 该环境仅作体验目的使用,我们会定时清理、重置数据! |
|
||||||
|
| 请勿修改体验环境用户的密码! |
|
||||||
|
| 请勿在环境中添加业务生产环境地址、用户名密码等敏感信息! |
|
||||||
|
|
||||||
### 快速开始
|
### 快速开始
|
||||||
|
|
||||||
|
@ -45,6 +61,8 @@ JumpServer 采纳分布式架构,支持多机房跨区域部署,支持横向
|
||||||
- [Luna](https://github.com/jumpserver/luna) JumpServer Web Terminal 项目
|
- [Luna](https://github.com/jumpserver/luna) JumpServer Web Terminal 项目
|
||||||
- [KoKo](https://github.com/jumpserver/koko) JumpServer 字符协议 Connector 项目,替代原来 Python 版本的 [Coco](https://github.com/jumpserver/coco)
|
- [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/)
|
- [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 安装包 项目
|
||||||
|
|
||||||
### 社区
|
### 社区
|
||||||
|
|
||||||
|
@ -108,7 +126,7 @@ JumpServer是一款安全产品,请参考 [基本安全建议](https://docs.ju
|
||||||
|
|
||||||
### License & Copyright
|
### 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
|
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
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ If you find a security problem, please contact us directly:
|
||||||
- 400-052-0755
|
- 400-052-0755
|
||||||
|
|
||||||
### License & Copyright
|
### 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
|
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
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ class AssetSerializer(BulkOrgResourceModelSerializer):
|
||||||
"""
|
"""
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Asset
|
model = Asset
|
||||||
fields_mini = ['id', 'hostname', 'ip']
|
fields_mini = ['id', 'hostname', 'ip', 'platform', 'protocols']
|
||||||
fields_small = fields_mini + [
|
fields_small = fields_mini + [
|
||||||
'protocol', 'port', 'protocols', 'is_active', 'public_ip',
|
'protocol', 'port', 'protocols', 'is_active', 'public_ip',
|
||||||
'number', 'vendor', 'model', 'sn', 'cpu_model', 'cpu_count',
|
'number', 'vendor', 'model', 'sn', 'cpu_model', 'cpu_count',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import threading
|
import threading
|
||||||
import json
|
import json
|
||||||
|
from redis.exceptions import ConnectionError
|
||||||
from channels.generic.websocket import JsonWebsocketConsumer
|
from channels.generic.websocket import JsonWebsocketConsumer
|
||||||
|
|
||||||
from common.utils import get_logger
|
from common.utils import get_logger
|
||||||
|
@ -12,13 +12,14 @@ logger = get_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class SiteMsgWebsocket(JsonWebsocketConsumer):
|
class SiteMsgWebsocket(JsonWebsocketConsumer):
|
||||||
disconnected = False
|
|
||||||
refresh_every_seconds = 10
|
refresh_every_seconds = 10
|
||||||
|
chan = None
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
user = self.scope["user"]
|
user = self.scope["user"]
|
||||||
if user.is_authenticated:
|
if user.is_authenticated:
|
||||||
self.accept()
|
self.accept()
|
||||||
|
self.chan = new_site_msg_chan.subscribe()
|
||||||
|
|
||||||
thread = threading.Thread(target=self.unread_site_msg_count)
|
thread = threading.Thread(target=self.unread_site_msg_count)
|
||||||
thread.start()
|
thread.start()
|
||||||
|
@ -48,9 +49,8 @@ class SiteMsgWebsocket(JsonWebsocketConsumer):
|
||||||
user_id = str(self.scope["user"].id)
|
user_id = str(self.scope["user"].id)
|
||||||
self.send_unread_msg_count()
|
self.send_unread_msg_count()
|
||||||
|
|
||||||
while not self.disconnected:
|
try:
|
||||||
subscribe = new_site_msg_chan.subscribe()
|
for message in self.chan.listen():
|
||||||
for message in subscribe.listen():
|
|
||||||
if message['type'] != 'message':
|
if message['type'] != 'message':
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
|
@ -64,7 +64,10 @@ class SiteMsgWebsocket(JsonWebsocketConsumer):
|
||||||
self.send_unread_msg_count()
|
self.send_unread_msg_count()
|
||||||
except json.JSONDecoder as e:
|
except json.JSONDecoder as e:
|
||||||
logger.debug('Decode json error: ', e)
|
logger.debug('Decode json error: ', e)
|
||||||
|
except ConnectionError:
|
||||||
|
logger.debug('Redis chan closed')
|
||||||
|
|
||||||
def disconnect(self, close_code):
|
def disconnect(self, close_code):
|
||||||
self.disconnected = True
|
if self.chan is not None:
|
||||||
|
self.chan.close()
|
||||||
self.close()
|
self.close()
|
||||||
|
|
|
@ -127,7 +127,7 @@ class UserSerializer(CommonBulkSerializerMixin, serializers.ModelSerializer):
|
||||||
def validate_password(self, password):
|
def validate_password(self, password):
|
||||||
from ..utils import check_password_rules
|
from ..utils import check_password_rules
|
||||||
password_strategy = self.initial_data.get('password_strategy')
|
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
|
return
|
||||||
if self.instance and not password:
|
if self.instance and not password:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/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
|
exit 0
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue