Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSRF in combination with basic auth breaks UI #16450

Closed
Fatal705 opened this issue Dec 19, 2024 · 1 comment · Fixed by #16464
Closed

CSRF in combination with basic auth breaks UI #16450

Fatal705 opened this issue Dec 19, 2024 · 1 comment · Fixed by #16464
Labels
bug Something isn't working ui Related to the Prefect web interface

Comments

@Fatal705
Copy link

Bug summary

When enabling CSRF (by PREFECT_SERVER_CSRF_PROTECTION_ENABLED) and basic auth (by PREFECT_API_AUTH_STRING) on the server, the UI no longer shows any information. After disabling CSRF protection everything works as expected.

It seems this is due to not sending the Authorization header for CSRF requests (/api/csrf-token. In the browser console these requests show up as 401 unauthorized.

Version info

Version:             3.1.8
API version:         0.8.4
Python version:      3.12.8
Git commit:          53a83ebc
Built:               Tue, Dec 17, 2024 10:20 AM
OS/Arch:             linux/x86_64
Profile:             ephemeral
Server type:         server
Pydantic version:    2.10.3

Additional context

No response

@Fatal705 Fatal705 added the bug Something isn't working label Dec 19, 2024
@cicdw
Copy link
Member

cicdw commented Dec 19, 2024

Thank you for the bug report @Fatal705 and for identifying the potential issue; I'm looking into why the auth string isn't respected for that call right now and should have a fix soon.

@cicdw cicdw added the ui Related to the Prefect web interface label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui Related to the Prefect web interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants