Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| services:lubelogger [2025/01/26 17:04] – 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 ===== | ||
| + | |||
| + | 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. | ||
| Line 40: | Line 122: | ||
| access_log / | access_log / | ||
| error_log / | 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 " | ||
| + | | ||
| proxy_pass http:// | proxy_pass http:// | ||
| client_max_body_size | client_max_body_size | ||
| - | proxy_set_header Host $http_host; | + | |
| - | proxy_set_header X-Real-IP | + | # The following lines are all commented to use NGINX SSO authentication and NOT LubeLogger |
| - | proxy_set_header X-Forwarded-For | + | # authentication. IF you want to use LubeLogger authentication, |
| - | proxy_set_header X-Forwarded-Proto $scheme; | + | # |
| + | # | ||
| + | # | ||
| + | # | ||
| proxy_set_header | proxy_set_header | ||
| proxy_set_header | proxy_set_header | ||