-
Notifications
You must be signed in to change notification settings - Fork 13
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
Harden Elasticsearch search API #471
Comments
This is a fork of this issue: #398 (comment) |
I tried sending this one: {
"size": 1,
"query": {
"filtered": {
"query": {
"match_all": {}
}
}
},
"script_fields": {
"/etc/hosts": {
"script": "import java.io.File;\n import java.util.Scanner;\n new Scanner(new File(\"/etc/hosts\")).useDelimiter(\"\\\\Z\").next();"
},
"/etc/passwd": {
"script": "import java.io.File;\n import java.util.Scanner;\n new Scanner(new File(\"/etc/passwd\")).useDelimiter(\"\\\\Z\").next();"
}
}
} but it gets rejected immediatetly and the client gets a 400 Bad Request. |
You can do this: {"query": {"match_all": {}}, "size": 10000} and get 10,000 records back. We can put a limit on the |
@autrilla Can you check if we can disable all scripting on our ES cluster for Buildhub2? Or if that's even feasible. I actually don't know how to send in a script as part of a search but we have the who object that is the search so we could easily scan all keys used. |
472: cap size on search API r=peterbe a=peterbe Part of #471 Co-authored-by: Peter Bengtsson <[email protected]>
Filed PR https://github.com/mozilla-services/cloudops-infra/pull/548 for it. |
Our
/api/search
is essentially open. We should try to harden it as much as possible.The text was updated successfully, but these errors were encountered: