-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d97f793
commit 8e906e1
Showing
9 changed files
with
212 additions
and
4 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
integration-tests/vault/src/test/java/io/quarkus/vault/VaultAwsIamITCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package io.quarkus.vault; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
import org.eclipse.microprofile.config.inject.ConfigProperty; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.test.QuarkusUnitTest; | ||
import io.quarkus.test.common.QuarkusTestResource; | ||
import io.quarkus.vault.test.VaultTestLifecycleManager; | ||
|
||
@QuarkusTestResource(VaultTestLifecycleManager.class) | ||
public class VaultAwsIamITCase { | ||
|
||
@RegisterExtension | ||
static final QuarkusUnitTest config = new QuarkusUnitTest() | ||
.withApplicationRoot((jar) -> jar | ||
.addAsResource("application-vault-aws-iam.properties", "application.properties")); | ||
|
||
@ConfigProperty(name = "quarkus.vault.authentication.aws-iam.role") | ||
String role; | ||
|
||
@ConfigProperty(name = "quarkus.vault.authentication.aws-iam.aws-access-key") | ||
String key; | ||
|
||
@Test | ||
public void testRole() { | ||
assertEquals("myawsiamrole", role); | ||
} | ||
|
||
@Test | ||
public void testAuthMountPath() { | ||
System.out.println("key: " + key); | ||
assertNotNull(key); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
integration-tests/vault/src/test/resources/application-vault-aws-iam.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
quarkus.vault.url=https://localhost:8200 | ||
|
||
# vault-test.client-token-wrapping-token provided by VaultTestLifecycleManager | ||
quarkus.vault.authentication.aws-iam.role=myawsiamrole | ||
quarkus.vault.authentication.aws-iam.region=us-east-1 | ||
quarkus.vault.authentication.aws-iam.sts-url=http://mylocalstack:4566 | ||
quarkus.vault.authentication.aws-iam.vault-server-id=vault.example.com | ||
quarkus.vault.authentication.aws-iam.aws-access-key=${vault-test.aws-user.access-key} | ||
quarkus.vault.authentication.aws-iam.aws-secret-key=${vault-test.aws-user.secret-key} | ||
|
||
#quarkus.vault.tls.skip-verify=true | ||
quarkus.vault.tls.ca-cert=src/test/resources/vault-tls.crt | ||
|
||
#quarkus.vault.log-confidentiality-level=low | ||
#quarkus.vault.renew-grace-period=10 | ||
|
||
quarkus.log.category."io.quarkus.vault".level=DEBUG | ||
|
||
#quarkus.log.level=DEBUG | ||
#quarkus.log.console.level=DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters