[FEATURE] Add config file support for certificate pins
- Dominant language
- C++
- Stars
- 14
- Forks
- 12
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 3
Description
## Summary
Add runtime configuration file support for certificate pins to complement existing hardcoded defaults.
## Motivation
- Enable pin updates without recompilation in production
- Support emergency certificate rotations
- Allow environment-specific pins (dev/staging/prod)
## Proposed Solution
Implement hybrid approach in `CertificatePinner::initializeDefaultPins()`:
1. Try loading from `config/certificate_pins.json` first
2. Fall back to hardcoded pins if file doesn't exist
3. Maintain backward compatibility
## Implementation Notes
- Documentation already covers this approach (CERTIFICATE_PINNING.md:108-130)
- Keep hardcoded pins as safe defaults
- Add JSON schema validation for config file
## Phase
Phase 4 - Production Deployment
## References
- `core/utils/CertificatePinner.cpp:166-187`
- `docs/security/CERTIFICATE_PINNING.md`
Contributor guide
Research direction
Start with core/utils/CertificatePinner.cpp:166-187 and read CertificatePinner::initializeDefaultPins(). Review docs/security/CERTIFICATE_PINNING.md:108-130 for the documented configuration approach. Done means config/certificate_pins.json is supported with JSON schema validation, hardcoded pins remain the fallback, and existing behavior stays compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100