-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Security Issues: "Access-Control-Allow-Credentials" should be false by default when using "quarkus.http.cors=true" #10447
Comments
Here is the line of code: Line 100 in bc066bc
|
For context: Steps of reproduction: CORS poorly implemented, best case for attack: Allowed access to cookies. Defaulting |
Can I pick this? |
@mcserra sure |
The only problem we need to discuss is that it could break some existing apis, @gsmet any idea on how to deal with that? |
Cool, thanks! |
@ia3andy Hi, does it make sense to use it by default if one has:
and switch to false only if origins is a wildcard ? |
Yes, it can break the existing applications, but your analysis shows that in case of the origin wildcard it is not safe, but if the expected origin has been matched then it is not so clear if switching to |
@sberyozkin very good idea indeed! So It should be false by default when |
We also need another PR for |
yeah that is probably the right compromise, lets see if Guillaume and others agree, thanks |
Another option so we don't break any API would be to display a WARN log when |
In |
@sberyozkin no it's in the Quarkus extension part of it: Line 45 in b8ec2d9
|
I'd just go for your original proposal to switch it to |
Access-Control-Allow-Credentials default value
Describe the bug
As soon as
quarkus.http.cors=true
is set, theAccess-Control-Allow-Credentials: true
is added as header.It needs to be disabled for example to allow unknown requests, but avoid sending credentials (cookies, ..).
Expected behavior
Have an option to not add it in the header but still be able to use other CORS configs.
The text was updated successfully, but these errors were encountered: