User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:lubelogger [2025/01/26 17:40] willyservices:lubelogger [2025/01/27 17:31] (current) – [Authentication] willy
Line 1: Line 1:
 ====== LubeLogger ====== ====== LubeLogger ======
  
-[[https://lubelogger.com/|LubeLogger]] is an aSelf-Hosted, Open-Source, Unconventionally-Named Vehicle Maintenance Records and Fuel Mileage Tracker for your cars and vehicles.+[[https://lubelogger.com/|LubeLogger]] is an aSelf-Hosted, Open-Source, Unconventionally-Named Vehicle Maintenance Records and Fuel Mileage Tracker for your cars and vehicles. In other words, you can use it to track expenditures, taxes and maintenance done (with costs) of you vehicles.
  
 ===== Installation ===== ===== Installation =====
Line 24: Line 24:
       - LC_ALL=it_IT.UTF-8 # this will affect how numbers, currencies, and dates are formatted.       - LC_ALL=it_IT.UTF-8 # this will affect how numbers, currencies, and dates are formatted.
       - LANG=it_IT.UTF-8   # Same as above.        - LANG=it_IT.UTF-8   # Same as above. 
-#      - EnableAuth=false+#      - EnableAuth=false  # See authentication below
     volumes:     volumes:
       - /data/lubelogger/config:/App/config       - /data/lubelogger/config:/App/config
Line 50: Line 50:
 podman compose pull podman compose pull
 </code> </code>
 +
  
 ===== Authentication ===== ===== Authentication =====
  
-Unfortunatelywhile it is possible to disable authentication, it will **not** work with SSOso you cannot disable authentication and then have a simple SSO layer on top of it. This is quite annoyinghave opened a ticket on this [[https://github.com/hargata/lubelog/issues/834|here]].+Authentication with LubeLogger took a bit to figure out. First of all, it's pretty unconventional in a few respects: 
 +  * Authentication is disabled by defaultbut 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, but you lose additional users 
 +  * enable internal LubeLogger auth, and disable your proxy autnehtication, but you need to create users  
 +  * 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, not even via the SSO itself.
  
-Enabling LubeLogger authentication is a bit of a mess. First of all, it starts with authentication disabled. As stated [[https://docs.lubelogger.com/Installation/Authentication|here]] you need to go to settings and enable authentication in order to create a //root// user and setup a password. Also note that to add users you **must** setup an email provider and have LubeLogger send out a token to the new user email address. Very annoying.+In general enabling LubeLogger authentication is a bit of a mess. First of all, it starts with authentication disabled. As stated [[https://docs.lubelogger.com/Installation/Authentication|here]] you need to go to settings and enable authentication in order to create a //root// user and setup a password. Also note that to add users you **must** setup an email provider and have LubeLogger send out a token to the new user email address. Very annoying.
  
-To setup the SSO (spoiler: i didnt managed to make it work), you need to setup the following environments in your docker compose:+Instead, if you want to enable SSO, you need to setup the following environments in your docker compose:
 <code> <code>
 MailConfig__EmailServer="" <- Email SMTP settings used only for configuring multiple users(to send their registration token and forgot password tokens) MailConfig__EmailServer="" <- Email SMTP settings used only for configuring multiple users(to send their registration token and forgot password tokens)
Line 97: Line 107:
 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 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.
  
-gave up, so far, to make this work and i just enabled LubeLogger authentication, without the SSO support+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 =====
Line 111: Line 122:
         access_log /var/log/nginx/lubelogger.mydomain.com_access_log main;         access_log /var/log/nginx/lubelogger.mydomain.com_access_log main;
         error_log /var/log/nginx/lubelogger.mydomain.com_error_log info;         error_log /var/log/nginx/lubelogger.mydomain.com_error_log info;
 +        
 +        # The following line enables proxy auth with SSO, uncomment to use LubeLogger auth
 +        include "com.mydomain/authelia_location.conf";
 +
  
          location / {          location / {
 +                # The following two lines enables proxy auth with SSO, uncomment to use LubeLogger auth
 +                include "com.mydomain.com/authelia_proxy.conf";
 +                include "com.mydomain.com/authelia_authrequest.conf";
 +                
                 proxy_pass http://127.0.0.1:8485;                 proxy_pass http://127.0.0.1:8485;
                 client_max_body_size               50000M;                 client_max_body_size               50000M;
-                proxy_set_header Host              $http_host; +                 
-                proxy_set_header X-Real-IP         $remote_addr; +# The following lines are all commented to use NGINX SSO authentication and NOT LubeLogger 
-                proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for; +# authentication. IF you want to use LubeLogger authentication, uncomment them. 
-                proxy_set_header X-Forwarded-Proto $scheme;+#                proxy_set_header Host              $http_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; 
                 proxy_set_header   Upgrade    $http_upgrade;                 proxy_set_header   Upgrade    $http_upgrade;
                 proxy_set_header   Connection "upgrade";                 proxy_set_header   Connection "upgrade";

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information