Skip to content

Add GRPC timeout capability and rspec integration

Vishwa Bhat requested to merge vbhat/rspec-grpc into main

This MR does multiple things within gRPC:

  1. Adds per-scan and per-payload timeout capability in the Service Definition file (and reflected in generated files).
  2. Introduces allowable timeout value(MAX_ALLOWED_TIMEOUT_SECONDS) to guard against misusal of triggering long-running requests. Currently, the value is set to 600 seconds.
  3. This MR reduces the existing timeout values for the overall scan and each payload to 3min (prev 10min) and 30sec (prev 8.3m?) respectively, as the previous values aren't reasonable for network-based requests (We can discuss the newly defined numbers if they're not convincing)
  4. Adds request validation for RPC endpoints:
    • Scan and Blob timeout value range check
    • Non-empty value check on payload's id and data field
    • Non-empty value check on allowlist's entry value
  5. Adds rspec tests for #scan and #scan_stream endpoints covering use cases for RPC requests and their equivalent responses.

Relevant Issue Numbers

Edited by Vishwa Bhat

Merge request reports

Loading