Coder Social home page Coder Social logo

getway / diting Goto Github PK

View Code? Open in Web Editor NEW
166.0 9.0 67.0 6.86 MB

运维面板,运维导航,统一账号平台,运维统一平台,LDAP管理平台

License: GNU General Public License v2.0

Python 98.92% CSS 1.01% Shell 0.07%
ldap-manager authentication dashboard jumpserver ldap

diting's Introduction

Diting 谛听系统

目标:让运维更简单

目前在jumpserver的框架下,开始项目(还有一版融合了最新版的jumpserver - jumpserver-ldap-manager 有堡垒机功能和谛听的功能,欢迎体验。

1 当前功能:

  • 用户管理-用户增删改查
  • 运维导航-快速链接、导航面板管理-增删改查
  • 统一账户体系,支持LDAP登录、本地用户登录,开启LDAP的情况下,用户改密码实时同步到LDAP,新增用户直接可以添加到LDAP账户体系中
  • LDAP账户修改一些属性同步到LDAP

2 待添加功能

  • 导航权限分配
  • 支持接入开源没有账户体系的系统
  • 其他

欢迎有兴趣的同学一起开发,这里感谢Jumpserver这么好的项目,借用了框架。

运维导航

导航列表

导航详情

用户管理

3 安装说明

需要基本环境Python3.6 项目路径: {install path} 首先配置config.py 主要配置数据库地址

3.1 系统环境设置

# CentOS 7
$ setenforce 0  # 可以设置配置文件永久关闭
$ systemctl stop iptables.service
$ systemctl stop firewalld.service

# 修改字符集,否则可能报 input/output error的问题,因为日志里打印了中文
$ localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8
$ export LC_ALL=zh_CN.UTF-8
$ echo 'LANG=zh_CN.UTF-8' > /etc/locale.conf

# CentOS6
$ setenforce 0
$ service iptables stop

# 修改字符集,否则可能报 input/output error的问题,因为日志里打印了中文
$ localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8
$ export LC_ALL=zh_CN.UTF-8
$ echo 'LANG=zh_CN.UTF-8' > /etc/sysconfig/i18n

3.2 准备 Python3 和 Python 虚拟环境

$ yum groupinstall "Development tools" -y
#安装系统依赖
$ yum -y install wget sqlite-devel xz gcc automake zlib-devel openssl-devel epel-release git python-ldap openldap-devel python-devel

#安装python3.6
$ wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz
$ tar xvf Python-3.6.1.tar.xz  && cd Python-3.6.1
$ ./configure && make && make install
# 这里必须执行编译安装,否则在安装 Python 库依赖时会有麻烦...

# 使用虚拟环境
$ /usr/local/bin/python3.6 -m venv /opt/venv3
$ source /opt/venv3/bin/activate
#注意:当出现(venv3)时候,表示虚拟环境生成成功
$ (venv3) [root@xxx xxx]#

3.3 安装谛听(diting)

#进入到安装目录/opt
$ cd /opt
$ git clone https://github.com/getway/diting.git
$ cd diting
# 安装依赖
$ pip install -r requirements/requirements.txt
#配置数据库以及redis  自行更改config.py

# 数据库迁移(初始化数据库)
$ cd /opt/diting/utils
$ python3 ../apps/manage.py makemigrations common users perms navis likes
$ bash make_migrations.sh
#导入数据
$ cd /opt/diting/apps
$ python manage.py loaddata fixtures/init.json

3.4 服务启动

$ cd /opt/diting
直接启动:
$ ./dt start
#或后台启动
$ ./dt start -d

# 访问
http://127.0.0.1:8080
用户名 : admin
密码: admin

3.5 nginx配置

生产环境,请把配置中DEBUG改为False

#nginx配置文件
server {
	listen 80;
	listen 443 ssl http2;
	server_name 域名; #配置自己的域名

	#https配置,没有的可以忽略
	#ssl on;
	#ssl_certificate ***.cer;  #替换为自己的路径
	#ssl_certificate_key ***.key; #替换为自己的路径
	#ssl_session_timeout 5m;
	#ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
	#ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
	#ssl_prefer_server_ciphers on;

	index index.html index.htm index.php;

	proxy_set_header X-Real-IP $remote_addr;
	proxy_set_header Host $host;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

	location /media/ {
		root /opt/diting/data/;
	}

	location /static/ {
		root /opt/diting/data/;
	}

	location / {
		proxy_pass http://localhost:8080;
	}

}

diting's People

Contributors

getway avatar xiaomaoxue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

diting's Issues

管理端提供修改 LDAP 用户密码

作者你好,

能否提供管理端能修改 Ldap 用户的密码?因为正常的使用中,Ldap 用户会忘记密码,需要手动重置用户密码?

同时,在新建用户的时候,能否选择给 Ldap 用户手动填入一个初始化密码?比如,企业新同事入职,都未必会有邮箱,而是先初始化一个默认密码(或者 123456),然后用户登录后才进行修改?

谢谢。

这个导航 idea 不错

这个运维需求很不错,求继续更新,提几点建议:

1,导航菜单能分组,比如用户可以按 {环境/项目/分类} 自定义取名分组
2,ldap 用户管理也具备组管理(可以是本地组)
3,增加权限控制,能给不同的 用户/组 ,分配不同的 导航菜单/导航菜单组
4,能全局搜索想要的 导航菜单

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.