chizy7 / chizy7/PinnacleMM

[FEATURE] Add config file support for certificate pins

Open
#39 1 comment 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.