CCF icon indicating copy to clipboard operation
CCF copied to clipboard

Test conformance of gov API implementation to documented OpenAPI descriptions

Open eddyashton opened this issue 2 years ago • 5 comments

Hoping to do this automatically, perhaps with a generated client or OpenAPI-based fuzzer.

2 known discrepancies noted in #5660, which should be modified in the OpenAPI (TypeSpec) source:

  • previousServiceCreation in /service/info. Decide whether this is a version, TxID, or cert
  • SNP endorsements in /service/join-policy. Feed info is a known object, not a single string

eddyashton avatar Sep 27 '23 12:09 eddyashton

2 further discrepancies, added in #5698:

  • /members and /member/{memberId} responses include publicEncryptionKey, if present
  • /jwk response includes a keys field, describing current JWKs and not merely their issuers

eddyashton avatar Sep 29 '23 14:09 eddyashton

Hoping to do this automatically, perhaps with a generated client or OpenAPI-based fuzzer.

There was an issue related to fuzzing some time ago #1199 might be helpful to link it here

ivarprudnikov avatar Oct 13 '23 12:10 ivarprudnikov

  • Acks.StateDigest response currently returns stateDigest and memberId, but spec says single field called digest

eddyashton avatar Oct 30 '23 16:10 eddyashton

previousServiceCreation in /service/info. Decide whether this is a version, TxID, or cert

This is exposing previous_service_identity_version, which is set during the transition to open the service.

The last term of the previous service and the cert will both require a historical query, which will have much more of an API impact that we want to have for this iteration, so it's going to be the version.

achamayou avatar Nov 15 '23 14:11 achamayou

#6118 proposes adding 2 new endpoints, which should be added to the TypeSpec/OpenAPI:

  • GET /gov/service/users - Returns list of users
  • GET /gov/service/users/{userId} - Returns single users

Where the user schema is an object containing {userId = str, certificate = PEM str, userData = null | JSON}.

eddyashton avatar Apr 10 '24 14:04 eddyashton