-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Certificate Requests Table Query #21
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kayra1
force-pushed
the
TLSENG-265-certificate-table
branch
from
June 13, 2024 10:05
afe7017
to
352678d
Compare
kayra1
force-pushed
the
TLSENG-265-certificate-table
branch
2 times, most recently
from
June 13, 2024 11:57
7782bc3
to
c8b903e
Compare
ghislainbourgeois
approved these changes
Jun 14, 2024
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.
LGTM, I added a small comments, but it could also be done in another PR.
gruyaume
reviewed
Jun 14, 2024
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.
Looks good to me besides the two comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces the query required to get all of the CSR's to dynamically create the table. The frontend will show a very simple loading text when the query fires, a very simple error text when the query fails, and the expected table when the query succeeds. The table is loaded with an array of CSR objects, which the table will pass on to the rows.
There is also the code to ingest the CSR pem string into a native object using
pkijs
, but these functions are incomplete and only return the Common Name and the NotAfter field for now. I've scoped the task to split these out to different tickets named below.There are some usability improvements that could also be done here, and I've scoped them out into a different ticket too.
Q: Where are the query unit tests?
A: neither vitest nor
react-query
provide facilities to mock queries. Tests for queries will be done in the integration tests that are scoped out in TLSENG-263Testing
You may have noticed that there are no tests associated with this PR. This is because there are no react state changes introduced with this PR (no modal popups etc.) and
react-query
does not have unit tests. Any external query tests that need to be written should be through the integration tests, which will come with TLSENG-263Since the query is written so that it's made to the same endpoint as the server (and to avoid cors errors etc.), the only way to test it is to build it and run gocert with it:
npm run dev
will not work.If you run into TLS errors, you will need to accept the TLS certificate that gocert sends before the query starts working properly.
This PR does NOT include:
extracting the values of the CSR into the expanded row: That's TLSENG-276
making it look nicer: That's also TLSENG-276. I also added some recommendations there like making the bg color of certificates that are expired red etc.
Any way to add CSR's from within the frontend: That's TLSENG-265
Checklist: