Commit 9cab6d5
authored
fix: separate server connection config (#1778)
closes #1640
# Description
The PR separates server-side connection requirements from client
connection policy by introducing `ServerConnectionConfig` as a dedicated
type, distinct from `ClientConfig`.
Previously, the full `ClientConfig` (including client-local settings
like Spire socket paths, backoff, keepalive) was serialized and stored
in the database and passed over the wire. Now the control plane stores
and transmits only what the server requires — endpoint, TLS flag, and
auth method — while the controller merges those requirements onto its
own local ClientConfig when opening a connection.
# Changes
- Dedicated `ServerConnectionConfig` type containing only remote
connection related fields
- In `ConnectionDetails` db schema `SpireMtls` nested field is replaced
with three flat fields (`tls_required`, `auth_method` and
`spire_trust_domain`)
- `generate_config_data` simplified: unused `src_node` removed
- `tls_required == true` is now mandatory if `auth_method` is Spire
## Type of Change
- [ ] Bugfix
- [ ] New Feature
- [x] Breaking Change
- [ ] Refactor
- [ ] Documentation
- [ ] Other (please describe)
## Checklist
- [x] I have read the [contributing
guidelines](/agntcy/repo-template/blob/main/CONTRIBUTING.md)
- [x] Existing issues have been referenced (where applicable)
- [x] I have verified this change is not present in other open pull
requests
- [x] Functionality is documented
- [x] All code style checks pass
- [x] New code contribution is covered by automated tests
- [x] All new and existing tests pass
---------
Signed-off-by: Mark Marton <mark.p.marton@gmail.com>
Signed-off-by: Mark Marton <30534230+markpmarton@users.noreply.github.com>1 parent 3d232c3 commit 9cab6d5
25 files changed
Lines changed: 1623 additions & 366 deletions
File tree
- crates
- config/src
- control-plane
- src
- db
- sqlite
- route_service
- services
- tests
- config-files
- controller
- nodes
- controller/src
- proto
- proto/controller/v1
- src/gen
- tests/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments