- Notifications
You must be signed in to change notification settings - Fork1
Auth for my apps (with notifications)
License
aceberg/ForAuth
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ForAuth (Forward Auth) - simple auth app (session-cookie) with notifications on login andmultiple targets option
- This app is only safe when used with
https
- Use strong password
- Make sure direct access to Target app is closed with firewall or other measures
docker run --name forauth \ -v~/.dockerdata/ForAuth:/data/ForAuth \ -p 8800:8800\# Proxy port -p 8801:8801\# Config port aceberg/forauth
Then open Config page in browser and set up Auth and Target app.
Exampledocker-compose-auth.yml forWatchYourPorts. This should work with other apps too.
Configuration can be done through config file, GUI or environment variables. Variable names isconfig.yaml
file are the same, but in lowcase.
Variable | Description | Default |
---|---|---|
FA_AUTH | Enable Session-Cookie authentication | false |
FA_AUTH_EXPIRE | Session expiration time. A number and suffix:m, h, d orM. | 7d |
FA_AUTH_USER | Username | |
FA_AUTH_PASSWORD | Encrypted password (bcrypt).How to encrypt password with bcrypt? |
Variable | Description | Default |
---|---|---|
FA_HOST | Listen address for both Config and Proxy | 0.0.0.0 |
FA_PORT | Port for Proxy | 8800 |
FA_PORTCONF | Port for Config page | 8801 |
FA_TARGET | Where to proxy after login (host:port). Example:192.168.1.1:8840 | |
FA_THEME | Any theme name fromhttps://bootswatch.com in lowcase oradditional (emerald, grass, grayscale, ocean, sand, wood) | united |
FA_COLOR | Background color: light or dark | dark |
FA_NODEPATH | Path to local JS and Themes (node-bootstrap) | |
FA_NOTIFY | Shoutrrr URL. ForAuth usesShoutrrr to send notifications. It is already integrated, just needs a correct URL. Examples for Discord, Email, Gotify, Matrix, Ntfy, Pushover, Slack, Telegram, Generic Webhook and etc arehere | |
TZ | Set your timezone for correct time |
Key | Description | Default |
---|---|---|
-d | Path to config dir | /data/ForAuth |
-n | Path to local JS and Themes (node-bootstrap) |
Multiple Targets can be gonfigured fromConfig
page or intargets.yaml
file inside the config dir.
Example:
0.0.0.0:8854:# where proxy will listenname:DiaryMD# nametarget:127.0.0.1:8754# where an app listens0.0.0.0:8855:name:AnyAppStarttarget:127.0.0.1:8755
By default, this app pulls themes, icons and fonts from the internet. But, in some cases, it may be useful to have an independent from global network setup. I created a separateimage with all necessary modules and fonts.
docker run --name node-bootstrap \ -p 8850:8850 \ aceberg/node-bootstrap
docker run --name forauth \ -v~/.dockerdata/ForAuth:/data/ForAuth \ -p 8800:8800 \ -p 8801:8801 \ aceberg/forauth -n"http://$YOUR_IP:8850"
To access Target app withcurl
:
curl -X POST http://localhost:8800 -H"Content-Type: application/x-www-form-urlencoded" -d"username=user&password=pw" -c fileCookie
curl http://localhost:8800 -b fileCookie
- All go packages listed independencies
- Bootstrap
- Themes:Free themes for Bootstrap
- Favicon and logo:Flaticon
About
Auth for my apps (with notifications)