Casvisor
Getting started

Introduction

Casvisor is an open-source bastion host, also called a jump server. It sits between the people who run your systems and the systems themselves:

  • People sign in with accounts Casvisor keeps itself, optionally with a code from an authenticator app, or through Casdoor, so that the single sign-on, MFA, LDAP and social logins you already have apply here too.
  • They see only the servers, called assets, that a permission lets them reach, and connect from a browser tab over SSH, RDP, VNC or Telnet, or to MySQL, PostgreSQL, SQL Server, Oracle, Redis, MongoDB, ClickHouse and Dameng in a database console. Nothing is installed on their machine or on the server. What they cannot reach yet, they can ask for with an access request.
  • For SSH they can also use their own ssh, scp, sftp or VS Code Remote through Casvisor's SSH gateway, under the same permissions.
  • Casvisor fills in the server's account itself, so the password never reaches the browser or the SSH client. An asset can have several system accounts, and Casvisor can change their passwords on the servers on a schedule.
  • Each connection becomes a session that administrators see in the list, can watch live and cut off, and is recorded for playback in the browser. Commands run in SSH and Telnet sessions and statements run on databases are kept and can be blocked by command rules, files moved go into the operation log with every change made through the API, and a session ends by itself when its permission is taken away. All of it can be exported as CSV or Excel, summed up in reports to print or email, or forwarded to syslog.
  • Administrators can also scan the servers for pending system updates and install them, under Patches, and run commands, scripts and file transfers on many servers at once, under Jobs.

Casvisor is one Go binary with a React web UI, licensed under Apache-2.0, and has no enterprise edition.

How it fits together

  browser                     Casvisor                              servers
+-----------+   HTTPS    +--------------------------+   SSH     +--------------+
| workbench |----------->| sign-in                  |---------->| Linux        |
| tabs      | WebSocket  | permissions   (Casbin)   |   RDP     | Windows      |
| player    |            | sessions, recordings,    |---------->| desktops     |
+-----------+            | commands, operation log  |   VNC     | network gear |
                         | patches, jobs            |---------->| databases    |
+-----------+  SSH 2222  |                          |  Telnet   |              |
| ssh, scp, |----------->| SSH gateway              |---------->|              |
| VS Code   |            |                          | databases |              |
+-----------+            |                          |           |              |
                         |                          |---------->|              |
                         +--------------------------+           +--------------+
                            |                |
                     SQLite or MySQL    recordings/
  • All the protocols are handled in Go inside Casvisor: the browser talks to Casvisor over a WebSocket and Casvisor talks to the server. Nothing is installed on the servers.
  • The SSH gateway is an SSH server inside Casvisor, on its own port. People sign in to it with a public key, and it opens the SSH connection to the asset for them.
  • Network gateways reach assets in networks Casvisor cannot connect into, through an SSH jump host or an agent; see Network gateways.
  • Sign-in uses Casvisor's own accounts, or Casdoor when it is configured, in which case users and groups live in Casdoor.
  • Assets and their system accounts, permissions, access requests, sessions, commands, SSH keys, patches, jobs and the operation log live in Casvisor's database, SQLite by default or MySQL. Recordings are files in recordings/.

What it is for

You want toRead
Give a contractor SSH to two servers for a week, and nothing elsePermissions
Let the whole ops group reach every Linux server, but only from the office networkPermissions
Stop people from copying files or text out of a Windows desktopPermissions, Protocols
Keep the root password of a server away from the people who use it, and change it every monthSystem accounts
Let people use their own ssh, scp and VS Code Remote, without handing out server keysSSH gateway
Let someone put files on a server, but not take any offFile transfer
See who is connected right now, watch what they do, and kick someone offSessions
Play back what someone did on a server last weekRecordings
Know which commands were run on a server, and stop rm -rf / before it runsCommands and command rules
Find out who changed a permission and whenOperation logs
Give someone production access for an afternoon, when they ask and an administrator agreesAccess requests
Let people query a production database without its password, and stop DROP TABLEDatabases
Give developers kubectl to a cluster, only in their own namespace, with every request recordedKubernetes
Run the same command, or copy a file, on a hundred serversJobs
Send the audit trail to a SIEMExport and syslog
Find and install the pending updates of every serverPatch management

What it does not do yet

A few things a bastion host may be expected to have are still on the roadmap, the rest of RDP first among them. The pages of this manual describe what is in the current code, and say so where a setting has no effect yet.

Next

Run it with Docker. If you use Casdoor, connect it afterwards.

Edit on GitHub

On this page