-
Notifications
You must be signed in to change notification settings - Fork 19
Use custom certificates for the agent too #900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use custom certificates for the agent too #900
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR extends the basic attestation functional test script to generate, sign, install, and configure a custom‐algorithm certificate/key pair for the agent (previously commented out), ensuring mTLS uses the new certificates. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6fa5851
to
4f56b83
Compare
/packit test |
4f56b83
to
2cef261
Compare
2cef261
to
df77ee4
Compare
Previously, the agent supported only RSA key/certificate as the mTLS key because it was also used to encrypt data in the secure payload mechanism. With keylime/rust-keylime#1129, the agent is now able to use different algorithms for mTLS. When testing PQC algorithms, set ECDSA keys for the agent due to https://issues.redhat.com/browse/RHEL-117439. Once this is fixed, the special treatment for the agent mTLS should be removed. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
df77ee4
to
ada974f
Compare
@Koncpa @kkaarreell I added a special treatment for the agent when using PQC due to https://issues.redhat.com/browse/RHEL-117439, could you please check if it is OK? |
/packit retest-failed |
This is new to me (F42+Rawhide test results).
This I can't explain as well, I can see the message in the agent's log. (Rawhide) |
So I did some cosmetic changes in #901 and I am not seeing the failure there. Still, it doesn't really explain why this is happening. |
This also caught my attention. That PCR#16 is used to check that the payload encryption public key provided by the agent is extended to the PCR#16, which was kind of the binding mechanism to relate the public key with the TPM quote provided by the agent. A related change I made was to separate the payload mechanism key from the mTLS key. I didn't see any problem doing that because the agent always re-registers itself at startup, meaning that in case of restart of the agent (that will make the agent to create a new ephemeral key for the payload mechanism), the new public key should be updated in the registrar side, which should be used by the verifier to check the PCR#16. I think the problem is that the verifier do not know that the agent restarted, and then checks the PCR#16 against the previous version of the public key. The information the verifier has would only be updated upon a re-enrollment using the tenant. So, there are few ways to fix it (if it is the issue I described above):
For me, the best self-contained fix is number 1, with changes only to the agent, without any other visible changes to the rest (it would return the behavior as it was prior to the changes). Then, number 2 could be implemented for best resilience in the verifier side. Number 3 is actually the best solution overall, and proposed a number of time already in many opportunities. One thing to weigh here is if we should really invest this amount of effort to keep the payload delivery mechanism alive when it is not even planned to be implemented for the push attestation agent. |
This one I do not understand, sorry. |
/packit test |
I would also avoid changing payload mechanism. We need to keep it compatible with older releases so the current functionality would have to remain anyway. |
To be honest, the explanation I gave above still needs confirmation. I don't know why it is not visible there, but it is visible for fedora > 42. EDIT: The confirmation is not difficult. It would be enough to:
|
Event though the failure seems to be quite reliable in CI I wasn't equally successful in trying to reproduce it on my test system. I think that the timing is crucial here. |
/packit test |
@ansasaki Hi, can we merge it? Test results looks good now. Thank you. |
Previously, the agent supported only RSA key/certificate as the mTLS key because it was also used to encrypt data in the secure payload mechanism.
With keylime/rust-keylime#1129, the agent is now able to use different algorithms for mTLS.
Summary by Sourcery
Enable functional tests to generate and configure custom agent certificates for mTLS using the specified cryptographic algorithm
Tests: