usnistgov / ESV-Server

Entropy Source Validation Protocol and Server specifications
13 stars 12 forks source link

Server does not associate uploaded data with test session #15

Closed smuellerDD closed 2 years ago

smuellerDD commented 2 years ago

My client uploaded 3 data files with the following success indicators:

/esv/v1/entropyAssessments/121/dataFiles/430

  {
    "uploadType": "UploadDataFile",
    "status": "success",
    "dataLengthBytes": 1000000
  }

/esv/v1/entropyAssessments/121/dataFiles/431:

  {
    "uploadType": "UploadDataFile",
    "status": "success",
    "dataLengthBytes": 1000000
  }

/esv/v1/supportingDocumentation:

  {
    "sdId": 20049,
    "uploadType": "UploadSupportingDocumentation",
    "status": "success",
    "dataLengthBytes": 13188388,
    "accessToken": "xxx"
  }

During certify the client references them as:

"entropyId":"JENT",
"moduleId":12827,
"vendorId":11176,
"supportingDocumentation":[{
"sdId":20049,
"accessToken":"xxxx"

...

The server answers:

{
            "location": "indexPosition:1, EntropyAssessmentId: 121",
            "messageList": [
              "RawNoiseBits DataFile may not be available yet or an unexpected exception. Check server log for details.",
              "RestartBits DataFile may not be available yet or an unexpected exception. Check server log for details.",
              "ConditionedBits DataFile may not be available yet or an unexpected exception. Check server log for details."
            ]
          }

Note, the ES uses a vetted conditioning component and the server rightfully only requests the raw noise data which is fulfilled with the submissions above:

  {
    "url": "/esvp/v1/entropyAssessments/121",
    "createdOn": "2022-03-28T05:18:35.9788087-04:00",
    "expiresOn": "2022-03-28T05:18:35.9788096-04:00",
    "dataFileUrls": [
      {
        "rawNoiseBits": "/esvp/v1/entropyAssessments/121/dataFiles/430"
      },
      {
        "restartTestBits": "/esvp/v1/entropyAssessments/121/dataFiles/431"
      }
    ]
celic commented 2 years ago

Correct, we should not be expecting a "completed datafile" for vetted conditioning components. That appears to be the bug here... assuming there are no server-side errors in those test runs. If you Certify before the tests complete, we will throw an error. There is no "intelligent" queueing of the actions here.

smuellerDD commented 2 years ago

Am Montag, 28. März 2022, 19:42:11 CEST schrieb Chris Celi:

Hi Chris,

Correct, we should not be expecting a "completed datafile" for vetted conditioning components. That appears to be the bug here... assuming there are no server-side errors in those test runs. If you Certify before the tests complete, we will throw an error. There is no "intelligent" queueing of the actions here.

After re-starting the certify process this morning with the testID 121 submitted yesterday (and refreshing all auth tokens), I still get the same error as yesterday. This makes me believe that some issue is lingering in the ESV server.

In any case, if there is no proper queueing mechanism (yet?), I would like to ask you to return an unambiguous error indicator that identifies that the number crunching is ongoing. In case there is, please disregard my comment.

Thanks.

Ciao Stephan

celic commented 2 years ago

There is. Run a GET on the data file url.

On Tue, Mar 29, 2022, 3:01 AM smuellerDD @.***> wrote:

Am Montag, 28. März 2022, 19:42:11 CEST schrieb Chris Celi:

Hi Chris,

Correct, we should not be expecting a "completed datafile" for vetted conditioning components. That appears to be the bug here... assuming there are no server-side errors in those test runs. If you Certify before the tests complete, we will throw an error. There is no "intelligent" queueing of the actions here.

After re-starting the certify process this morning with the testID 121 submitted yesterday (and refreshing all auth tokens), I still get the same error as yesterday. This makes me believe that some issue is lingering in the ESV server.

In any case, if there is no proper queueing mechanism (yet?), I would like to ask you to return an unambiguous error indicator that identifies that the number crunching is ongoing. In case there is, please disregard my comment.

Thanks.

Ciao Stephan

— Reply to this email directly, view it on GitHub https://github.com/usnistgov/ESV-Server/issues/15#issuecomment-1081486901, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATQXENVMWAXU43CZXF26CLVCKTCZANCNFSM5R2QQ6JA . You are receiving this because you commented.Message ID: @.***>

smuellerDD commented 2 years ago

Am Dienstag, 29. März 2022, 14:56:25 CEST schrieb Chris Celi:

Hi Chris,

There is. Run a GET on the data file url.

Hm, what additional information do you think I get from that:

  {
    "id": 433,
    "status": "Uploaded",
    "sha256": 
"3bf95db5864e17b66ac7629aa03a05d11c3ad057a0f0a341e32e9cb40872b1f4"
  }

Thanks Stephan Ciao Stephan

smuellerDD commented 2 years ago

Am Dienstag, 29. März 2022, 14:56:25 CEST schrieb Chris Celi:

Hi Chris,

There is. Run a GET on the data file url.

I see now, you seem to have updated the certify response:

            "location": "indexPosition:1, EntropyAssessmentId: 122",
            "messageList": [
              "RawNoiseBits: dataFileId 432: Results are not yet available.",
              "RawNoiseBits: dataFileId 432: Status is not Run Successful.",
              "RestartBits: dataFileId 433: Results are not yet available.",
              "RestartBits: dataFileId 433: Status is not Run Successful."
            ]

That is certainly helpful

Ciao Stephan

celic commented 2 years ago

Great. I'll look into the runs failing.

Chris

On Tue, Mar 29, 2022, 2:15 PM smuellerDD @.***> wrote:

Am Dienstag, 29. März 2022, 14:56:25 CEST schrieb Chris Celi:

Hi Chris,

There is. Run a GET on the data file url.

I see now, you seem to have updated the certify response:

"location": "indexPosition:1, EntropyAssessmentId: 122",
"messageList": [
"RawNoiseBits: dataFileId 432: Results are not yet available.",
"RawNoiseBits: dataFileId 432: Status is not Run Successful.",
"RestartBits: dataFileId 433: Results are not yet available.",
"RestartBits: dataFileId 433: Status is not Run Successful."
]

That is certainly helpful

Ciao Stephan

— Reply to this email directly, view it on GitHub https://github.com/usnistgov/ESV-Server/issues/15#issuecomment-1082220839, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATQXEKN66IM4JOXZ5U6VD3VCNCETANCNFSM5R2QQ6JA . You are receiving this because you commented.Message ID: @.***>

smuellerDD commented 2 years ago

The test runs are now complete. Thanks

The server responds with the following indicating success:

  {
    "status": "received",
    "information": {
      "messageList": [
        "moduleId name is Jitter RNG (Generic C)."
      ],
      "entropyAssessmentsReferences": {
        "elementList": [
          {
            "location": "indexPosition:1, EntropyAssessmentId: 122",
            "messageList": [
              "oeId name is Fedora 32 on Intel Broadwell i7."
            ]
          }
        ]
      }

Where would I find the final verdict like a certificate reference? Or how would I interpret the result?

celic commented 2 years ago

On Prod, you would receive an email from the CMVP stating the submission was received and that a manual entropy review will begin shortly. For Demo, this is the end of the line, the "received" status. The "received" status will not be updated on Prod, everything will be handled similar to the module review process from there. Two reviewers will look at the entropy analysis report and other documentation and eventually arrive at a draft certificate for the lab.

smuellerDD commented 2 years ago

Thanks for the explanation and the confirmation that a full complete round of testing was conducted.