opensearch-project/performance-analyzer-rca

[BUG] TLS certificate validation tests are failing

Tjofil opened this issue · 0 comments

The following tests fail due to invalid certification:
testAuthenticatedClientGetsResponse, testClientAuth, testSecureGetMetrics.

Inspecting certificates' content it can be seen that both RootCA and localhost certs have expired:

$ openssl x509 -in localhost.crt -text -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            f3:93:4f:39:be:5a:cc:c0
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = US, CN = Example-Root-CA
        Validity
            Not Before: Jul  1 07:10:25 2020 GMT
            Not After : Apr 21 07:10:25 2023 GMT
        Subject: C = US, ST = YourState, L = YourCity, O = Example-Certificates, CN = localhost.local
...
$ openssl x509 -in RootCA.crt -text -noout
Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number:
            b8:ef:b4:6f:9e:dc:a8:f5
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = US, CN = Example-Root-CA
        Validity
            Not Before: Jul  1 07:05:21 2020 GMT
            Not After : Apr 21 07:05:21 2023 GMT
        Subject: C = US, CN = Example-Root-CA
...

How can one reproduce the bug?
Steps to reproduce the behavior:
Run any of the three aforementioned tests individually or run the whole test suite.

What is the expected behavior?
Successful TLS authentication for all three tests.

AS RootCA is signing the localhost cert, re-generating both the RootCA's and localhost's keys and certificates is necessary.