The main goal of this project is to develop a small stand-alone user login for the Beego Framework by astaxie. This work is mainly a continuation of the beego-acme example presented in the article ”A Word From The Beegoist” (2014, Richard Eng).
- Beego integration of Vault utilizing vaultgo package by Mittwald CM Service.
- Mail client provided by official Twilio/Sendgrid service.
- Beego v2.0.2
- Go 1.16.x
- Vault v1.9.0
- Sendgrid (Account, Api Token)
- Run
beego-auth
$ source .beego.env
$ go build
$ ./beego-auth# rebuild database (all prior data lost!)
./beego-auth orm syncdb -h
./beego-auth orm syncdb -db "auth" -force=true -v=true
# Schema
./beego-auth orm sqlall -db "auth"$ mage Check # run all tests- loaded by default beego/beego/v2/core/config/ini.go
- may lead to [W] (Beego Warning):
2021/12/01 12:09:06.965 [W] init global config instance failed. If you donot
use this, just ignore it. open conf/app.conf: no such file or directory- work-around by providing empty
app.confwith include.
$ vault secrets enable transit
$ vault write -f transit/keys/beego-key
$ vault list transit/keys
$ vault read transit/keys/beego-key
# decrypt data previously encrypted by Vault Transit
$ mage decrypt vault:v1:oZTuFdqpTReBPCV/qHj3itmTa86tybxHBUQxR6Xx3k7IQ0h3DcX6a7s=..
- Thanks to Richard Eng.
- Thanks to Mittwald CM Service.