Skip to content

feat(pki): add PKI/CMS signing scaffold and mock signing service - #14

Merged
makr-code merged 3 commits into
mainfrom
feature/pki-eidas
Nov 12, 2025
Merged

makr-code merged 3 commits into
mainfrom
feature/pki-eidas

Conversation

@makr-code

Copy link
Copy Markdown
Owner

This PR adds a scaffold for PKI/eIDAS work:

  • Added interface ().
  • Mock signing implementation using OpenSSL EVP ().
  • CMS-based signing service (, ) and unit test ().
  • Unit tests: , .
  • Docs stub: (planning/DoD).

What to review:

  • API of and the mock implementation (thread-safety, error handling).
  • CMS implementation uses OpenSSL / with DETACHED DER encoding — suitable for prototype and unit tests.

Next steps (recommended):

  1. Integrate with /Vault/HSM for real key material.
  2. Extend CMS to CAdES attributes (signing-time, signature-policy) for eIDAS compliance.
  3. Add HTTP handler and integration tests.

Note: this PR is intentionally a scaffold/proof-of-concept; production eIDAS compliance requires additional verification and policy configuration.

@makr-code
makr-code merged commit 6d60148 into main Nov 12, 2025
makr-code added a commit that referenced this pull request Dec 6, 2025
feat(pki): add PKI/CMS signing scaffold and mock signing service
Copilot AI added a commit that referenced this pull request Jan 7, 2026
Security fixes for remaining TODO items from ROCKSDB_WRAPPER_AUDIT_REPORT.md:

Issue #12 (Phase 2 - Reopen Leak):
- Add explicit close() before db_.reset() when database already open
- Prevents resource leak when reopening after failed open
- Ensures clean state before reinitialization

Issue #13 (Phase 2 - Snapshot Inconsistency):
- Add comprehensive documentation for snapshot lifecycle
- Clarify that snapshots are transaction-local
- Warn callers not to use snapshot pointers after transaction ends

Issue #14 (Phase 2 - write_options Cleanup):
- Already fixed: del() function now uses transactions (line 567)
- No direct write_options_ access, prevents use-after-free
- Consistent with MVCC transaction model

Issue #15 (Phase 3 - Infinite Loop in scanPrefix):
- Add prefix_same_as_start ReadOption for prefix scans
- Prevents over-iteration when prefix doesn't match
- RocksDB optimizes and auto-stops when prefix changes
- Protects against denial-of-service via excessive scanning

All 4 security gaps from audit report are now addressed.

Co-authored-by: makr-code <[email protected]>
@makr-code makr-code added this to the Phase 4: Advanced Features milestone Feb 21, 2026
Copilot AI added a commit that referenced this pull request Feb 24, 2026
…1476)

Add ml_serving.h / ml_serving.cpp implementing a unified MLServingClient
abstraction that wraps both ONNX Runtime (THEMIS_HAS_ONNX) and TensorFlow
Serving REST (THEMIS_HAS_TF_SERVING + THEMIS_HAS_CURL) backends.

Key changes:
- include/analytics/ml_serving.h: MLTensor, MLServingRequest/Response,
  IMLServingBackend, ONNXServingBackend, TFServingBackend, MLServingClient
- src/analytics/ml_serving.cpp: production implementation with graceful
  degradation when backends are absent at compile time
- cmake/Dependencies.cmake: ONNX Runtime auto-detection via find_package,
  THEMIS_ENABLE_TF_SERVING option
- tests/analytics/test_ml_serving.cpp: 30 unit tests covering both the
  available and unavailable code paths
- src/analytics/ROADMAP.md: mark Issue #1476 resolved
- src/analytics/README.md: document component #14 (ML Serving Integration)

Co-authored-by: makr-code <[email protected]>
@makr-code makr-code added this to the v1.0.2 milestone Mar 11, 2026
Copilot AI added a commit that referenced this pull request Mar 12, 2026
Copilot AI added a commit that referenced this pull request May 8, 2026
…resolved

- SphincsPlus (#14): GenerateKeyPairFn/SignFn/VerifyFn bridges with thread-safe
  static setters; Ed25519 simulation retained as default; fail-closed on throw
  for sign/verify; tests in tests/test_sphincsplus_bridge.cpp

- Argon2idKeyDerivationService (#31): DeriveKeyFn bridge; setDeriveKeyFn()
  checks before #if THEMIS_HAS_ARGON2 block; exception falls through to
  built-in; tests in tests/test_kdf_argon2_bridge.cpp

- NCCLVectorBackend (#67): AllReduceFn bridge; setAllReduceFn(); stub allReduce()
  delegates to fn when set (fail-closed on throw); tests in
  tests/test_nccl_allreduce_bridge.cpp

- OpenCLVectorBackend (#69): ComputeDistancesFn bridge; setComputeDistancesFn();
  stub computeDistances() delegates to fn (fail-closed on throw); tests in
  tests/test_opencl_bridge.cpp

- OneAPIVectorBackend (#70): ComputeDistancesFn bridge added to stub class in
  oneapi_backend.cpp; setComputeDistancesFn(); computeDistances() delegates to
  fn (fail-closed on throw)

- OPA adapter (#16): marked RESOLVED — WasmEvalFn bridge already present

- src/STUB_INVENTORY.md: rows #14/#16/#31/#67/#69/#70 marked RESOLVED with
  strikethrough pattern; footer updated to 177 resolved / 74 active / 🟡 30

Co-authored-by: Copilot <[email protected]>

Co-authored-by: makr-code <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant