Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:lubelogger [2025/01/25 17:00] – 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: | ||
</ | </ | ||
Line 24: | Line 50: | ||
podman compose pull | 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 8443 ssl; | ||
- | location | + | access_log / |
- | proxy_pass http:// | + | error_log |
+ | | ||
+ | # The following line enables proxy auth with SSO, uncomment to use LubeLogger auth | ||
+ | include " | ||
+ | |||
+ | |||
+ | | ||
+ | # The following two lines enables proxy auth with SSO, uncomment to use LubeLogger auth | ||
+ | include " | ||
+ | include " | ||
+ | |||
+ | | ||
+ | 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 | ||
+ | } | ||
} | } | ||
</ | </ | ||
- | I choose to run it on my home subdomain, already protected behind by Authelia SSO. See [[selfhost: | + | |
===== Running ===== | ===== Running ===== |