Repository navigation
Implement Persistent, Auto-Renewing Local CA PKI - #64
Conversation
- Rename EphemeralCAUtility to LocalCAUtility and implement persistent Root CA storage. - Update LocalCAUtility to generate 20-year Root CA and 1-year Leaf certificate. - Securely store Root Private Key in osh-keystore.p12 under 'root-ca' alias. - Add checkAndRenewCertificates() to LocalCAUtility to automatically renew Leaf if it expires within 30 days. - Integrate certificate renewal check into SensorHubWrapper startup sequence. - Remove manual CA generation from launch.sh and launch.bat. - Update SECURITY_ARCHITECTURE.md and SYSTEM_ARCHITECTURE.md to reflect new architecture. - Add unit test for initial certificate generation in LocalCAUtilityTest.java. Co-authored-by: tyronechrisharris <142608718+tyronechrisharris@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…enewing Local CA - Rename EphemeralCAUtility to LocalCAUtility and implement persistent Root CA storage. - Update LocalCAUtility to generate 20-year Root CA and 1-year Leaf certificate. - Securely store Root Private Key in osh-keystore.p12 under 'root-ca' alias. - Add checkAndRenewCertificates() to LocalCAUtility to automatically renew Leaf if it expires within 30 days. - Integrate certificate renewal check into SensorHubWrapper startup sequence with graceful fallback for missing secrets or Root keys. - Remove manual CA generation from launch.sh and launch.bat. - Update SECURITY_ARCHITECTURE.md and SYSTEM_ARCHITECTURE.md to reflect new architecture. - Add unit test for initial certificate generation in LocalCAUtilityTest.java. Co-authored-by: tyronechrisharris <142608718+tyronechrisharris@users.noreply.github.com>
- Transition from ephemeral to persistent Local CA architecture.
- Generate 20-year Root CA and 1-year Leaf certificate on first boot.
- Securely store Root Private Key in osh-keystore.p12 under 'root-ca' alias.
- Add automated 30-day leaf certificate renewal in SensorHubWrapper.
- Implement fail-secure startup: Remove all hardcoded password fallbacks ('atakatak', 'changeit').
- Update launch scripts (sh/bat) to halt with critical error if secrets are missing.
- Update SECURITY_ARCHITECTURE.md and SYSTEM_ARCHITECTURE.md.
- Add unit test for CA lifecycle management in LocalCAUtilityTest.java.
Co-authored-by: tyronechrisharris <142608718+tyronechrisharris@users.noreply.github.com>
- Transition from ephemeral to persistent Local CA architecture.
- Generate 20-year Root CA and 1-year Leaf certificate on first boot.
- Securely store Root Private Key in osh-keystore.p12 under 'root-ca' alias.
- Add automated 30-day leaf certificate renewal in SensorHubWrapper.
- Implement fail-secure startup: Remove all hardcoded password fallbacks ('atakatak', 'changeit').
- FIX FIRST-BOOT: Re-ordered launch scripts to run CA generation before password validation.
- FIX FIRST-BOOT: Use auto-generated secret for TRUSTSTORE_PASSWORD if not provided.
- FIX FIRST-BOOT: Deleted pre-existing dummy keystore from distribution template.
- Update SensorHubWrapper to load truststore password from .app_secrets.
- Update SECURITY_ARCHITECTURE.md and SYSTEM_ARCHITECTURE.md.
- Add unit test for CA lifecycle management in LocalCAUtilityTest.java.
Co-authored-by: tyronechrisharris <142608718+tyronechrisharris@users.noreply.github.com>
- Transition from ephemeral to persistent Local CA architecture.
- Generate 20-year Root CA and 1-year Leaf certificate on first boot.
- Securely store Root Private Key in osh-keystore.p12 under 'root-ca' alias.
- Add automated 30-day leaf certificate renewal in SensorHubWrapper.
- Implement fail-secure startup: Remove all hardcoded password fallbacks ('atakatak', 'changeit').
- FIX FIRST-BOOT: Re-ordered launch scripts to run CA generation before password validation.
- FIX FIRST-BOOT: Use auto-generated secret for TRUSTSTORE_PASSWORD if not provided.
- FIX FIRST-BOOT: Deleted pre-existing dummy keystore from distribution template.
- FIX DEPENDENCY CONFLICT: Removed legacy BouncyCastle JARs (bcprov-jdk14.jar) causing IncompatibleClassChangeError.
- Update SensorHubWrapper to load truststore password from .app_secrets.
- Update SECURITY_ARCHITECTURE.md and SYSTEM_ARCHITECTURE.md.
- Add unit test for CA lifecycle management in LocalCAUtilityTest.java.
Co-authored-by: tyronechrisharris <142608718+tyronechrisharris@users.noreply.github.com>
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:
EphemeralCAUtility.javais nowLocalCAUtility.java.osh-keystore.p12under the aliasroot-ca. It is encrypted using the auto-generated password in.app_secrets.SensorHubWrappernow callsLocalCAUtility.checkAndRenewCertificates()on every boot. If thejettyleaf certificate is within 30 days of expiration, it is automatically regenerated and signed by the persistent Root CA.Verification:
LocalCAUtilityTest.javato verify initial generation and lifespan logic../gradlew :security-utils:test.launch.shandlaunch.batconfirm removal of obsolete generation steps.Fixes #63
PR created automatically by Jules for task 8825928146862250262 started by @tyronechrisharris