Skip to content

test: generate mTLS certificate at runtime - #742

Merged
debba merged 2 commits into
TabularisDB:mainfrom
igorzelaya-io:fix-715-runtime-test-certificate
Sep 14, 2026
Merged

debba merged 2 commits into
TabularisDB:mainfrom
igorzelaya-io:fix-715-runtime-test-certificate

Conversation

@igorzelaya-io

@igorzelaya-io igorzelaya-io commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes #715

Summary

  • replace the committed certificate/private-key fixture with a self-signed P-256 EC certificate generated at test runtime
  • preserve the existing PEM-loading and PostgreSQL TLS connector assertions
  • reuse the existing openssl dependency, so the fix adds no dependency or lockfile changes

Verification

  • cargo test --manifest-path src-tauri/Cargo.toml test_load_client_auth_from_pem_valid --lib --locked — 1 passed, 0 failed; focused test completed in 0.02s
  • gitleaks dir src-tauri/src/pool_manager_tests.rs --no-banner --redact --verbose — no leaks found
  • git diff --check — passed
  • GitNexus change analysis — low risk, 0 affected processes

History note

This removes the static private key from the current source tree and prevents future copies of the fixture from being committed. The historical blob remains in existing commits unless maintainers separately choose an allowlist or coordinated history rewrite.

Comment thread src-tauri/src/pool_manager_tests.rs Resolved
@kilo-code-bot

kilo-code-bot Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The previous suggestion (slow 2048-bit RSA key generation) was addressed in the latest commit by switching the test fixture to an EC P-256 key (X9_62_PRIME256V1), which keeps the PEM-loading and connector-builder assertions identical while remaining fast and deterministic.

Files Reviewed (1 file)
  • src-tauri/src/pool_manager_tests.rs
Previous Review Summary (commit 05aadce)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 05aadce)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
src-tauri/src/pool_manager_tests.rs 1074 Generating a 2048-bit RSA key in every test run is slow
Files Reviewed (1 file)
  • src-tauri/src/pool_manager_tests.rs - 1 issue

Fix these issues in Kilo Cloud


Reviewed by glm-5.2 · Input: 0 · Output: 0 · Cached: 0

@debba

debba commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Thanks a lot for this contribution, @igorzelaya-io! Replacing the committed fixture with a certificate generated at test runtime is exactly the right fix, and the verification steps in the description made the review straightforward.

Please keep participating, contributions like this are very welcome. If you'd like to chat with the maintainers and the rest of the community, feel free to join our Discord server: https://discord.com/invite/K2hmhfHRSt

Merging now.

@debba
debba merged commit e5ce805 into TabularisDB:main Sep 14, 2026
1 check passed
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.

Hardcoded RSA test private key committed (gitleaks: private-key)

2 participants