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)
Sat, Nov 23, 11:42 PM
Unknown Object (File)
Sat, Nov 23, 12:57 PM
Unknown Object (File)
Sat, Nov 23, 12:57 PM
Unknown Object (File)
Thu, Nov 21, 11:36 PM
Unknown Object (File)
Thu, Nov 14, 12:23 PM
Unknown Object (File)
Sun, Oct 27, 3:18 AM
Unknown Object (File)
Sun, Oct 27, 3:18 AM
Unknown Object (File)
Sun, Oct 27, 3:18 AM
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
No Lint Coverage
Unit
No Test Coverage

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