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

fix: In enrollment notification notify only enrollmentId instead of e… #1855

Closed sitaram-kalluri closed 5 months ago

sitaram-kalluri commented 5 months ago

- What I did

- How to verify it

- Description for the changelog

gkc commented 5 months ago

@sitaram-kalluri

Unless you can demonstrate that the current (client side) code will function, unchanged, correctly against this change, please instead add a new field to the notification rather than changing what's already there; we can do another server change in future once we have updated all client-side code

Also - the notification's key has to include the full namespace; if it doesn't then all apps would receive the enrollment request notifications

Please add a field to the notification

Or better still, just change the client side library so that it provides some convenience code to get the enrollment id

sitaram-kalluri commented 5 months ago

@gkc : The notification already contains the "enrollmentId" field, which I overlooked. I will inform @sachins-geekyants about this. Closing the PR.

Attaching the sample notification

notification: {"id":"ef909549-499b-4355-bc27-a049c7c7082e","from":"@sitaram","to":"@sitaram","key":"2f351053-7515-4bad-b188-87aa66a210cd.new.enrollments.__manage","value":"{\"encryptedApkamSymmetricKey\":\"a/79nCji+E1UvpOvY7bGEtcMrH1RlW0KoCyDFyuESRRORaIDbBMsYESBzlCzilTlijyWA4lvocPhEsuava68VrP+d14xbNEPnQGUAslf/OE3I20I/MMsNBuDd9w/Km+ISEyR6W1ksXepREewcNpm6tcEpr+XKYlZic9kZEdc4AAn3od/uktGa5WpdioNqB5jQHJ/UHKT73vk38U8DFFOLj6/y6ot9IiN93jxy2USMwTjDu6sX8YCtPyw0rCMQ7dgYvkazEle2BjZt1UqSFULBqJMWVPluuF+QoC1F2Geh0svBwD1b2GmEOp1WfuGWTJisvaO0TO9KvEqq9pv+CWY9w==\",\"appName\":\"wavi\",\"deviceName\":\"mydevice\",\"namespace\":null}","operation":"update","epochMillis":1711009514695,"messageType":"MessageType.key","isEncrypted":false,"metadata":{"encKeyName":null,"encAlgo":null,"ivNonce":null,"skeEncKeyName":null,"skeEncAlgo":null}}