Backport test cannot-use-mTLS-cert...#1100
Merged
Merged
Conversation
Reviewer's GuideAdds a new Beakerlib regression test that verifies an agent’s self-signed mTLS server certificate cannot be used to access verifier/registrar admin APIs or client endpoints, and that proper certs and HTTP(S) behavior are enforced. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Several
openssl x509 -textandsleep 1 | openssl s_clientcalls are duplicated between verifier and registrar tests; consider wrapping these into helper functions to reduce repetition and make the test easier to maintain. - The
rlAssertGreppatterns for SSL errors and HTTP status codes (e.g.SSL alert number 48,400 Bad Request) are quite strict; consider slightly loosening or parameterising these to avoid brittleness across minor OpenSSL/curl/version changes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Several `openssl x509 -text` and `sleep 1 | openssl s_client` calls are duplicated between verifier and registrar tests; consider wrapping these into helper functions to reduce repetition and make the test easier to maintain.
- The `rlAssertGrep` patterns for SSL errors and HTTP status codes (e.g. `SSL alert number 48`, `400 Bad Request`) are quite strict; consider slightly loosening or parameterising these to avoid brittleness across minor OpenSSL/curl/version changes.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| @@ -0,0 +1,163 @@ | |||
| #!/bin/bash | |||
| # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k | |||
| . /usr/share/beakerlib/beakerlib.sh || exit 1 | |||
|
|
||
| rlPhaseStartTest "Try to open TLS connection to the verifier on port ${VERIFIER_PORT} using agent's self-signed mTLS cert" | ||
| rlRun "openssl x509 -text -in /var/lib/keylime/cv_ca/client-cert.crt" | ||
| # use sleep to ensure that it won't be client closing the connection too early |
kkaarreell
force-pushed
the
ks_test_backport
branch
from
July 22, 2026 10:33
b0c56a7 to
1d3ed15
Compare
Collaborator
Author
|
I have executed the test with the planned keylime RHEL-9.9 update and it has passed. |
Collaborator
Author
|
test failure is unrelated and being addressed in #1099 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Tests: