Commit adada0a
committed
Add TLS provider registry with pluggable cert loaders
Replace the inline TLS config (insecure bool + optional cert/key paths)
with a tagged-union YAML schema (`type: insecure | file | directory`)
and a factory-based TLS provider registry that decouples config
resolution from concrete TLS implementations.
Key changes:
Config schema (parsed_config.h):
- Replace flat ParsedTlsConfig with ParsedTlsInsecure, ParsedTlsFile,
and ParsedTlsDirectory variants inside an rfl::TaggedUnion keyed on
"type".
TLS provider hierarchy (include/o_rly/tls/, src/tls/):
- TlsCertProvider: base interface producing a FizzServerContext
- TlsCertLoader: convenience base for providers that load certs upfront
- InsecureCertProvider: compiled-in self-signed cert for development
- FileCertLoader: single cert+key pair from PEM files
- DirectoryCertLoader: SNI-based selection from a directory of pairs
- FizzContext factory helpers (ALPN building, cert manager assembly)
- TlsProviderRegistry: string-keyed factory map for provider plugins
- registerBuiltinTlsProviders: registers the three built-in factories
Config resolution (config_resolver.cpp):
- resolveConfig() now takes a TlsProviderRegistry reference
- Extracts type tag from the variant via rfl::Literal Tag, looks up
the factory, invokes it, and stores the resulting shared_ptr<TlsCertProvider>
in ListenerConfig (replacing the old TlsMode variant)
ORelayServer:
- Collapsed two constructors (insecure vs cert/key) into one that
accepts a pre-built FizzServerContext
main.cpp:
- Creates registry, registers builtins, passes to config init pipeline
- Calls tlsProvider->createContext() to get FizzServerContext before
constructing the server1 parent ee04449 commit adada0a
36 files changed
Lines changed: 1371 additions & 194 deletions
File tree
- deps
- include/o_rly
- config
- loader
- tls
- src
- config
- tls
- tests
- config
- tls
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
| |||
118 | 126 | | |
119 | 127 | | |
120 | 128 | | |
| 129 | + | |
121 | 130 | | |
122 | 131 | | |
123 | 132 | | |
| |||
138 | 147 | | |
139 | 148 | | |
140 | 149 | | |
| 150 | + | |
141 | 151 | | |
142 | 152 | | |
143 | 153 | | |
| |||
189 | 199 | | |
190 | 200 | | |
191 | 201 | | |
| 202 | + | |
192 | 203 | | |
193 | 204 | | |
194 | 205 | | |
| |||
198 | 209 | | |
199 | 210 | | |
200 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
201 | 233 | | |
202 | 234 | | |
203 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
- .github/workflows/omoq-auto-merge-sync.yml-108
- .github/workflows/openmoq-auto-merge-sync.yml+88
- .github/workflows/openmoq-ci.yml+2-61
- .github/workflows/openmoq-publish-artifacts.yml+35-27
- .github/workflows/openmoq-upstream-sync.yml+19-102
- build/deps/github_hashes/facebook/folly-rev.txt+1-1
- build/deps/github_hashes/facebook/mvfst-rev.txt+1-1
- build/deps/github_hashes/facebook/proxygen-rev.txt+1-1
- build/deps/github_hashes/facebook/wangle-rev.txt+1-1
- build/deps/github_hashes/facebookincubator/fizz-rev.txt+1-1
- build/fbcode_builder/getdeps/builder.py+1-5
- build/fbcode_builder/manifests/fbthrift-python+2-1
- build/fbcode_builder/manifests/folly-python+1-1
- build/fbcode_builder/manifests/gflags+6-1
- build/fbcode_builder/manifests/glog+6-1
- build/fbcode_builder/manifests/libaio-python-25
- build/fbcode_builder/manifests/libiberty-python-2
- build/fbcode_builder/manifests/libsodium-1
- build/fbcode_builder/manifests/libunwind-3
- build/fbcode_builder/manifests/moxygen-1
- build/fbcode_builder/manifests/picoquic-24
- build/fbcode_builder/manifests/proxygen-python+45
- build/fbcode_builder/manifests/xxhash-3
- build/fbcode_builder/manifests/xz-3
- build/fbcode_builder/manifests/zlib-python+1-1
- cmake/moxygen-config.cmake.in-6
- moxygen/CMakeLists.txt-3
- moxygen/MoQSession.cpp-6
- moxygen/openmoq/CMakeLists.txt-1
- moxygen/openmoq/transport/CMakeLists.txt-9
- moxygen/openmoq/transport/pico/CMakeLists.txt-21
- moxygen/openmoq/transport/pico/MoQPicoQuicServer.cpp-352
- moxygen/openmoq/transport/pico/MoQPicoQuicServer.h-52
- moxygen/openmoq/transport/pico/PicoQuicExecutor.cpp-268
- moxygen/openmoq/transport/pico/PicoQuicExecutor.h-58
- moxygen/openmoq/transport/pico/PicoQuicWebTransport.cpp-820
- moxygen/openmoq/transport/pico/PicoQuicWebTransport.h-177
- moxygen/openmoq/transport/pico/README.md-247
- moxygen/openmoq/transport/pico/sample/CMakeLists.txt-7
- moxygen/openmoq/transport/pico/sample/PicoRelayServer.cpp-102
- moxygen/test/MoQSessionTests.cpp-53
- openmoq/README.md+15-22
- openmoq/scripts/create-release.sh+56-34
- standalone/CMakeLists.txt+4-84
- standalone/README.md-1
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | | - | |
13 | | - | |
| 11 | + | |
14 | 12 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 13 | | |
25 | 14 | | |
26 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
16 | 13 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 14 | + | |
20 | 15 | | |
21 | 16 | | |
22 | 17 | | |
| |||
26 | 21 | | |
27 | 22 | | |
28 | 23 | | |
29 | | - | |
| 24 | + | |
30 | 25 | | |
31 | 26 | | |
32 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | | - | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
34 | 57 | | |
35 | 58 | | |
36 | 59 | | |
37 | | - | |
| 60 | + | |
38 | 61 | | |
39 | 62 | | |
40 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments