-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update silo creation form to require a TLS certificate #2579
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Chatting through this with Ben, and he's noting that it would be good for us to consider a All of the current types in Nexus that have a |
Rather I meant that the |
This is a simple one, worth squeezing into R12? @david-crespo @charliepark |
Yeah, probably. |
} = useController({ | ||
control, | ||
name: 'tlsCertificates', | ||
rules: { required: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to work, but I was surprised about it since []
is truthy. Found this in the docs recommending validate
over required
for object and array values. I'll make that tweak now.
![image](https://private-user-images.githubusercontent.com/3612203/392119992-777756b3-28e8-4d9b-a0a3-5777db236003.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODEzNjIsIm5iZiI6MTczOTE4MTA2MiwicGF0aCI6Ii8zNjEyMjAzLzM5MjExOTk5Mi03Nzc3NTZiMy0yOGU4LTRkOWItYTBhMy01Nzc3ZGIyMzYwMDMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDk1MTAyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGI4MjU2NmU0MGQ2YTkyMGZmZWFkY2JkNWY4ZjJlMDA5OGRiYzkxNGQ1ZjY2YzZkYzljNDFiZTU3ZTkxOWNlOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.fxG-661h9byGNl0Q2kEGPksieP7a7_knINSMqeAbJfo)
aa78f8d
to
ff92d07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good to me. I'm still a little concerned about requiring a field in the UI that the API does not actually require, but the fix for that is almost certainly to have the API 400 if the list of certs has less than one element.
This looks a little tight, could use some space @benjaminleonard ?
![image](https://private-user-images.githubusercontent.com/3612203/392150754-b2186c4c-3abb-4f1a-915d-825f9fba260e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODEzNjIsIm5iZiI6MTczOTE4MTA2MiwicGF0aCI6Ii8zNjEyMjAzLzM5MjE1MDc1NC1iMjE4NmM0Yy0zYWJiLTRmMWEtOTE1ZC04MjVmOWZiYTI2MGUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDk1MTAyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDg1YzgxYjJmYTQzNWViYzI3ZjhlNjYwYzZhOTkwYWU4YmY1Yzk3YzRkNjFiMGM4ZmM5MDRjNjNkNjViMzc3YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.1KSkik6lFsoK89MCra8nFfDtPCiJXRN27IRC61NRbHo)
Ship it, I feel like I want to rework that pattern where mini-table is hidden when there's no elements anyway, doesn't sit quite right. |
oxidecomputer/console@059c551...fd47bee * [fd47bee7](oxidecomputer/console@fd47bee7) tweak bump omicron script to prompt for message * [f6a3c06c](oxidecomputer/console@f6a3c06c) bump omicron for project-scoped oxql endpoint * [4d3a923c](oxidecomputer/console@4d3a923c) oxidecomputer/console#2596 * [576e1842](oxidecomputer/console@576e1842) oxidecomputer/console#2595 * [72b6d43d](oxidecomputer/console@72b6d43d) oxidecomputer/console#2579 * [15e55044](oxidecomputer/console@15e55044) oxidecomputer/console#2594 * [fa27caf9](oxidecomputer/console@fa27caf9) oxidecomputer/console#2588 * [aad054c5](oxidecomputer/console@aad054c5) oxidecomputer/console#2592 * [d97310be](oxidecomputer/console@d97310be) oxidecomputer/console#2593 * [8ba8a898](oxidecomputer/console@8ba8a898) oxidecomputer/console#2590 * [d7fd3c42](oxidecomputer/console@d7fd3c42) oxidecomputer/console#2586 * [23423c2b](oxidecomputer/console@23423c2b) oxidecomputer/console#2583
oxidecomputer/console@059c551...fd47bee * [fd47bee7](oxidecomputer/console@fd47bee7) tweak bump omicron script to prompt for message * [f6a3c06c](oxidecomputer/console@f6a3c06c) bump omicron for project-scoped oxql endpoint * [4d3a923c](oxidecomputer/console@4d3a923c) oxidecomputer/console#2596 * [576e1842](oxidecomputer/console@576e1842) oxidecomputer/console#2595 * [72b6d43d](oxidecomputer/console@72b6d43d) oxidecomputer/console#2579 * [15e55044](oxidecomputer/console@15e55044) oxidecomputer/console#2594 * [fa27caf9](oxidecomputer/console@fa27caf9) oxidecomputer/console#2588 * [aad054c5](oxidecomputer/console@aad054c5) oxidecomputer/console#2592 * [d97310be](oxidecomputer/console@d97310be) oxidecomputer/console#2593 * [8ba8a898](oxidecomputer/console@8ba8a898) oxidecomputer/console#2590 * [d7fd3c42](oxidecomputer/console@d7fd3c42) oxidecomputer/console#2586 * [23423c2b](oxidecomputer/console@23423c2b) oxidecomputer/console#2583
This fixes a bug in the silo creation form, where a silo could be created without entering in TLS information.
The sub-form already had the TLS fields marked as required, but those requirements don't bubble up to the higher-order form. This adds a requirement to the body of the form, that the
tls_certificates
array be not-empty.Augustus had an interesting idea about verifying Common Name and Subject Alternative Names in the cert fields, but this PR doesn't address that yet.
Closes #2578