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(authsign): store additional metadata/fields in certdb
#1126
feat(authsign): store additional metadata/fields in certdb
#1126
Conversation
26ba928
to
329659c
Compare
Codecov Report
@@ Coverage Diff @@
## master #1126 +/- ##
==========================================
- Coverage 56.27% 54.87% -1.40%
==========================================
Files 77 77
Lines 7309 6620 -689
==========================================
- Hits 4113 3633 -480
+ Misses 2727 2532 -195
+ Partials 469 455 -14
Continue to review full report at Codecov.
|
ADD COLUMN tags bytea, | ||
ADD COLUMN common_name bytea, | ||
ADD COLUMN filename bytea, | ||
ADD COLUMN application_name bytea; |
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.
Maybe we should start the process of not using bytea
type where it doesn't make sense, starting with these new columns.
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.
Yeah, I'll update the pg + mysql migrations to be TEXT
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.
done
This is a major change in that the included DB migrations *must* be run before the new version of `cfssl` is deployed. This allows for clients (i.e. https://github.com/cloudflare/certmgr) to send some additional optional fields to `/api/v1/cfssl/authsign` to be stored in `certdb`. It also starts saving SANs, common name, and NotBefore from the issued certificates so that they can be queried without having to parse the PEM.
329659c
to
35f9d5c
Compare
b856b0a
to
73ca13a
Compare
updated to move these arbitrary fields into a json column |
e23b413
to
5c528a8
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.
Looks great!
Rows inserted before the migration in cloudflare#1126 will have the `common_name` set to NULL. This fixes selects for those rows.
fix selecting rows created before migration introduced in #1126
This is a major change in that the included DB migrations must be run before the new version of
cfssl
is deployed.This allows for clients (i.e. https://github.com/cloudflare/certmgr) to send some additional optional fields to
/api/v1/cfssl/authsign
to be stored incertdb
. It also starts saving SANs, common name, and NotBefore from the issued certificates so that they can be queried without having to parse the PEM.