-
Notifications
You must be signed in to change notification settings - Fork 12
fix: [FEATURE] Add config file support for certificate pins #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "$schema": "./certificate_pins.schema.json", | ||
| "pins": { | ||
| "api.pinnaclemm.exchange": [ | ||
| "REPLACE_WITH_SPKI_SHA256_BASE64_PIN_01", | ||
| "REPLACE_WITH_SPKI_SHA256_BASE64_PIN_02" | ||
| ], | ||
| "ws.pinnaclemm.exchange": [ | ||
| "REPLACE_WITH_SPKI_SHA256_BASE64_PIN_03", | ||
| "REPLACE_WITH_SPKI_SHA256_BASE64_PIN_04" | ||
| ] | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "title": "Certificate Pins Configuration", | ||
| "description": "Runtime certificate pins. Hosts not listed here fall back to the built-in default pins.", | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "$schema": { | ||
| "type": "string" | ||
| }, | ||
| "pins": { | ||
| "type": "object", | ||
| "description": "Map of host (or hostname pattern) to a list of certificate pins.", | ||
| "minProperties": 1, | ||
| "additionalProperties": { | ||
| "type": "array", | ||
| "minItems": 1, | ||
| "items": { | ||
| "type": "string", | ||
| "minLength": 1, | ||
| "description": "Certificate pin (SPKI SHA-256 digest, base64-encoded)." | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "required": ["pins"] | ||
|
Comment on lines
+6
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift Align the configuration contract and enforce valid pin values. The runtime expects a top-level 📍 Affects 1 file
🤖 Prompt for AI Agents |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
Replace the placeholder pins before shipping.
These values are not Base64-encoded SHA-256 digests. If
core/utils/CertificatePinner.cppLines 78-120 loads this file, it passes them toaddPinas runtime pins. They cannot match the public-key digest of either endpoint, so this configuration cannot support certificate rotation. Replace all four values with verified SPKI SHA-256 Base64 pins for the named hosts.🤖 Prompt for AI Agents