Fetching serial of certificate is complex due to DB schema
Currently only way to get serial of a certificate by its id is to traverse acme_serial_certs_index table entirely as the id is in nvalue column. And certificate serial is not in any other place like acme_orders or acme_certs. Please add an extra field containing serial of the certificate in acme_certs nvalue column to fetch serial of a certificate easily.
Also there are lot of ways current DB schema can be improved. Is there any plans to migrate this from NoSQL to SQL?
Hey @COD3HUNT3R,
Currently only way to get serial of a certificate by its id is to traverse
acme_serial_certs_indextable entirely as the id is in nvalue column. And certificate serial is not in any other place likeacme_ordersoracme_certs. Please add an extra field containing serial of the certificate inacme_certsnvalue column to fetch serial of a certificate easily.
What are you trying to do, exactly? There might be other ways to solve your issue. For example, there are users who tail the logs, and extract issued certificates from those and put them in another system.
Also there are lot of ways current DB schema can be improved. Is there any plans to migrate this from NoSQL to SQL?
At this moment there are no plans to do so. We are working on an improvement of our nosql package, and it's possible those improvements will lead to making it simpler to change the data model in this repo too, but there are no guarantees. We do have a Step CA Pro offering, which uses a relational data model, so that could be an option too if you need easy access to the underlying data.
End users can revoke their certificate easily through acme but for admin side this is bit time consuming to find the exact certificate because step cli requires certificate serial.