-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix a typo in the BC CredentialsProvider test #29561
Fix a typo in the BC CredentialsProvider test #29561
Conversation
dca6019
to
81fdcd1
Compare
@rsvoboda I copied the existing keystore from one of the vertx-http tests where the secret is |
Good, just was about to ask why not generate new keystore and truststore with different password. |
@sberyozkin, why do we have the default password at all? |
I was able to set new password for existing
Changes to the code: diff --git a/integration-tests/bouncycastle-jsse/src/main/java/io/quarkus/it/bouncycastle/SecretProvider.java b/integration-tests/bouncycastle-jsse/src/main/java/io/quarkus/it/bouncycastle/SecretProvider.java
index 9eed67c402..ddd70260fe 100644
--- a/integration-tests/bouncycastle-jsse/src/main/java/io/quarkus/it/bouncycastle/SecretProvider.java
+++ b/integration-tests/bouncycastle-jsse/src/main/java/io/quarkus/it/bouncycastle/SecretProvider.java
@@ -15,7 +15,7 @@ public class SecretProvider implements CredentialsProvider {
@Override
public Map<String, String> getCredentials(String credentialsProviderName) {
Map<String, String> creds = new HashMap<>();
- creds.put("keystore-password", "password");
+ creds.put("keystore-password", "my-new-password");
creds.put("truststore-password", "password");
return creds;
}
diff --git a/integration-tests/bouncycastle-jsse/src/main/resources/application.properties b/integration-tests/bouncycastle-jsse/src/main/resources/application.properties
index 40f0793cd8..3a28e5d458 100644
--- a/integration-tests/bouncycastle-jsse/src/main/resources/application.properties
+++ b/integration-tests/bouncycastle-jsse/src/main/resources/application.properties
@@ -1,7 +1,7 @@
quarkus.security.security-providers=BCJSSE
quarkus.http.ssl.certificate.key-store-file=server-keystore.jks
-quarkus.http.ssl.certificate.key-store-password-key=key-store-password
+quarkus.http.ssl.certificate.key-store-password-key=keystore-password
quarkus.http.ssl.certificate.trust-store-file=server-truststore.jks
quarkus.http.ssl.certificate.trust-store-password-key=truststore-password
quarkus.http.ssl.certificate.credentials-provider=custom |
@rsvoboda Thanks, yeah I think I did it the same way except that I let the tool ask for the current password. I could then confirm with |
@rsvoboda Spotted a typo in the test - the reason it works without a typo is because currently the default keystore password is
password
which matches theserver-keystore.jks
password.I've confirmed that changing either
keystore-password
ortruststore-password
keys inSecretProvider
fails the tests.For whatever reasons, if I try to change the
server-keystore.jks
password (just to ensure that no default keystore value is picked up), it messes up theserver-keystore.jks
and Vertx can't read it, with or withoutCredentialsProvider
.Rostislav, if you'd like, please confirm independently that changing the passwords in
SecretProvider
causes a failure