Giter VIP home page Giter VIP logo

gangway's Introduction

需求

所有的用户操作日志要保留在数据库中 每个用户登录堡垒机后,只需要选择具体要访问的设置,就连接上了,不需要再输入目标机器的访问密码 允许用户对不同的目标设备有不同的访问权限,例如:

  • 对10.0.2.34 有mysql 用户的权限
  • 对192.168.3.22 有root用户的权限
  • 对172.33.24.55 没任何权限

分组管理,即可以对设置进行分组,允许用户访问某组机器,但对组里的不同机器依然有不同的访问权限 

实现思路

  • 使用paramiko模块来远程连接ssh;
  • 使用数据库保存跳板机的用户数据和服务器的对应关系,还保存了操作日志;

难点

  • 实现模拟xshell的功能;

执行

请在Linux环境下执行bin/gangway.py

部署环境

  1. Python3.5版本以上;
  2. 在Linux上运行;
  3. 根据/doc/跳板机-场景用户.png(用户和主机关系),配置好虚拟机;
  4. 数据库采用MySQL5.5及以上,初始化脚本/init_db/gangway_db_init.sql

运行截图

看doc下的测试截图.jpg

文档

数据库设计图 /doc/gangway_physical.pdf

gangway's People

Contributors

alys114 avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar

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.