Page MenuHomePhabricator

[Identity] Allow for tunnelbroker endpoint to be configured
ClosedPublic

Authored by jon on Aug 3 2023, 10:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 10:41 PM
Unknown Object (File)
Tue, Apr 16, 5:33 AM
Unknown Object (File)
Mon, Apr 15, 11:51 PM
Unknown Object (File)
Mon, Apr 15, 4:05 PM
Unknown Object (File)
Sun, Apr 14, 11:59 PM
Unknown Object (File)
Sat, Apr 13, 4:02 PM
Unknown Object (File)
Sat, Apr 13, 11:06 AM
Unknown Object (File)
Fri, Apr 12, 6:24 PM
Subscribers

Details

Summary

Identity service needs some way to communicate with tunnelbroker
when issueing device requests. Currently this is limited to just
"refresh onetime keys", however, will likely include more messages in the
future.

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

Depends on D8722

Test Plan
cd services/identity
cargo run -- server
# Should see output that it's falling back to localhost

export TUNNELBROKER_GRPC_ENDPOINT=https://tunnelbroker.staging.commtechnologies.org:50051
cargo run -- server
# Should see output that it's now using the other endpoint

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks good, another (perhaps more idiomatic) way would be to extend the clap config for server subcommand and using the #[arg(env = TUNNELBROKER_GRPC_ENDPOINT)] to give env var config possibility. However, other options would need to be migrated as well (localstack endpoint, keyserver public key etc) so definitely not a purpose of this diff, rather a follow-up.

This revision is now accepted and ready to land.Aug 4 2023, 2:37 AM