Skip to content
/ gate Public

Secure Gate - SSH proxy for securing connection within your company

Notifications You must be signed in to change notification settings

gusmin/gate

Repository files navigation

Gate

GoDoc Build Status Maintainability Built with Mage


Gate is an essential part of the opensource project Secure Gate. It is an interactive CLI used as an interface between users and agents in order to secure access permissions within your machines stack.

For more informations about Secure Gate check out our other repositories:


💿 Installation

From a release

  1. Get a release of the project. There are various way to achieve this.

    • Get it from a releases tarball

    • Package it directly from the repository:

      $ go get -u github.com/magefile/mage
      $ mage release:linux
  2. Set up the configuration.

    cp the config.json.template as config.json and edit it according to your needs.

    Setting Description Value
    backend_uri URI of your running backend server string
    ssh_user user used for SSH connection string
    agent_authentication_token Bearer token used for authentication on agent's side string
    language Language of the application string
    db_path Path of your database string
  3. Install the Gate

    Go to the previously created release directory and run the installation script.

    $ cd release/securegate-gate-{version}
    $ ./install

    This installation script will do EVERYTHING for you and set up the Gate

    • It creates a new user: secure

    • Installs the binary securegate-gate in /usr/bin/

    • Installs your custom configuration

    • Makes a special directory to store your logs in /var/log/securegate/gate/

    • Installs the available translations in case you need to change the langage later on.

      Available languages are English, French and Korean

    • Set the default shell of the user secure to /usr/bin/securegate-gate

With Mage

  1. If you don't have Mage already installed install it

    $ go get -u github.com/magefile/mage
  2. Install the Gate by running this command in your terminal

    $ mage install
    

🌌 Welcome in the Gate

Congrats you finished to install the Gate ! Now let's get started ! 🎉

⚠️ Note: Make sure an instance of our Backend is running somewhere and that your configuration file is tied to its URI.

In the first place you'll have to sign up with on your Secure Gate account.

The credentials are the ones you used during your sign in on the Frontend.

Commands

help                ## Global help about commands
me                  ## Display informations related to the user
list                ## List all accessible nodes by the user
connect             ## Open SSH connection to a node
logout              ## Terminate the session current session
exit                ## Close the shell

📚 Help

Provides global informations about commands in the Gate

Note: Althought every commands have their own help option.

e.g. [command] --help

securegate$ help
Secure Gate makes the connection between computers more secure than ever

Usage:
  [command]

Available Commands:
  connect     Open SSH connection to a node
  machine     List all accessible nodes by the user
  ...
  ...

Use "[command] --help" for more information about this command

🙆‍♀️ Me

Display informations related to the current user

securegate$ me
+--------+-----------+----------+------------+
| EMAIL  | FIRSTNAME | LASTNAME |     JOB    |
+--------+-----------+----------+------------+
| Secure | Gate      | Is       | Wonderfull |
+--------+-----------+----------+------------+
You.

📜 List

List all the accessible machines by the current user

securegate$ list
+------------------+----------+-------------------------------------------------------+-------+
|        ID        |   NAME   |                          IP                           | PORT  |
+------------------+----------+-------------------------------------------------------+-------+
| 09gtWjWi9SOVSGb1 | NASA     | localhost                                             |  3002 |
| VexuCBYu0JOHzy84 | AREA-51  | localhost                                             | 62774 |
| kKQSHWF2cl1pjZdp | nowhere  | localhost                                             |  3002 |
+------------------+----------+-------------------------------------------------------+-------+
Available nodes.

🔌 Connect

Open SSH connection toward the machine given as argument

securegate$ connect nowhere
dummy@nowhere-pc:~$

🚶 Logout

Terminate the current session

securegate$ logout
See you soon bro!
Email:

🏃 Exit

Close the shell with the given exit status (0 by default)

securegate$ exit 42
$ echo $?
42

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

About

Secure Gate - SSH proxy for securing connection within your company

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published