ibizaman / selfhostblocks

Modular server management based on NixOS modules and focused on best practices.
https://shb.skarabox.com
GNU Affero General Public License v3.0
203 stars 5 forks source link

New Authelia version deprecates and changes several fields #310

Open sivertism opened 1 month ago

sivertism commented 1 month ago

My Authelia broke after updating, and had the following error and warnings in the syslog.

There is one error: error decoding 'identity_providers.oidc.issuer_private_key': could not decode to a *rsa.PrivateKey: asn1: syntax error: data truncated Guess this is a consequence of the update, as I haven't changed the key. Have you experienced similar issues?

Then there are some deprecation warnings. It says no action required, but would be good to update regardless. Filing this here as it'd be pretty easy to miss these since they're just printed in a syslog.

This occurred on d7136b52e5bfcf918742d591b08178e97ad235b3

Sep 22 19:41:11 desktop authelia-auth.example.com-pre-start[2690463]: Configuration parsed and loaded with errors:
Sep 22 19:41:11 desktop authelia-auth.example.com-pre-start[2690463]:          - error occurred during unmarshalling configuration: 1 error(s) decoding:
Sep 22 19:41:11 desktop authelia-auth.example.com-pre-start[2690463]: * error decoding 'identity_providers.oidc.issuer_private_key': could not decode to a *rsa.PrivateKey: asn1: syntax error: data truncated
Sep 22 19:41:11 desktop authelia-auth.example.com-pre-start[2690463]: Configuration parsed and loaded with warnings:
Sep 22 19:41:11 desktop authelia-auth.example.com-pre-start[2690463]:          - configuration key 'identity_providers.oidc.issuer_private_key' is deprecated in 4.38.0 and has been replaced by 'identity_providers.oidc.jwks': you are not required to make any changes as this has been automatically mapped for you, but to stop this warning being logged you will need to adjust your configuration, and this configuration key and auto-mapping is likely to be removed in 5.0.0 : see https://www.authelia.com/c/oidc for more information
Sep 22 19:41:11 desktop authelia-auth.example.com-pre-start[2690463]:          - configuration key 'identity_providers.oidc.clients[].userinfo_signing_algorithm' is deprecated in 4.38.0 and has been replaced by 'identity_providers.oidc.clients[].userinfo_signed_response_alg': you are not required to make any changes as this has been automatically mapped for you, but to stop this warning being logged you will need to adjust your configuration, and this configuration key and auto-mapping is likely to be removed in 5.0.0
Sep 22 19:41:11 desktop authelia-auth.example.com-pre-start[2690463]:          - configuration keys 'notifier.smtp.host' and 'notifier.smtp.port' are deprecated in 4.38.0 and has been replaced by 'notifier.smtp.address' in the format of '[tcp://]<hostname>[:<port>]': you are not required to make any changes as this has been automatically mapped for you to the value 'submission://smtp.mailersend.net:587', but to stop this warning being logged you will need to adjust your configuration, and this configuration key and auto-mapping is likely to be removed in 5.0.0
Sep 22 19:41:11 desktop systemd[1]: authelia-auth.example.com.service: Control process exited, code=exited, status=1/FAILURE
Sep 22 19:41:11 desktop systemd[1]: authelia-auth.example.com.service: Failed with result 'exit-code'.
Sep 22 19:41:11 desktop systemd[1]: Failed to start Authelia authentication and authorization server.
Sep 22 19:41:11 desktop systemd[1]: authelia-auth.example.com.service: Consumed 91ms CPU time, 15.7M memory peak, 112B incoming IP traffic, 216B outgoing IP traffic.
ibizaman commented 1 month ago

I didn’t experience that issue with the private key. It’s weird that the error says data truncated. I’ve see that kind of error when the file was empty.

Thanks for posting those deprecation messages. I’ll get to those.

sivertism commented 1 month ago

Turns out I must've deleted one line of text in the middle of the key in my secrets yaml... guess this is why we review changes before pushing!

Works again now. Guess there's no rush to fix this as Authelia v5.0 seems pretty far away.