Page MenuHomePhabricator

Allow for devices to register as a keyserver
ClosedPublic

Authored by jon on Jul 26 2023, 5:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 9:54 AM
Unknown Object (File)
Sat, Nov 23, 9:54 AM
Unknown Object (File)
Sat, Nov 2, 6:56 PM
Unknown Object (File)
Sun, Oct 27, 3:42 PM
Unknown Object (File)
Oct 3 2024, 3:26 AM
Unknown Object (File)
Oct 2 2024, 10:24 AM
Unknown Object (File)
Oct 2 2024, 4:26 AM
Unknown Object (File)
Oct 2 2024, 1:45 AM
Subscribers

Details

Summary

Previously, all devices were being registered as
a "client" regardless.

https://linear.app/comm/issue/ENG-4521

Depends on D8627

Test Plan

Integration tests

Register keyserver locally, and ensure it displays as a "keyserver" deviceType.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 26 2023, 5:56 PM
Harbormaster failed remote builds in B21237: Diff 29081!
keyserver/addons/rust-node-addon/src/identity_client/register_user.rs
45 ↗(On Diff #29081)

even though tonic generates an Enum, protobuf still expects an i32

services/identity/src/database.rs
71–75 ↗(On Diff #29081)

I assumed we would want to differentiate between these three. But I could be wrong.

77–93 ↗(On Diff #29081)

Not sure if there's a cleaner way, but this is what first came to mind. I don't personally like that I'm duplicating the value to enum mapping.

1007 ↗(On Diff #29081)

This was the previous hardcoding of the value.

shared/protos/identity_client.proto
108 ↗(On Diff #29081)

proto3 requires this to start at 0

While we're here, should we add codeVersion?

While we're here, should we add codeVersion?

The login/registration events should really only occur when the device needs to retrieve a user_id or commServicesAccessToken, I don't think codeVersion will reflect an up-to-date value.

Rust LGTM, not much context on splitting the client device type into native and web - was this discussed anywhere?. Makes sense to me though.

This revision is now accepted and ready to land.Aug 1 2023, 10:52 AM
  1. We need to make sure that the identity service has the codeVersion of the client. When we launch the device list work, the identity service will need to be able to identify whether a given client is able to support the "new" workflow and function as a primary device. This is just one example of many... it's critical that Comm services are aware of the client version
    • @jon mentioned that this value won't be up-to-date, but that's better than nothing. If in the future we need a more up-to-date value, we can have newer clients call some other identity service RPC when their version changes
  2. As discussed offline, let's break this down into 'ios' | 'android' | 'web' | 'macos' | 'windows'
native/native_rust_library/src/lib.rs
234 ↗(On Diff #29446)

not sure how to get this to determine DeviceType::iOS vs DeviceType::Android

native/native_rust_library/src/lib.rs
234 ↗(On Diff #29446)

A compile-time flag set per platform?

We need to make sure that the identity service has the codeVersion of the client. When we launch the device list work, the identity service will need to be able to identify whether a given client is able to support the "new" workflow and function as a primary device. This is just one example of many... it's critical that Comm services are aware of the client version

I think this is out-of-scope for this diff, which is just trying to fix a shortcoming.

https://linear.app/comm/issue/ENG-4587 is tracking this issue

As discussed offline, let's break this down into 'ios' | 'android' | 'web' | 'macos' | 'windows'

Added to current goal as https://linear.app/comm/issue/ENG-4608/

native/native_rust_library/src/lib.rs
234 ↗(On Diff #29446)

We're now tracking the goal of making identity service aware of client codeVersion in ENG-4598