Caddy plugin, Authentik sso : missing authorization header

Started by caplam, January 17, 2025, 03:43:21 PM

Previous topic - Next topic
Apologies for reviving an old thread, but can anyone walk me through how to get this header copied? I've recreated the steps that @caplam went through, including hardcoding the Base64 encoded user/pass in the Authorization header. That works which suggests to me that it is a header problem. When I try to get the plugin to copy the Authorization header using the field in the General Settings > Auth Provider - it's not working.

When I check my application logs (sonarr), it usually says "Authorization header missing." unless I add the header to both the Auth Provider setting and the Handler - at which point it says that "Authorization code not formatted properly." I don't know what else to do. I've looked at the template file in

/usr/local/opnsense/service/templates/OPNsense/Caddy/includeAuthProvider

and added the Authorization header to the copy_headers directive there but it didn't seem to make a difference.
 
Thanks so much!

I have the same caddy settings as you (your screenshot). You also  need to tick "forward basic auth" in reverse proxy handler config. No header to add in domain or handler settings.

edit: Strange thing. I wanted to check; and when connecting from lan i'm logged in but in logs  i have the same error message as you.
I also have authentication disabled for local adresses.
When connecting from wan i'm logged in without problem and no error message.
I guess there might be a problem with the app itself.