Skip to content

Implement Persistent, Auto-Renewing Local CA PKI#183

Open
tyronechrisharris wants to merge 112 commits intoopensensorhub:masterfrom
tyronechrisharris:jules-sync-23412011801
Open

Implement Persistent, Auto-Renewing Local CA PKI#183
tyronechrisharris wants to merge 112 commits intoopensensorhub:masterfrom
tyronechrisharris:jules-sync-23412011801

Conversation

@tyronechrisharris
Copy link
Copy Markdown

@tyronechrisharris tyronechrisharris commented Mar 22, 2026

This PR transitions the system from an ephemeral Root CA (where the private key was destroyed after leaf generation) to a Persistent Local CA architecture.

Key changes include:

  1. Refactored Utility: EphemeralCAUtility.java is now LocalCAUtility.java.
  2. Persistence: The Root CA private key is now securely stored in osh-keystore.p12 under the alias root-ca. It is encrypted using the auto-generated password in .app_secrets.
  3. Automated Renewal: SensorHubWrapper now calls LocalCAUtility.checkAndRenewCertificates() on every boot. If the jetty leaf certificate is within 30 days of expiration, it is automatically regenerated and signed by the persistent Root CA.
  4. Lifespan Changes: Root CA now has a 20-year lifespan to minimize manual trust-store updates for operators. Leaf certificates remain at 1 year.
  5. Centralized Management: Launch scripts no longer manually call the CA utility; all certificate lifecycle management is now handled within the Java application's startup sequence.
  6. Documentation: Architecture wikis have been updated to reflect the new persistent PKI and automated renewal logic as per AI_CONTRIBUTING_RULES.md.

Verification:

  • Added LocalCAUtilityTest.java to verify initial generation and lifespan logic.
  • Verified compilation and test pass via ./gradlew :security-utils:test.
  • Manual inspection of launch.sh and launch.bat confirm removal of obsolete generation steps.

Fixes #63


PR created automatically by Jules for task 8825928146862250262 started by @tyronechrisharris


🔄 Auto-Distributed via Sync

Original Flat Repo PR: tyronechrisharris/oscar-flat#64

🔗 Related Updates in this Sync:

mdhsl and others added 30 commits September 24, 2025 18:14
…range indexed column; fix system serialization/deserialization
…range indexed column; fix system serialization/deserialization
…zation

Update command status serialization for osh-core changes and add inli…
…ATURE and command; fix blocking connection while executing a DROP request; improve the use of batch
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.

5 participants