From 0720de51ccc1133a1dea20799a09854e4ef6d17e Mon Sep 17 00:00:00 2001 From: Enrico Bianchi Date: Sun, 9 Apr 2023 23:58:44 +0200 Subject: [PATCH 1/4] Fixed typo --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index dd246e52..c4c1599d 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,7 @@ --- name: Feature request about: Suggest an idea for this project -title: "[IMROVEMENT] " +title: "[IMPROVEMENT] " labels: enhancement assignees: '' From b6fdc845c2b8831108670a84f17467dfea7d5503 Mon Sep 17 00:00:00 2001 From: Enrico Bianchi Date: Tue, 11 Apr 2023 09:24:34 +0200 Subject: [PATCH 2/4] Parametrized Vault Agent container initialization in integration tests --- .../io/github/jopenlibs/vault/util/VaultAgentContainer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test-integration/java/io/github/jopenlibs/vault/util/VaultAgentContainer.java b/src/test-integration/java/io/github/jopenlibs/vault/util/VaultAgentContainer.java index 8935f795..803582e8 100644 --- a/src/test-integration/java/io/github/jopenlibs/vault/util/VaultAgentContainer.java +++ b/src/test-integration/java/io/github/jopenlibs/vault/util/VaultAgentContainer.java @@ -5,6 +5,7 @@ import io.github.jopenlibs.vault.VaultConfig; import io.github.jopenlibs.vault.VaultException; import java.nio.file.Path; +import java.util.Optional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testcontainers.containers.BindMode; @@ -20,6 +21,8 @@ public class VaultAgentContainer extends GenericContainer implements TestConstants, TestLifecycleAware { + public static final String VAULT_DEFAULT_IMAGE = "vault"; + public static final String VAULT_DEFAULT_TAG = "latest"; private static final Logger LOGGER = LoggerFactory.getLogger(VaultAgentContainer.class); /** @@ -28,7 +31,8 @@ public class VaultAgentContainer extends GenericContainer i public VaultAgentContainer( Path roleId, Path secretId) { - super("vault:1.11.4"); + super(VAULT_DEFAULT_IMAGE + ":" + Optional.ofNullable( + System.getenv("VAULT_VERSION")).orElse(VAULT_DEFAULT_TAG)); this.withNetwork(CONTAINER_NETWORK) .withNetworkAliases("agent") .withClasspathResourceMapping("/agent.hcl", AGENT_CONFIG_FILE, BindMode.READ_ONLY) From 2565480ef6521256b95da8c452a74d7cfb1d25a7 Mon Sep 17 00:00:00 2001 From: Enrico Bianchi Date: Tue, 11 Apr 2023 09:24:58 +0200 Subject: [PATCH 3/4] Upgraded OpenSSL configuration in integration tests --- src/test-integration/resources/libressl.conf | 4 ++-- src/test-integration/resources/startup.sh | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/test-integration/resources/libressl.conf b/src/test-integration/resources/libressl.conf index 6b90efb9..652ffb8d 100644 --- a/src/test-integration/resources/libressl.conf +++ b/src/test-integration/resources/libressl.conf @@ -8,8 +8,8 @@ certificate = /vault/config/ssl/root-cert.pem database = /vault/config/ssl/certindex private_key = /vault/config/ssl/root-privkey.pem serial = /vault/config/ssl/serialfile -default_days = 365 -default_md = sha1 +default_days = 3650 +default_md = sha256 policy = myca_policy x509_extensions = myca_extensions copy_extensions = copy diff --git a/src/test-integration/resources/startup.sh b/src/test-integration/resources/startup.sh index 9dade6e6..3f5051b5 100644 --- a/src/test-integration/resources/startup.sh +++ b/src/test-integration/resources/startup.sh @@ -17,10 +17,20 @@ rm -Rf * cp ../libressl.conf . # Create a CA root certificate and key -openssl req -newkey rsa:2048 -days 3650 -x509 -nodes -out root-cert.pem -keyout root-privkey.pem -subj '/C=US/ST=GA/L=Atlanta/O=BetterCloud/CN=localhost' +openssl req -newkey rsa:4096 \ + -days 3650 \ + -x509 \ + -nodes \ + -out root-cert.pem \ + -keyout root-privkey.pem \ + -subj '/C=US/ST=GA/L=Atlanta/O=BetterCloud/CN=localhost' # Create a private key, and a certificate-signing request -openssl req -newkey rsa:1024 -nodes -out vault-csr.pem -keyout vault-privkey.pem -subj '/C=US/ST=GA/L=Atlanta/O=BetterCloud/CN=localhost' +openssl req -newkey rsa:4096 \ + -nodes \ + -out vault-csr.pem \ + -keyout vault-privkey.pem \ + -subj '/C=US/ST=GA/L=Atlanta/O=BetterCloud/CN=localhost' # Create an X509 certificate for the Vault server echo 000a > serialfile From 7eb5af0d57c0ab78af9456b608efca6f40f5cc5a Mon Sep 17 00:00:00 2001 From: Enrico Bianchi Date: Tue, 11 Apr 2023 09:25:34 +0200 Subject: [PATCH 4/4] Released 5.3.0 --- README.md | 11 ++++++++--- build.gradle | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 88894a2f..8690b4a9 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Gradle: ``` dependencies { - implementation 'io.github.jopenlibs:vault-java-driver:5.2.0' + implementation 'io.github.jopenlibs:vault-java-driver:5.3.0' } ``` @@ -58,7 +58,7 @@ Maven: io.github.jopenlibs vault-java-driver - 5.2.0 + 5.3.0 ``` @@ -310,7 +310,12 @@ and may require modifications in your code to migrate. Changes to the minor vers number) should represent non-breaking changes. The third number represents any very minor bugfix patches. -* **5.2.0**: This release contains the following updates: +* **5.3.0**: This release contains the following updates: + * Created sys namespace [PR #21](https://github.com/jopenlibs/vault-java-driver/pull/25) + * Add custom Vault Authentication Path when using k8s login method [(PR #27)](https://github.com/jopenlibs/vault-java-driver/pull/27) + * Parametrized integration tests [(PR #21)](https://github.com/jopenlibs/vault-java-driver/pull/21) + * Fix Leases section [(PR #18)](https://github.com/jopenlibs/vault-java-driver/pull/18) +* **5.2.0**: This release contains the following updates: * Move code packages and maven groupdId from `com.bettercloud` to `io.github.jopenlibs`. [(PR #2)](https://github.com/jopenlibs/vault-java-driver/pull/2) * Fix and refactoring data wrapping, add integration tests with the last Vault version (vault diff --git a/build.gradle b/build.gradle index 6be2e3e3..efdd6a19 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ apply plugin: 'checkstyle' group 'io.github.jopenlibs' archivesBaseName = 'vault-java-driver' -version '5.3.0-SNAPSHOT' +version '5.3.0' // This project is actually limited to Java 8 compatibility. See below. sourceCompatibility = 9