ankaios
ankaios copied to clipboard
Improve mTLS error messages upon wrong field values in the Ankaios CLI
Description
Currently, if the user enters a wrong path for the certificates or key in an Ankaios CLI, then the error message is "Channel preliminary closed." which is not helpful to the user since it is an internal Rust channel error message. This is independent of using the environment variables or the cli arguments directly.
- Execute the script
tools/certs/create_certs.sh
to create certificates for development - Start the server and agent with certificates
- Execute an ank cli command and provide an invalid file path to some of the arguments, e.g.:
./ank -v --ca_pem .certs/ca.pem --crt_pem .certs/cli.pem --key_pem asdfg get workloads
You should see the following error message:
Goals
Enhance the Ankaios CLI to output helpful error messages when an mTLS setting has an invalid value.
Final result
Summary
To be filled when the final solution is sketched.
Tasks
- [ ] Output "file path does not exist" as error message
- [ ] Analyze if not just the invalid file path can be output, but to output a Certificate Error even it is rejected due to other reasons (Maybe this needs to be included into the request handling and the communication middleware)