atsign-foundation / at_server

The software implementation of Atsign's core technology
https://docs.atsign.com
BSD 3-Clause "New" or "Revised" License
39 stars 13 forks source link

inconsistent formats in server response for enrollment:list vs enrollment:fetch #1928

Closed gkc closed 2 months ago

gkc commented 2 months ago

Describe the bug

enroll:fetch and enroll:list return different JSON structure the same enrollmentId

Steps to reproduce

In a response from enroll:list, the enrollment looks like this

"f02825db-afb0-4726-8459-5adce1e267ee.new.enrollments.__manage@alice":{
  "appName":"test",
  "deviceName":"dev1",
  "namespace":{"buzz":"rw"},
  "encryptedAPKAMSymmetricKey":"[....]",
  "status":"revoked"
}

The same enrollment looks like this from enroll:fetch

{
  "sessionId":"_ca2bc326-d6e1-48af-8af3-e1c2cd818177",
  "appName":"test",
  "deviceName":"dev1",
  "namespaces":{"buzz":"rw"},
  "apkamPublicKey":"[...]",
  "requestType":"newEnrollment",
  "approval":{"state":"revoked"},
  "encryptedAPKAMSymmetricKey":"[...]"
}

Expected behavior

Basic structure should be the same. Note in particular