Skip to content

feat: implement JCE crypto adapter and harden registration infrastructure#19

Merged
Treszyk merged 4 commits into
mainfrom
feat/registration-infra
May 6, 2026
Merged

feat: implement JCE crypto adapter and harden registration infrastructure#19
Treszyk merged 4 commits into
mainfrom
feat/registration-infra

Conversation

@Treszyk
Copy link
Copy Markdown
Owner

@Treszyk Treszyk commented May 6, 2026

Summary

Implements the infrastructure-layer cryptographic adapter for the Java-based Vaulton port, ensuring strict parity with the legacy .NET backend. This PR externalizes security configuration (PBKDF2 iterations and peppers) and implements robust JCE-based memory management to fulfill the "Fortress" architectural standard.

Key Changes

  • JCE Crypto Adapter: Created the JceCryptoAdapter implementation for the CryptoService port, utilizing standard JCA for PBKDF2-HMAC-SHA256 and deterministic fake salt generation.
  • Domain Hardening: Refactored UserCreationServiceImpl to utilize constructor-injected security parameters, removing hardcoded constants and moving security policy control to the application layer.
  • Security & Zeroization: Implemented the "Conscious Cleaning" pattern using try-finally blocks and explicit zeroization of ephemeral byte/char arrays, PBEKeySpec, and Mac states.
  • Infrastructure Mocks: Updated existing domain tests to accommodate the refactored infrastructure dependency injection.

Verification

  • Infrastructure Unit Tests: Implemented JceCryptoAdapterTest to verify secure random generation, hashing consistency, and deterministic salt binding.
  • Domain Unit Tests: Verified UserCreationServiceTest passes with the new configurable infrastructure parameters.
  • Memory Audit: Verified that zeroization logic correctly handles null-checks and early-failure paths to prevent secret leakage.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14a0ea3d0b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Treszyk
Copy link
Copy Markdown
Owner Author

Treszyk commented May 6, 2026

@codex

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b46f881e7c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Treszyk Treszyk force-pushed the feat/registration-infra branch from dce0469 to d1f87e7 Compare May 6, 2026 20:52
@Treszyk
Copy link
Copy Markdown
Owner Author

Treszyk commented May 6, 2026

@codex

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Treszyk Treszyk force-pushed the feat/registration-infra branch from d1f87e7 to a643e91 Compare May 6, 2026 20:58
@Treszyk Treszyk merged commit 2de7a7a into main May 6, 2026
1 check passed
@Treszyk Treszyk deleted the feat/registration-infra branch May 6, 2026 20:59
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