smengcl opened a new pull request, #11544:
URL: https://github.com/apache/ozone/pull/11544

   Generated-by: Claude Code (Opus 5.5)
   
   ## What changes were proposed in this pull request?
   
   `CertificateApprover.inspectCSR` returns a future that should hold Void for 
a valid CSR and an exception otherwise. `DefaultApprover.inspectCSR` only ever 
completed it exceptionally, so for a CSR that passed inspection the future 
stayed incomplete, and `DefaultCAServer.requestCertificate` read "incomplete" 
as approved. A failed check also did not stop the inspection: the remaining 
checks still ran on that CSR.
   
   This PR:
   * completes the future with `null` once every check passes
   * returns right after the first failed check
   * makes `DefaultCAServer.requestCertificate` reject a CSR whose inspection 
has not completed, instead of signing it
   
   `DefaultApprover` is the only `CertificateApprover` and its inspection is 
synchronous, so certificate issuance behaves as before for valid and invalid 
CSRs. The first failure is reported exactly as before; only the error logs of 
the checks that used to run after it are gone.
   
   Follow up from the review of #11486.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-17030
   
   ## How was this patch tested?
   
   * New `TestDefaultProfile.testInspectCsrCompletesWhenApproved`, 
`TestDefaultProfile.testInspectCsrStopsAtFirstFailure` and 
`TestDefaultCAServer.testRequestCertificateRejectsUnfinishedInspection`. All 
three fail without the change in `src/main`.
   * `TestDefaultCAServer`, `TestDefaultProfile` and 
`TestRootCARotationManager` pass, and checkstyle and PMD are clean on 
`hdds-server-framework`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to