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, Dec 14, 10:28 PM
Unknown Object (File)
Sat, Dec 14, 10:28 PM
Unknown Object (File)
Sat, Dec 14, 10:28 PM
Unknown Object (File)
Sat, Dec 14, 10:28 PM
Unknown Object (File)
Sat, Dec 14, 10:27 PM
Unknown Object (File)
Sat, Dec 14, 10:08 PM
Unknown Object (File)
Fri, Dec 13, 1:04 PM
Unknown Object (File)
Mon, Nov 25, 11:09 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
Branch
jonringer/keyserver-tunnelbroker (branched from master)
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