protoc-gen-validate icon indicating copy to clipboard operation
protoc-gen-validate copied to clipboard

C++ URI validation in Envoy

Open asraa opened this issue 4 years ago • 2 comments

Looks like Envoy is using C++ URI validations in StsService: https://github.com/envoyproxy/envoy/blob/062c895f499382ae61dead16db2a7e78b9146525/api/envoy/api/v2/core/grpc_service.proto#L94

Config validations throw an unimplemented exception when initializing the server (rather than a controlled a ProtoValidation error). https://oss-fuzz.com/testcase-detail/5665272556158976

It might be a good time to implement this constraint. I think less new logic in PGV is better, and I wonder if it's best to use a regex with RE2 to implement the constraint, or a small C++ library (but not ideal, as it's a dependency)

@JimmyCYJ

asraa avatar Dec 23 '19 20:12 asraa

@asraa Thanks for letting me know. I just hit the same issue when I start to set up integration test today.

JimmyCYJ avatar Jan 08 '20 00:01 JimmyCYJ

Thanks for posting this issue @asraa, we also ran into the same issue. Would love to see this implemented, even if it's a regex check. Would be very helpful for config validation.

nareddyt avatar Mar 12 '20 17:03 nareddyt