Skip to content

Conversation

@WGH-
Copy link
Contributor

@WGH- WGH- commented Aug 20, 2021

First, in lots of existing tests, client_ca_file was set to the CA of the server. However, it's actually used to verify the client certificate, but there're no tests where the client presents any.

In the second commit, I add a couple of tests where the client actually presents a certificate.

@WGH- WGH- force-pushed the fix-client-ca-tests branch 3 times, most recently from 4e5688d to 83566fc Compare August 20, 2021 16:08
@roidelapluie
Copy link
Member

Hello, this is now conflicting, could you please rebase? Thanks!

WGH- added 2 commits December 26, 2021 17:25
client_ca_file is used to validate client certificate. However,
in tests, client never present any.

Signed-off-by: WGH <[email protected]>
Add tests cases when the client actually sends a certificate, and check
how the server responds to it.

The client certificates were generated with this command:

    openssl req -x509 -newkey ec:<(openssl ecparam -name secp384r1) -keyout client2_selfsigned.key -out client2_selfsigned.pem -nodes -subj '/CN=test2' -days 36500 -addext "extendedKeyUsage = clientAuth"

Signed-off-by: WGH <[email protected]>
@WGH- WGH- force-pushed the fix-client-ca-tests branch from 83566fc to 04a477e Compare December 26, 2021 14:39
@WGH-
Copy link
Contributor Author

WGH- commented Dec 26, 2021

Hello, this is now conflicting, could you please rebase? Thanks!

Done! Sorry that I couldn't get around rebasing earlier, considering that there weren't any major conflicts

@roidelapluie roidelapluie merged commit cbdffbd into prometheus:master Feb 2, 2022
@roidelapluie
Copy link
Member

Thanks!

chodges15 added a commit to chodges15/exporter-toolkit that referenced this pull request Jan 10, 2023
The changed certs were updated based on the command @WGH- in prometheus#61, just with an added SAN DNS. They were generated with this command:

openssl req -x509 -newkey ec:<(openssl ecparam -name secp384r1) -keyout client2_selfsigned.key -out client2_selfsigned.pem -nodes -subj '/CN=test3' -days 36500 -addext "subjectAltName = DNS:test3" -addext "extendedKeyUsage = clientAuth"

Signed-off-by: chodges15 <[email protected]>
chodges15 added a commit to chodges15/exporter-toolkit that referenced this pull request Mar 1, 2023
The changed certs were updated based on the command @WGH- in prometheus#61, just with an added SAN DNS. They were generated with this command:

openssl req -x509 -newkey ec:<(openssl ecparam -name secp384r1) -keyout client2_selfsigned.key -out client2_selfsigned.pem -nodes -subj '/CN=test3' -days 36500 -addext "subjectAltName = DNS:test3" -addext "extendedKeyUsage = clientAuth"

Signed-off-by: chodges15 <[email protected]>
chodges15 added a commit to chodges15/exporter-toolkit that referenced this pull request Mar 1, 2023
The changed certs were updated based on the command @WGH- in prometheus#61, just with an added SAN DNS. They were generated with this command:

openssl req -x509 -newkey ec:<(openssl ecparam -name secp384r1) -keyout client2_selfsigned.key -out client2_selfsigned.pem -nodes -subj '/CN=test3' -days 36500 -addext "subjectAltName = DNS:test3" -addext "extendedKeyUsage = clientAuth"

Signed-off-by: chodges15 <[email protected]>
chodges15 added a commit to chodges15/exporter-toolkit that referenced this pull request Mar 27, 2023
The changed certs were updated based on the command @WGH- in prometheus#61, just with an added SAN DNS. They were generated with this command:

openssl req -x509 -newkey ec:<(openssl ecparam -name secp384r1) -keyout client2_selfsigned.key -out client2_selfsigned.pem -nodes -subj '/CN=test3' -days 36500 -addext "subjectAltName = DNS:test3" -addext "extendedKeyUsage = clientAuth"

Signed-off-by: chodges15 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants