Passport is an extremely simple self hosted password manager, that consists of a backend/server, a TUI, a CLI and an android application(WIP).
If it is the first time you are using passport, you will need to sign a SSL certificate, for the HTTPS server to run. The
easiest way to do this is by running this command while in the backend directory.
$ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -nodesThis certificate will however expire after one year so, if you are planing to use passport for a longer period of time, be prepared to renew it using the same command in one year (or modify the value
passed to the -days flag to however long you want it to be valid).
Setting up the server is a very simple process. The first time you use passport it requires only a few steps. If it's not your first time, it is as simple as just compiling, and running the server.
passport comes with a server Makefile for an easier setup process. To compile the server, navigate to the backend directory and simply run:
$ make buildThis will compile the server and place the binary in target/bin/passport-server. It will also create a log file (target/log/file.log) and touch two .pem files for the RSA keys.
NOTE! The log file will be overwritten if the code is recomplied. The .pem files will however not.
For all upcomming steps on how to set up the server, you need to be located in the backend directory for them too work as they should.
If it is not your first time using passport, you can now skip ahead to running
Once the code is compiled, it is now time to prepare the RSA keys to be ready for encryption of passwords. This is done, once again while in the backend directory, by running this command:
$ ./target/bin/passport-server keygenThe paths for the keys are relative, which makes your location in your file system very important for passport to function.
It is now time to set up the database correctly. As of now, the migration adds some dummy data for debugging purposes. If you want to preload it wiht other data,
or none at all, edit the migrate.go file and add your own data. If you don't want any data in the database to begin with, you can remove line 35 (or comment it out)
and then recompile the code, as done in Compilation (this does not require you to redo step two Setting up RSA).
To run the migration, simply run this command:
$ ./target/bin/passport-server migrateIt is once again important that you are located in the backend directory
Running the server requires a superuser in order to open the port :443 (HTTPS). To start the server, simply run:
$ sudo ./target/bin/passport-serverand enter your sudo password. If everything was done correctly, you should now have the passport server up and runnning, ready for use.
The TUI application that passport provides gives you access to a graphical interface without having to leave you precious terminal. To build and install it, place yourself in the frontend/TUI
directory, and then run:
$ make clean
$ make installWhen that is done, passport-tui will be ready to use. To launch it, simply run:
$ passport-tuiThe CLI application written in go is no longer supported and will not be recieving any more updates. The code works, if you wish to use it but it is recommended that you
opt for rustport instead, since it is still supported.
If you nonetheless wish to stick with the go version, follow the steps below:
The CLI application allows you to run commands to perform all your passport tasks. To install it, place yourself in the frontend/CLI directory and run the following:
$ make clean
$ make installThe passport CLI application is now installed and ready to use. For further instructions on how to use it, run:
$ passport help