Page MenuHomePhabricator

Implement method to query identity service from the NSE
ClosedPublic

Authored by marcin on Jul 5 2024, 11:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 3:49 AM
Unknown Object (File)
Fri, Nov 22, 1:34 AM
Unknown Object (File)
Fri, Nov 22, 1:23 AM
Unknown Object (File)
Fri, Nov 22, 12:12 AM
Unknown Object (File)
Fri, Nov 22, 12:08 AM
Unknown Object (File)
Thu, Nov 21, 6:24 PM
Unknown Object (File)
Wed, Nov 20, 3:42 AM
Unknown Object (File)
Wed, Nov 20, 3:42 AM
Subscribers

Details

Summary

This differential enables the NSE to call idenity service to query for device identity keys

Test Plan
  1. Apply patch from D12673 test plan.
  2. Apply this patch: https://gist.github.com/marcinwasowicz/2ff63cc0989b19990cbc8924113891c2
  3. Set NSE debugger to stop at the line that checks for error from identity request
  4. Send notification from web client
  5. Examine content of the response from identity service

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 5 2024, 11:36 AM
Harbormaster failed remote builds in B30172: Diff 42083!
marcin requested review of this revision.Jul 8 2024, 2:31 AM
native/ios/Comm/CommIOSServices/CommIOSServicesClient.mm
7–15 ↗(On Diff #42083)

I don't love that these are configured separately from the rest of the app. We went through a lot of effort to make sure that the Rust code in native_rust_library respects the same configs as the rest of the JS app (eg. native/facts/identity_service_config.json)

marcin removed a reviewer: tomek. marcin added 1 blocking reviewer(s): bartek.Jul 15 2024, 8:09 AM
native/ios/Comm/CommIOSServices/CommIOSServicesClient.mm
14 ↗(On Diff #42083)

Missing semicolon here

The HTTP request-response logic looks good; it's analogous to the existing Blob GET request logic.

Accepting but please remember to fix that semicolon. Otherwise, release builds will fail.

native/ios/Comm/CommIOSServices/CommIOSServicesClient.mm
7–15 ↗(On Diff #42083)

Good point.
The proper way of doing this would be to create a script that reads the native/facts/identity_service_config.json file (and others similiar) and generates a header file named e.g. CommServices.h that is #imported here.
The script should be run as a Xcode build phase (similar to what we do to build native-rust-lib).

This is out of this diff's scope but we should create a follow-up task.

This revision is now accepted and ready to land.Jul 16 2024, 4:41 AM

The HTTP request-response logic looks good; it's analogous to the existing Blob GET request logic.

Accepting but please remember to fix that semicolon. Otherwise, release builds will fail.

Created follow up task to track