Page MenuHomePhabricator

[Tunnelbroker] implement APNs config
Needs RevisionPublic

Authored by kamil on Fri, Jun 28, 4:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 12:47 AM
Unknown Object (File)
Sat, Jun 29, 12:47 AM
Unknown Object (File)
Sat, Jun 29, 12:46 AM
Subscribers

Details

Reviewers
bartek
marcin
Summary

Config to APNs similar to keyserver, but instead of reading private key from the file we pass it inside JSON (command line or AWS KMS secrets).

Keyserver config: link.

Depends on D12608

Test Plan
  1. Add config var from commandline and log it
  2. For staging (using env::var) going to test after deploying

Diff Detail

Repository
rCOMM Comm
Branch
apns-tb
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Fri, Jun 28, 6:24 AM
kamil edited the summary of this revision. (Show Details)
bartek requested changes to this revision.Mon, Jul 1, 1:58 AM

Can we either?:

  • Fully rely on clap parsing the env variable
  • Remove the env support in clap
services/tunnelbroker/src/config.rs
31
  1. This code means you can pass either --apns-config CLI param or env variable named "ENV_APNS_CONFIG".
  2. Separately you have crate::constants::ENV_APNS_CONFIG (which has value "APNS_CONFIG") and you're parsing it below (manually without clap).

If you go with 2 only, you can remove this line

services/tunnelbroker/src/main.rs
36–42

If you rely on clap parsing the env var, this shouldn't be necessary, #[arg(env = ENV_APNS_CONFIG)] should handle it for you

This revision now requires changes to proceed.Mon, Jul 1, 1:59 AM