opa-envoy-plugin icon indicating copy to clipboard operation
opa-envoy-plugin copied to clipboard

Issue 6901: set invalid request status if request parsing fails

Open rudrakhp opened this issue 1 year ago • 5 comments

Resolves open-policy-agent/opa#6901

rudrakhp avatar Jul 31 '24 09:07 rudrakhp

@rudrakhp please squash your commits and we can get this in. Also have you tested this end-to-end?

ashutosh-narkar avatar Aug 06 '24 22:08 ashutosh-narkar

@rudrakhp please squash your commits and we can get this in. Also have you tested this end-to-end?

I added a case for invalid URL in the e2e test suite, but somehow it's getting a 404 before 400 bad request. @ashutosh-narkar if you are aware of this do let me know, otherwise will come back to this tomorrow.

rudrakhp avatar Aug 07 '24 15:08 rudrakhp

I added a case for invalid URL in the e2e test suite, but somehow it's getting a 404 before 400 bad request. @ashutosh-narkar if you are aware of this do let me know, otherwise will come back to this tomorrow.

Is the request even reaching OPA?

ashutosh-narkar avatar Aug 07 '24 18:08 ashutosh-narkar

@rudrakhp did you get a chance to look into the test failures. This would be a good one to get in.

ashutosh-narkar avatar Aug 15 '24 17:08 ashutosh-narkar

@rudrakhp did you get a chance to look into the test failures. This would be a good one to get in.

@ashutosh-narkar was out on vacation, will get something out in the next couple of days.

rudrakhp avatar Aug 27 '24 13:08 rudrakhp

@ashutosh-narkar looks like the place where I was adding the test was for testing istio setup with the plugin enabled but requests were not going via OPA. I don't see any E2E suite where I can add this test, let me know if there is any. I think unit tests should suffice to test this behaviour as we rely on go-control-plane anyways. WDYT?

rudrakhp avatar Sep 11 '24 19:09 rudrakhp

@rudrakhp this looks good. If you could just update the commit message with a note explaining the change that would be great. We can then get this in. Thanks for the contribution.

ashutosh-narkar avatar Sep 11 '24 21:09 ashutosh-narkar

@ashutosh-narkar updated commit message

rudrakhp avatar Sep 13 '24 05:09 rudrakhp