Current State
The config loading system is hand-rolled:
JettyConfigurationLoader — 3-tier YAML loader (base → local override → env vars)
JettyConfigurationBuilder — casts raw Map<String, Object> into domain objects
Pain Points
- Partial env var coverage — only simple scalar keys; complex structures (whitelist filters, regex patterns) can't be overridden via env vars
- No profiles — no
git-proxy-prod.yml / git-proxy-dev.yml activation
- No type safety — raw
Map<String, Object> throughout; type mismatches surface at runtime
- No validation — bad config silently produces defaults or runtime exceptions
- No cloud config integration — no Vault, AWS SSM, or Kubernetes Secrets support
Proposed Solution: Replace with Gestalt
Gestalt is a lightweight, container-free config library that covers all current gaps natively.
| Feature |
Today |
Gestalt |
| YAML loading |
✅ |
✅ |
| File merging / layering |
✅ manual |
✅ native |
| Env var overrides |
⚠️ partial |
✅ full |
| Profile activation |
❌ |
✅ |
| Type-safe POJO binding |
❌ |
✅ |
| Startup validation (JSR-380) |
❌ |
✅ |
| Cloud config (Vault, SSM, K8s) |
❌ |
✅ |
Tasks
Current State
The config loading system is hand-rolled:
JettyConfigurationLoader— 3-tier YAML loader (base → local override → env vars)JettyConfigurationBuilder— casts rawMap<String, Object>into domain objectsPain Points
git-proxy-prod.yml/git-proxy-dev.ymlactivationMap<String, Object>throughout; type mismatches surface at runtimeProposed Solution: Replace with Gestalt
Gestalt is a lightweight, container-free config library that covers all current gaps natively.
Tasks
gestalt-core+gestalt-yamldependencies tojgit-proxy-server/build.gradleServerConfig,ProviderConfig,CommitConfig,DatabaseConfig) to replaceMap<String, Object>casts inJettyConfigurationBuilderJettyConfigurationLoaderwith aGestaltBuildercomposition (base → profile → local override → env vars)JettyConfigurationBuilder— replace all raw map casts withgestalt.getConfig(...)GitProxyJettyApplicationandGitProxyWithDashboardApplicationto use the Gestalt-backed loaderGITPROXY_PROFILEenv var