Open jordanpadams opened 1 year ago
@jordanpadams @tloubrieu-jpl
What shows up in the logs? 403 is not one of registry-api errors. registry-api throws 400, 404, 406, and 500. It probably means it is coming from spring but need log message for it. I can run the query and look at the log if I had access. I think this requires special magic to get the logs from amazon after it is run and I do not have the privs. Run the query and get the full log from start of query to end so that we can see what is generating a 403.
@jordanpadams @tloubrieu-jpl
I wonder if opensearch is returning the 403. Now that would be weird but need the logs files from aws.
Just in case it's slipped notice, that's a weird error - HTTP403 (Forbidden/Unauthorized), but the text states Bad request
@alexdunnjpl
The other really odd bit is that it is generated by cloudfront -- did we add that to our errors to make it more confusing - and that we ask for JSON which our errors would be returned in that format. We catch nearly all exceptions and stuff in the controller transmutter, unless that changed, and looking there we cannot generate the 403. It looks like amazon likes eq in a url but not like. Ah, such fun.
@al-niessner I don't recall any changes to exception handling and am 95% sure of that recollection.
I'm more suspicious of the *
than the eq
/like
difference, but that's just a gut hunch.
Let me test something real quick.
I take that back - query q=((lid like "urn:nasa:pds:voyager2.pws.wf") and (product_class eq "Product_Bundle"))
(working query, subbing in like
for eq
) fails, and asterisk does not cause failure.
@alexdunnjpl @jordanpadams @tloubrieu-jpl
Again, this is not a problem with registry-api but is a problem before you get to registry-api. Need to look at the logs while it is failing or understand the message better (see cloudfront expert). I did notice from other ticket that this is using search-en so changed to search but got same error, When I run locally:
$ curl --get 'http://localhost:8080/products' --data-urlencode 'limit=100' --data-urlencode 'q=((lid like "urn:nasa:pds:voyager2.pws.wf*") and (product_class eq "Product_Observational"))' --data-urlencode 'start=0' -H 'accept: application/json'
{"summary":{"q":"((lid like \"urn:nasa:pds:voyager2.pws.wf*\") and (product_class eq \"Product_Observational\"))","hits":0,"took":29,"search_after":[],"limit":100,"sort":[],"properties":[]},"data":[]}
which means not registry-api code.
The idea is to index the fields as text
and keyword
.
Checked for duplicates
Yes - I've already checked
π Describe the bug
When I tried to perform a query
((x like "foo*") and (y eq "bar"))
, I noticed it throws a 403 errorπ΅οΈ Expected behavior
I expected the query to work successfully
π To Reproduce
This doesn't work:
This does:
π₯ Environment Info
Registry API 1.2
π Version of Software Used
No response
π©Ί Test Data / Additional context
No response
π¦ Related requirements
No response
βοΈ Engineering Details
No response