Update KRA tests - #5417
Conversation
The test for KRA with RSA-OAEP has been updated to execute the commands directly instead of calling test-cert-key-archival.sh to allow more detailed testing. Other KRA tests have also been modified to check various config params including keywrap, transport unit, storage unit, PKCS #12 encryption as well as CA and KRA info returned by the REST API.
📝 WalkthroughWalkthroughThe PR expands KRA workflow validation for transport, storage, wrapping, encryption, archival, recovery, and REST metadata. It replaces the OAEP test job with a reusable RSA-OAEP workflow that performs end-to-end provisioning, key archival, recovery, cleanup, and diagnostics. ChangesKRA configuration and REST validation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitHub_Actions
participant CA_KRA_Containers
participant LDAP
GitHub_Actions->>CA_KRA_Containers: Install CA and KRA with RSA-OAEP wrapping
GitHub_Actions->>CA_KRA_Containers: Enroll OAEP-protected certificate request
CA_KRA_Containers->>LDAP: Store archived key metadata
GitHub_Actions->>CA_KRA_Containers: Request key recovery
CA_KRA_Containers->>LDAP: Read archived key data
LDAP-->>CA_KRA_Containers: Return key record
CA_KRA_Containers-->>GitHub_Actions: Return recovered private key
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/kra-rsa-oaep-test.yml (1)
16-19: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the stale in-container
dumpasn1install comment.This workflow installs
dumpasn1on the runner withapt-get, so the commenteddocker exec pki dnf install -y jq dumpasn1at line 54 leaves two competing install approaches. Keep the runner install, and add the container install only ifdumpasn1is actually required inside the PKI container.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/kra-rsa-oaep-test.yml around lines 16 - 19, Remove the stale commented in-container install command near the PKI container setup, while retaining the runner-level dumpasn1 installation in the “Install dependencies” step. Add a container installation only if a workflow step actually invokes dumpasn1 inside that container.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/kra-rsa-oaep-test.yml:
- Around line 278-320: Replace the ca-cert-issue invocation in the “Enroll cert
with key archival” step with the existing enrollment command that supports the
-oaep key-wrap option and accepts the transport certificate settings. Preserve
the generated CSR, subject, profile, and output certificate behavior while
ensuring the request is submitted through the supported enrollment path rather
than the CRMFPopClient CA path.
---
Nitpick comments:
In @.github/workflows/kra-rsa-oaep-test.yml:
- Around line 16-19: Remove the stale commented in-container install command
near the PKI container setup, while retaining the runner-level dumpasn1
installation in the “Install dependencies” step. Add a container installation
only if a workflow step actually invokes dumpasn1 inside that container.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b9b48315-fa5d-48c3-8440-e29225421591
📒 Files selected for processing (6)
.github/workflows/kra-basic-test.yml.github/workflows/kra-ecc-test.yml.github/workflows/kra-oaep-test.yml.github/workflows/kra-pqc-test.yml.github/workflows/kra-rsa-oaep-test.yml.github/workflows/kra-tests.yml
💤 Files with no reviewable changes (1)
- .github/workflows/kra-oaep-test.yml
|
@fmarco76 Thanks! I'm still trying to understand CodeRabbit's comment. Hopefully it's nothing major. |
|
OK, it's not an issue. Merging now. |
The test for KRA with RSA-OAEP has been updated to execute the commands directly instead of calling
test-cert-key-archival.shto allow more detailed testing.Other KRA tests have also been modified to check various config params including keywrap, transport unit, storage unit, PKCS #12 encryption as well as CA and KRA info returned by the REST API.
Summary by CodeRabbit
#12settings.