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:
-
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
-
-
Set up the configuration.
cp
theconfig.json.template
asconfig.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 -
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
-
-
If you don't have Mage already installed install it
$ go get -u github.com/magefile/mage
-
Install the Gate by running this command in your terminal
$ mage install
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.
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
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
Display informations related to the current user
securegate$ me
+--------+-----------+----------+------------+
| EMAIL | FIRSTNAME | LASTNAME | JOB |
+--------+-----------+----------+------------+
| Secure | Gate | Is | Wonderfull |
+--------+-----------+----------+------------+
You.
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.
Open SSH connection toward the machine given as argument
securegate$ connect nowhere
dummy@nowhere-pc:~$
Terminate the current session
securegate$ logout
See you soon bro!
Email:
Close the shell with the given exit status (0 by default)
securegate$ exit 42
$ echo $?
42
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.