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
When I create an expression policy bound to a step or application that contains log statements, they are not showing in the server logs. This is with any logging level.
To Reproduce
Steps to reproduce the behavior:
Set logging level to trace
Create the following expression policy:
ak_logger.info(f"--Logged-- from ak_logger {request=}")
print(f"--Logged-- from print {request=}")
return True
Enable execution logging on the expression
Bind the policy to an application
Trigger authorization on the application. In my case, the application has a proxy provider so I tried to ping the service through the reverse proxy. In this step, I used the user "test2"
Go to your application and click the Test button under Check access and test the application. In this step, I used the user "test"
Expected behavior
I should find two logs like --Logged-- from ak_logger request=<PolicyRequest user=... in the server logs.
The first such log should show the user test2, corresponding to step 5. The second such log should show the user test, corresponding to step 6.
As for the print statement, I would expect them to show in the logs in the same way, but I would also understand if they did not.
Note that we only see a single log from the print statement for the user test. The logs from the test2 user are not present at all. Additionally, any logs from ak_logger are not present either.
I have also tried info and debug logging levels.
Version and Deployment (please complete the following information):
authentik version: 2024.12.1
Deployment: docker-compose
The text was updated successfully, but these errors were encountered:
When using the "Check access" function, logs of policies are captured and shown in the UI, hence they don't show up in the server stdout.
Specifically with the proxy provider, application policies are checked during initial authorization, not for every request to the outpost, so you'd have to login to the application in an incognito window
Describe the bug
When I create an expression policy bound to a step or application that contains log statements, they are not showing in the server logs. This is with any logging level.
To Reproduce
Steps to reproduce the behavior:
trace
Expected behavior
I should find two logs like
--Logged-- from ak_logger request=<PolicyRequest user=...
in the server logs.The first such log should show the user
test2
, corresponding to step 5. The second such log should show the usertest
, corresponding to step 6.As for the print statement, I would expect them to show in the logs in the same way, but I would also understand if they did not.
Logs
When I invoke the provider by pinging the service through my reverse proxy, I do find logs indicating that the provider is being used
Note that we only see a single log from the print statement for the user
test
. The logs from thetest2
user are not present at all. Additionally, any logs fromak_logger
are not present either.I have also tried
info
anddebug
logging levels.Version and Deployment (please complete the following information):
The text was updated successfully, but these errors were encountered: