-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[YW] Handle invalid certs/keys correctly #5594
Labels
area/platform
Yugabyte Platform
good first issue
This is a good issue to start contributing!
team/platform-hi
Tickets handled by HashedIn team
Milestone
Comments
Hi @iSignal - Should we fail the upload cert action if the cert is invalid? Can you handle this as part of TLS workflow improvements? thanks |
iSignal
changed the title
Creating a universe with invalid key/cert does not result in error state
[YW] Handle invalid certs/keys correctly
Dec 9, 2020
We could do two improvements here:
For the future, we could also consider allowing deletion of certs that do not have any univs associated with them. |
streddy-yb
added
the
good first issue
This is a good issue to start contributing!
label
Dec 10, 2020
jitendra-12113
pushed a commit
that referenced
this issue
Jan 4, 2021
Heading: [5594][Platform] Handle invalid certs/keys correctly Description: We wanted to verify the cert at upload time itself. Testing: When we try to upload selfSigned cert, we were able to upload any garbage files. Now with this fix, we have handled this scenrio. User won't be able to upload garbage file. Incase of self signed cert upload workflow, We are matching the modulus of cert RSA Public key with the modulus of its private key if its matched then it means certs are valid otheriwse Invalid. For CA Cert, we are just validating the Cert format. Added the unit Tests as well.
Back end changes are done. Please review. PS: UI changes need to be done accordingly. |
jitendra-12113
pushed a commit
that referenced
this issue
Jan 5, 2021
Heading: [5594][Platform] Handle invalid certs/keys correctly Description: We wanted to verify the cert at upload time itself. Testing: When we try to upload selfSigned cert, we were able to upload any garbage files. Now with this fix, we have handled this scenrio. User won't be able to upload garbage file. Incase of self signed cert upload workflow, We are matching the modulus of cert RSA Public key with the modulus of its private key if its matched then it means certs are valid otheriwse Invalid. For CA Cert, we are just validating the Cert format. Added the unit Tests as well.
jitendra-12113
added a commit
that referenced
this issue
Feb 17, 2021
* Heading: [5594][Platform] Handle invalid certs/keys correctly Description: We wanted to verify the cert at upload time itself. Testing: When we try to upload selfSigned cert, we were able to upload any garbage files. Now with this fix, we have handled this scenrio. User won't be able to upload garbage file. Incase of self signed cert upload workflow, We are matching the modulus of cert RSA Public key with the modulus of its private key if its matched then it means certs are valid otheriwse Invalid. For CA Cert, we are just validating the Cert format. Added the unit Tests as well. (cherry picked from commit 5f8d39a) * Heading: [5594][Platform] Handle invalid certs/keys correctly Description: We wanted to verify the cert at upload time itself. Testing: When we try to upload selfSigned cert, we were able to upload any garbage files. Now with this fix, we have handled this scenrio. User won't be able to upload garbage file. Incase of self signed cert upload workflow, We are matching the modulus of cert RSA Public key with the modulus of its private key if its matched then it means certs are valid otheriwse Invalid. For CA Cert, we are just validating the Cert format. Added the unit Tests as well. (cherry picked from commit 5f8d39a) Co-authored-by: jitendra-12113 <[email protected]>
polarweasel
pushed a commit
to lizayugabyte/yugabyte-db
that referenced
this issue
Mar 9, 2021
…yte#7264) * Heading: [5594][Platform] Handle invalid certs/keys correctly Description: We wanted to verify the cert at upload time itself. Testing: When we try to upload selfSigned cert, we were able to upload any garbage files. Now with this fix, we have handled this scenrio. User won't be able to upload garbage file. Incase of self signed cert upload workflow, We are matching the modulus of cert RSA Public key with the modulus of its private key if its matched then it means certs are valid otheriwse Invalid. For CA Cert, we are just validating the Cert format. Added the unit Tests as well. (cherry picked from commit 5f8d39a) * Heading: [5594][Platform] Handle invalid certs/keys correctly Description: We wanted to verify the cert at upload time itself. Testing: When we try to upload selfSigned cert, we were able to upload any garbage files. Now with this fix, we have handled this scenrio. User won't be able to upload garbage file. Incase of self signed cert upload workflow, We are matching the modulus of cert RSA Public key with the modulus of its private key if its matched then it means certs are valid otheriwse Invalid. For CA Cert, we are just validating the Cert format. Added the unit Tests as well. (cherry picked from commit 5f8d39a) Co-authored-by: jitendra-12113 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/platform
Yugabyte Platform
good first issue
This is a good issue to start contributing!
team/platform-hi
Tickets handled by HashedIn team
Creating a universe with an invalid certificate key/crt leads to the following error trace - however the universe itself shows up as "Ready" with no errors. Deleting this kind of a universe may also fail because it is not full set up.
A similar error happens if one goes to the Certificates list and clicks Actions -> Get Client certificate from the dropdown. One issue there is that there is no way to remove the invalid cert from the list (because we do not allow removing any certs once they are added).
The text was updated successfully, but these errors were encountered: