oxidecomputer / oxidecomputer/omicron
Bad TLS cert error messages could be more helpful
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
Low priority because the experience is pretty tolerable. You can figure it out with some effort.
Hitting silo create with a bad request body (cert: 'Hello\n') results in the following error message. But there is no certificate field (it's cert). Also, the body contains an array of certs and this error doesn't tell you which one has the error. It blows up on the first bad one.
Unsupported value for "certificate": Certificate exists, but is empty.
The request looked like this:
Relevant code
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with certificates/src/lib.rs, nexus/db-model/src/certificate.rs, and nexus/db-queries/src/db/datastore/silo.rs, especially the linked lines, then reproduce silo creation with the bad cert request body. Done means the error refers to the cert field and identifies which certificate in the array is invalid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100