mirror of https://github.com/jumpserver/jumpserver
ibuler
9 years ago
14 changed files with 14 additions and 137 deletions
@ -1,36 +0,0 @@
|
||||
# coding: utf8 |
||||
|
||||
Jumpserver开发者文档 |
||||
|
||||
开发规范: |
||||
1. 遵守PE8规范 1) 命名规范 2) 导入模块规范 3) 空行规范 4) 长度规范 |
||||
2. 缩进统一4个空格 |
||||
3. 变量命名明了易懂多个单词下划线隔开 |
||||
4. 注释到位 |
||||
|
||||
|
||||
框架说明: |
||||
1. 项目名称 Jumpserver |
||||
2. APP: |
||||
juser 用户管理 |
||||
jasset 资产管理(设备管理) |
||||
jpermission 授权管理 |
||||
jlog 日志管理 |
||||
3. connect.py 用户登录入口程序 |
||||
4. logs 日志保存目录 |
||||
5. jumpserver.conf 配置文件 |
||||
6. docs 文档目录 |
||||
7. static 静态文件目录 |
||||
8. templates 模板目录 |
||||
|
||||
|
||||
connect.py逻辑说明: |
||||
用户登录系统,运行该脚本,p调用get_user_host函数查看有权限的服务器ip |
||||
输入部分IP,verify_connect匹配该部分ip,如果是匹配到多个,就显示ip |
||||
匹配到0了就显示没有权限或者主机, |
||||
匹配到1个则继续 |
||||
查询该服务器是否支持ldap 如果是,获得ldap用户密码登陆 |
||||
如果否,查询授权表,查看该服务器授权的系统用户,并返回对应账号密码,登陆 |
||||
connect函数是登陆函数,采用paramiko 使用channel登陆,posix_shell 来完成交互,并记录日志 |
||||
signal模块来完成窗口改变导致的tty大小随之改变 |
||||
PyCrypt是对称加密类 |
@ -1,9 +0,0 @@
|
||||
- model: juser.user |
||||
pk: 5000 |
||||
fields: |
||||
username: admin |
||||
name: admin |
||||
password: pbkdf2_sha256$20000$jBIDGPB2j5JT$orxqGgzzjzykColYm1BswPjgHOiERjZkcgkuVIkD2Hc= |
||||
email: admin@jumpserver.org |
||||
role: SU |
||||
is_active: 1 |
@ -1,17 +0,0 @@
|
||||
#sphinx-me==0.3 |
||||
django==1.6 |
||||
pycrypto==2.6.1 |
||||
paramiko==1.16.0 |
||||
ecdsa==0.13 |
||||
MySQL-python==1.2.5 |
||||
#django-uuidfield==0.5.0 |
||||
psutil==3.3.0 |
||||
xlsxwriter==0.7.7 |
||||
xlrd==0.9.4 |
||||
django-bootstrap-form==3.2 |
||||
tornado==4.3 |
||||
ansible==1.9.4 |
||||
pyinotify==0.9.6 |
||||
passlib==1.6.5 |
||||
argparse==1.4.0 |
||||
django_crontab==0.6.0 |
@ -1,13 +0,0 @@
|
||||
#!/bin/bash |
||||
|
||||
if [ "$USER" == "admin" ] || [ "$USER" == "root" ] || [ "$USER" == "" ];then |
||||
echo "" |
||||
else |
||||
python /opt/jumpserver/connect.py |
||||
if [ $USER == 'guanghongwei' ];then |
||||
echo |
||||
else |
||||
exit 3 |
||||
echo |
||||
fi |
||||
fi |
Loading…
Reference in new issue