You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by GitBox <gi...@apache.org> on 2023/01/19 07:51:22 UTC

[GitHub] [knox] MrtnBalazs opened a new pull request, #716: KNOX-2748 - Fixed HashiCorp alias service getPasswordFromAliasForCluster

MrtnBalazs opened a new pull request, #716:
URL: https://github.com/apache/knox/pull/716

   ## What changes were proposed in this pull request?
   
   Fixed the HashiCorpVaultAliasService `getPasswordFromAliasForCluster` function, because it worked incorrectly when the generate flag was set to `true`.
   
   ## How was this patch tested?
   
   I extended the existing unit tests.
   


-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [knox] smolnar82 commented on a diff in pull request #716: KNOX-2748 - Fixed HashiCorp alias service getPasswordFromAliasForCluster

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on code in PR #716:
URL: https://github.com/apache/knox/pull/716#discussion_r1080967212


##########
gateway-service-hashicorp-vault/src/test/java/org/apache/knox/gateway/backend/hashicorp/vault/TestHashicorpVaultAliasService.java:
##########
@@ -184,6 +185,9 @@ public void testVaultIntegration() throws Exception {
     assertNull(aliasService.getPasswordFromAliasForCluster(clusterName, alias));
     assertEquals(0, aliasService.getAliasesForCluster(clusterName).size());
 
+    char[] generatedPassword = aliasService.getPasswordFromAliasForCluster(clusterName, alias, true);
+    assertNotNull(generatedPassword != null);
+

Review Comment:
   You may want to make sure the generated password for `alias` is not the same as `aliasPassword`



-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [knox] MrtnBalazs commented on a diff in pull request #716: KNOX-2748 - Fixed HashiCorp alias service getPasswordFromAliasForCluster

Posted by GitBox <gi...@apache.org>.
MrtnBalazs commented on code in PR #716:
URL: https://github.com/apache/knox/pull/716#discussion_r1081086392


##########
gateway-service-hashicorp-vault/src/test/java/org/apache/knox/gateway/backend/hashicorp/vault/TestHashicorpVaultAliasService.java:
##########
@@ -184,6 +185,9 @@ public void testVaultIntegration() throws Exception {
     assertNull(aliasService.getPasswordFromAliasForCluster(clusterName, alias));
     assertEquals(0, aliasService.getAliasesForCluster(clusterName).size());
 
+    char[] generatedPassword = aliasService.getPasswordFromAliasForCluster(clusterName, alias, true);
+    assertNotNull(generatedPassword != null);
+

Review Comment:
   Alright.



-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [knox] smolnar82 commented on a diff in pull request #716: KNOX-2748 - Fixed HashiCorp alias service getPasswordFromAliasForCluster

Posted by GitBox <gi...@apache.org>.
smolnar82 commented on code in PR #716:
URL: https://github.com/apache/knox/pull/716#discussion_r1081102335


##########
gateway-service-hashicorp-vault/src/test/java/org/apache/knox/gateway/backend/hashicorp/vault/TestHashicorpVaultAliasService.java:
##########
@@ -184,6 +185,9 @@ public void testVaultIntegration() throws Exception {
     assertNull(aliasService.getPasswordFromAliasForCluster(clusterName, alias));
     assertEquals(0, aliasService.getAliasesForCluster(clusterName).size());
 
+    char[] generatedPassword = aliasService.getPasswordFromAliasForCluster(clusterName, alias, true);
+    assertNotNull(generatedPassword != null);
+

Review Comment:
   Thanks!



-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [knox] MrtnBalazs merged pull request #716: KNOX-2748 - Fixed HashiCorp alias service getPasswordFromAliasForCluster

Posted by GitBox <gi...@apache.org>.
MrtnBalazs merged PR #716:
URL: https://github.com/apache/knox/pull/716


-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org