This question has come up as part of open-mpic as well but we may as well discuss it all here to keep things synced up.
What should the endpoints be for the various validations/checks that we'll want performed? Due to the nature of the industry terms, there's no obviously elegant approach.
I figured an easy way to start the conversation would be to throw some ideas out there to beat up on. Gemini and ChatGPT were happy to oblige, though each gave me quite different results for my question about this. Here was my prompt:
Let's talk about PKI and certificate issuance. I want to brainstorm endpoint naming for an API that would do multi-perspective issuance corroboration for various validation checks.
There are several kinds of "verifications" or "validations" that get run as part of issuing a signed certificate. Correct me where I'm wrong, because I want to be very technically pedantic about this, but I think of the checks as being, roughly, DCV (domain control validation) and then CAA (certificate authority authorization) checking. With DCV the word "validation" is already in the name, and with CAA it's not, so I think many people in the PKI space do refer to CAA record validation as a "CAA check," and I've seen the occasional article where, perhaps for the sake of parallel terminology, people will talk of a "DCV check." But if I wanted to have an API with endpoints that carry out these various verifications, what is a good way to organize and name them? Perhaps DCV should be broken out into the various validation methods? And then CAA is just alongside those as "yet another record type" to check the presence of? Or maybe it's "/dcv-check" and "/caa-check" and then specifying in the request body what kind of DCV validation type to carry out (HTTP, etc.)? Please ruminate on this for me.
Gemini gave me the following options:
Option 1: Hierarchical Structure; clear separation of concerns, detailed endpoint names.
/validations/dcv
/validations/dcv/http
/validations/dcv/dns
/validations/dcv/email
...
/validations/caa
/validations/ocsp (or other validation types)
Option 2: Flat Structure with Query Parameters; simplicity, flexibility.
/validate (or /verify)
Query parameters:
type: dcv, caa, ocsp, etc.
method: http, dns, email, etc. (for DCV)
Option 3: Combined Approach; balance between hierarchy and simplicity.
/dcv
/dcv/http
/dcv/dns
/dcv/email
/caa
/ocsp (or other validation types)
/validate for generic validation requests with query parameters
Personally I wasn't fond of any of these, although if I had to choose between the above I'd go with some version of option 1 or option 3.
ChatGPT 4o gave me a very different answer, seemingly being led by my prompt a bit more, so I found myself biased towards it.
- Endpoint Structure Overview
DCV (Domain Control Validation): Since DCV involves different methods (HTTP, DNS, email, etc.), it makes sense to either have
separate endpoints for each method or a single endpoint with the method specified in the request.
CAA (Certificate Authority Authorization): CAA is more straightforward, typically involving a single check to see if the domain has specific CAA records that allow the issuance of a certificate by a CA.
- Naming Conventions
Consistency is key. If you choose to use the term "check" for CAA, it might be beneficial to apply it uniformly, even to DCV, despite "validation" already being in the name.
- Potential Endpoint Structures
-
Option A: Separate Endpoints for Each DCV Method
/dcv/http-check: Validates domain control via HTTP.
/dcv/dns-check: Validates domain control via DNS.
/dcv/email-check: Validates domain control via email.
/caa-check: Checks the CAA records for the domain.
Pros: Clear separation of concerns, Easy to manage and extend if new DCV methods are added.
Cons: Potentially more endpoints to maintain.
-
Option B: Unified DCV Endpoint with Method in Request
/dcv-check: Single endpoint for DCV validation. The method (HTTP, DNS, email) is specified in the request body or as a query parameter.
/caa-check: Same as in Option A.
Pros: Fewer endpoints, which might simplify API documentation, Easier to handle common validation logic.
Cons: Slightly more complex request handling. Less explicit endpoint naming.
I'm personally partial to ChatGPT's Option B (and using a request body parameter for the method), as that's the direction I've proposed taking the open-mpic reference implementation for now and it's very close to its current state (v1.0.1 has /validation and /caa-check paths). But I don't know if it's the best direction to take and figure this is one of the first things we should sort out anyway for a standard API.
This question has come up as part of open-mpic as well but we may as well discuss it all here to keep things synced up.
What should the endpoints be for the various validations/checks that we'll want performed? Due to the nature of the industry terms, there's no obviously elegant approach.
I figured an easy way to start the conversation would be to throw some ideas out there to beat up on. Gemini and ChatGPT were happy to oblige, though each gave me quite different results for my question about this. Here was my prompt:
Gemini gave me the following options:
Personally I wasn't fond of any of these, although if I had to choose between the above I'd go with some version of option 1 or option 3.
ChatGPT 4o gave me a very different answer, seemingly being led by my prompt a bit more, so I found myself biased towards it.
I'm personally partial to ChatGPT's Option B (and using a request body parameter for the method), as that's the direction I've proposed taking the open-mpic reference implementation for now and it's very close to its current state (v1.0.1 has
/validationand/caa-checkpaths). But I don't know if it's the best direction to take and figure this is one of the first things we should sort out anyway for a standard API.