Verify passed bootstrap_server argument is a valid host:port #7254
Labels
Component: CLI
good first issue
help wanted
Implementation: Rust
rust
Pull requests that update Rust code
Observed behavior
There is a confluent addon that enables end-to-end encrypted message streams through Confluent Cloud.
To be used, It need to be explicitly configured as an addon on the orchestrator' project:
that bootstrap server address must be a HOST:PORT pair, but currently no check is done when parsing the command arguments, resulting in an error further downstream that is not that evident to the user.
Steps to reproduce
Pass any invalid string as the
--bootstrap-server
argument.Expected behavior
It must verify that:
It follows the
HOST:PORT
formatHOST is a valid hostname
PORT is a valid tcp port (enough to check it's <= 65535)
Probably a good idea to try to open a tcp connection to that address, to check there is something really listening there.
In case of errors on the format or address not being reachable, terminate with an error message telling the user the encounter error.
Ockam Version
v0.113.0
The text was updated successfully, but these errors were encountered: