You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The authentication header appears to be erroneously stripped or rewritten in requests communicated via paths defined in a provider's unauthenticated paths field.
To Reproduce
Steps to reproduce the behavior:
Set up a service that requires API access authenticated via the authentication header. For my issue, I set up the docker service Miniflux. This application uses the Google Reader API which employs a custom authentication header auth scheme.
Set up a forward auth (single application) proxy provider for the service in Authentik.
Add the Google Reader API required paths to the unauthenticated paths field when setting up the authentik provider (for Miniflux, it would be ^/accounts/ClientLogin.* and ^/reader/api/.*
Attempt to communicate with the service via the unauthenticated paths. For miniflux, you can do the following steps:
Set up a Google Reader API username and password in Miniflux's integrations settings.
Execute the following command: curl -div 'https://<your service's URL>/accounts/ClientLogin?Email=&Passwd='
Get the "Auth" token from the previous command's response and edit the following command with it and then execute it:
curl -iv -H "Authorization: GoogleLogin auth=" 'https://<your service's URL>/reader/api/0/user-info?output=json'
Observe the response. It should be an unauthorized response. You can also check the logs in Miniflux and you will see the error "No token provided."
Expected behavior
API access should work via unauthenticated paths, even if they send an authentication header. In the case of my example using Miniflux, the server should provide a response to the last command denoting information about the user.
Screenshots
Logs
Authentik logs show no change when executing the curl commands above. Miniflux shows the following (with personal info sanitized using template.)
Version and Deployment (please complete the following information):
authentik version: 2023.5.3
Deployment: Unraid via Docker (not docker-compose)
Additional context
If I remove the authentication header from the authResponseHeaders in my reverse proxy (Traefik,) the API exposed on the unauthenticated paths starts working (in this case, Google Reader API.) Adding the header back into the authResponseHeaders causes the issue to return.
This issue was first opened in the Authentik discord and additional information can be found there.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Under the authentication settings of the provider you can disable this toggle
Also this behaviour should only occur when there is a session, and that toggle is enabled, and accessing an unauthorized path, when there is no session then the header is not changed, even with the toggle enabled
Describe the bug
The authentication header appears to be erroneously stripped or rewritten in requests communicated via paths defined in a provider's unauthenticated paths field.
To Reproduce
Steps to reproduce the behavior:
curl -iv -H "Authorization: GoogleLogin auth=" 'https://<your service's URL>/reader/api/0/user-info?output=json'
Expected behavior
API access should work via unauthenticated paths, even if they send an authentication header. In the case of my example using Miniflux, the server should provide a response to the last command denoting information about the user.
Screenshots

Logs
Authentik logs show no change when executing the curl commands above. Miniflux shows the following (with personal info sanitized using template.)
Version and Deployment (please complete the following information):
Additional context
If I remove the authentication header from the authResponseHeaders in my reverse proxy (Traefik,) the API exposed on the unauthenticated paths starts working (in this case, Google Reader API.) Adding the header back into the authResponseHeaders causes the issue to return.
This issue was first opened in the Authentik discord and additional information can be found there.
The text was updated successfully, but these errors were encountered: