Skip to content

Fix: DOGTAG-4408 SSKG Fails on Thales HSM with error CKR_ATTRIBUTE_VA… - #5419

Merged
jmagne merged 1 commit into
dogtagpki:masterfrom
jmagne:sskg-fix
Aug 12, 2026
Merged

Fix: DOGTAG-4408 SSKG Fails on Thales HSM with error CKR_ATTRIBUTE_VA…#5419
jmagne merged 1 commit into
dogtagpki:masterfrom
jmagne:sskg-fix

Conversation

@jmagne

@jmagne jmagne commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Fix: DOGTAG-4408 SSKG Fails on Thales HSM with error CKR_ATTRIBUTE_VALUE_INVALID.

When decrypting the p12 password in the KRA with a session key, we must unwrap the session key with DECRYPT usage, since the next operation does a decryption with the key.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed server-side session-key processing during key generation to ensure encrypted keys are handled correctly.

…LUE_INVALID.

When decrypting the p12 password in the KRA with a session key, we must unwrap
the session key with DECRYPT usage, since the next operation does a decryption with
the key.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 04493e5e-c3dd-4932-8743-cc210f884f1c

📥 Commits

Reviewing files that changed from the base of the PR and between ed1f3da and f470081.

📒 Files selected for processing (1)
  • base/kra/src/main/java/com/netscape/kra/RecoveryService.java

📝 Walkthrough

Walkthrough

The recovery service now requests decrypt usage when it unwraps server-side keygen session keys.

Changes

Keygen session-key handling

Layer / File(s) Summary
Use decrypt usage for session keys
base/kra/src/main/java/com/netscape/kra/RecoveryService.java
The service uses SymmetricKey.Usage.DECRYPT instead of SymmetricKey.Usage.UNWRAP.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Mergeability Score: ⚪ Minimal · up to f4700

This is a narrowly scoped fix to session-key unwrapping behavior, and no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the SSKG failure fix on Thales HSMs and matches the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ladycfu ladycfu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks like a good fix in theory, provided that nShield and NSS continue to work.
Approving now.

@jmagne
jmagne merged commit 71ac514 into dogtagpki:master Aug 12, 2026
202 of 207 checks 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.

2 participants