Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| services:lubelogger [2025/01/25 16:48] – created willy | services:lubelogger [2025/01/27 17:31] (current) – [Authentication] willy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== LubeLogger ====== | ====== LubeLogger ====== | ||
| - | [[https:// | + | [[https:// |
| ===== Installation ===== | ===== Installation ===== | ||
| Line 14: | Line 14: | ||
| Now, create the following **docker-compose.yml** as user // | Now, create the following **docker-compose.yml** as user // | ||
| <file - docker-compose.yml> | <file - docker-compose.yml> | ||
| + | --- | ||
| + | version: " | ||
| + | services: | ||
| + | app: | ||
| + | image: ghcr.io/ | ||
| + | build: . | ||
| + | environment: | ||
| + | - LC_ALL=it_IT.UTF-8 # this will affect how numbers, currencies, and dates are formatted. | ||
| + | - LANG=it_IT.UTF-8 | ||
| + | # - EnableAuth=false | ||
| + | volumes: | ||
| + | - / | ||
| + | - / | ||
| + | - / | ||
| + | - / | ||
| + | - / | ||
| + | - / | ||
| + | - / | ||
| + | - / | ||
| + | ports: | ||
| + | - 8485:8080 | ||
| + | networks: | ||
| + | - lubelogger-net | ||
| + | |||
| + | networks: | ||
| + | lubelogger-net: | ||
| </ | </ | ||
| Choose an available port, of course! | Choose an available port, of course! | ||
| + | |||
| + | Now pull it: | ||
| + | <code bash> | ||
| + | podman compose pull | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Authentication ===== | ||
| + | |||
| + | Authentication with LubeLogger took a bit to figure out. First of all, it's pretty unconventional in a few respects: | ||
| + | * Authentication is disabled by default, but once you mess with it, it can be managed only from web settings and the environment setting seems to be unresponsive | ||
| + | * It does not support forwarded headers or similar proxy based stuff | ||
| + | * It support OIDC (Authelia...) SSO type authentication but it still requires you to setup local authentication first | ||
| + | * It does allow multiple users, but only via email registration with tokens, you cannot add users from the admin control panel. This is probably the weirdest choice. | ||
| + | |||
| + | You have different options: | ||
| + | * disable LubeLogger auth and use your own proxy-based authentication, | ||
| + | * enable internal LubeLogger auth, and disable your proxy autnehtication, | ||
| + | * enable LubeLogger authentication with your OIDC SSO (es Authelia), but you still need to create your LubeLogger root account and you will not be able to use your proxy authentication, | ||
| + | |||
| + | In general enabling LubeLogger authentication is a bit of a mess. First of all, it starts with authentication disabled. As stated [[https:// | ||
| + | |||
| + | Instead, if you want to enable SSO, you need to setup the following environments in your docker compose: | ||
| + | < | ||
| + | MailConfig__EmailServer="" | ||
| + | MailConfig__EmailFrom="" | ||
| + | MailConfig__Port=587 <- Same as above. | ||
| + | MailConfig__Username="" | ||
| + | MailConfig__Password="" | ||
| + | OpenIDConfig__Name=Authelia | ||
| + | OpenIDConfig__ClientId=lube | ||
| + | OpenIDConfig__ClientSecret=client-secret-string | ||
| + | OpenIDConfig__AuthURL=Authorization URL to the Provider' | ||
| + | OpenIDConfig__TokenURL=URL to retrieve user JWT from the Provider | ||
| + | OpenIDConfig__RedirectURL=https:// | ||
| + | OpenIDConfig__Scope=" | ||
| + | OpenIDConfig__ValidateState=true/ | ||
| + | OpenIDConfig__UsePKCE=true/ | ||
| + | </ | ||
| + | |||
| + | My specific Authelia client setting is: | ||
| + | < | ||
| + | - client_id: ' | ||
| + | client_name: | ||
| + | client_secret: | ||
| + | public: false | ||
| + | authorization_policy: | ||
| + | pre_configured_consent_duration: | ||
| + | scopes: | ||
| + | - openid | ||
| + | |||
| + | - profile | ||
| + | grant_types: | ||
| + | - ' | ||
| + | redirect_uris: | ||
| + | - https:// | ||
| + | userinfo_signed_response_alg: | ||
| + | token_endpoint_auth_method: | ||
| + | </ | ||
| + | |||
| + | I suggest you also setup email notification by creating a dedicated email address for LubeLogger to send out emails or you will **not** be able to add users. | ||
| + | |||
| + | I choose to fully disable LubeLogger authentication and go with proxy authentication since i only need one user account no matter who is actually logged in. | ||
| ===== Reverse Proxy ===== | ===== Reverse Proxy ===== | ||
| - | Running LubeLogger behind NGINX is easy, this is an example: | + | Running LubeLogger behind NGINX is easy, but it cannot be hosted (at the moment, see [[https:// |
| <file - lubelogger.conf> | <file - lubelogger.conf> | ||
| - | location / | + | server |
| - | | + | |
| + | listen 443 ssl; | ||
| + | listen 8443 ssl; | ||
| - | | + | |
| - | | + | error_log / |
| + | | ||
| + | # The following line enables proxy auth with SSO, uncomment to use LubeLogger auth | ||
| + | include " | ||
| - | proxy_set_header Connection $http_connection; | ||
| - | proxy_set_header Connection ' | ||
| - | proxy_cache_bypass $http_upgrade; | ||
| - | proxy_set_header Host $host; | ||
| - | proxy_set_header X-Real-IP $remote_addr; | ||
| - | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| - | proxy_set_header X-Forwarded-Proto $scheme; | ||
| + | | ||
| + | # The following two lines enables proxy auth with SSO, uncomment to use LubeLogger auth | ||
| + | include " | ||
| + | include " | ||
| + | | ||
| + | proxy_pass http:// | ||
| + | client_max_body_size | ||
| + | | ||
| + | # The following lines are all commented to use NGINX SSO authentication and NOT LubeLogger | ||
| + | # authentication. IF you want to use LubeLogger authentication, | ||
| + | # proxy_set_header Host $http_host; | ||
| + | # proxy_set_header X-Real-IP | ||
| + | # proxy_set_header X-Forwarded-For | ||
| + | # proxy_set_header X-Forwarded-Proto $scheme; | ||
| + | |||
| + | proxy_set_header | ||
| + | proxy_set_header | ||
| } | } | ||
| + | } | ||
| </ | </ | ||
| + | |||
| ===== Running ===== | ===== Running ===== | ||
| + | |||
| + | To start it, and set it up on boot, as usual follow my indications [[gentoo: | ||
| + | < | ||
| + | ln -s / | ||
| + | </ | ||
| + | |||
| + | and create the following config file: | ||
| + | <file - / | ||
| + | USER=grist | ||
| + | DESCRIPTION=" | ||
| + | </ | ||
| + | |||
| + | Add the service to the default runlevel and start it now: | ||
| + | <code bash> | ||
| + | rc-update add user-containers.lubelogger default | ||
| + | rc-service user-containers.lubelogger start | ||
| + | </ | ||