Password and secret manager
This is a toy implementation of a LastPass-like password and secret manager. DO NOT USE THIS IN PRODUCTION.
- Install Go
- Install templ
- Install the TailwindCSS standalone CLI
- Install Make
- Clone the project and install dependencies
git clone [email protected]:oalexander6/passman.git
cd ./passman
go mod download
Secrets must be placed in the ./secrets
folder. The required files must be created containing the desired values:
JWT_SECRET
SESSION_SECRET
STORAGE_ENCRYPTION_KEY
STORAGE_PASSWORD
POSTGRES_ADMIN_PASSWORD
- Run
docker-compose up
- Use
ifconfig
and find the ipv4 for the interfacedocker0
- Go to
localhost:8080
, selectpostgres
, set host to<IPV4>:5432
, set username to postgres, set password to contents of POSTGRES_ADMIN_PASSWORD secret - Create a new database named
authelia
- Create a new user with
CREATE USER authelia WITH PASSWORD 'STORAGE_PASSWORD';
- Grant new user full access to authelia database with
GRANT ALL ON SCHEMA public TO authelia;
- Add
127.0.0.1 test.com
to/etc/hosts
- Generate a certificate with
openssl req -x509 -out test.com.crt -keyout test.com.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=*.test.com' -extensions EXT -config <( \
printf "[dn]\nCN=test.com\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:*.test.com\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
- Install the certificate as a locally trusted certificate
sudo apt-get install -y ca-certificates
sudo cp local-ca.crt /usr/local/share/ca-certificates
sudo update-ca-certificates