Skip to content
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

HDDS-11216. Replace HAUtils#buildCAX509List usages with other direct usages #6981

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Galsza
Copy link
Contributor

@Galsza Galsza commented Jul 22, 2024

To simplify the CertificateClient the HAUtils#buildCAX509List can be refactored

There are 3 methods on DefaultCertificateClient that solely exist to serve the HAUtils method, preferably these should be removed. BuildCAList is now refactored, the places where it used the certificateClient are replaced by direct calls on the certClient.

There are a couple of technical details here: before the refactor BuildCAList went to the CertificateClient for a list of CAs, and if the CertClient didn't have that value cached it reached out to SCM. Ever since the CertificateRotation has been implemented the CertClient should be able to provide the actual current certificates even without going to the SCM. Therefore it can be supplemented by direct calls to the client.

Instead of using certificates and propagating them further, it turns out the the client can return a ClientTrustManager directly which aligns better with how the CertificateClient should look in its ideal state where only key/trustmanagers are accessible.

HDDS-11216

How was this patch tested?

Clean CI run: https://github.com/Galsza/ozone/actions/runs/10041809622

@Galsza Galsza marked this pull request as ready for review July 27, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant