diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d7ab2196..0966d080 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -64,7 +64,7 @@ jobs: - name: Set up JDK 11 uses: actions/setup-java@f0bb91606209742fe3ea40199be2f3ef195ecabf # tag=v2.5.0 with: - distribution: adopt + distribution: temurin java-version: 11 - name: Initialize CodeQL uses: github/codeql-action/init@d39d5d5c9707b926d517b1b292905ef4c03aa777 # tag=v1.1.2 diff --git a/.github/workflows/gradle-ci.yml b/.github/workflows/gradle-ci.yml index f8ea5fe0..e3992d76 100644 --- a/.github/workflows/gradle-ci.yml +++ b/.github/workflows/gradle-ci.yml @@ -33,7 +33,7 @@ jobs: - name: Set up JDK 11 uses: actions/setup-java@f0bb91606209742fe3ea40199be2f3ef195ecabf # tag=v2.5.0 with: - distribution: adopt + distribution: temurin java-version: 11 - uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # tag=v2.1.7 with: diff --git a/.github/workflows/gradle-oss-index-scan.yml b/.github/workflows/gradle-oss-index-scan.yml index de699aad..11002344 100644 --- a/.github/workflows/gradle-oss-index-scan.yml +++ b/.github/workflows/gradle-oss-index-scan.yml @@ -21,7 +21,7 @@ jobs: - name: Set up JDK 11 uses: actions/setup-java@f0bb91606209742fe3ea40199be2f3ef195ecabf # tag=v2.5.0 with: - distribution: adopt + distribution: temurin java-version: 11 - name: Check dependencies with Gradle run: ./gradlew ossIndexAudit -PossIndexUsername=${{ secrets.OSS_INDEX_USER }} -PossIndexPassword=${{ secrets.OSS_INDEX_PASSWORD }} diff --git a/.github/workflows/gradle-test-main.yml b/.github/workflows/gradle-test-main.yml index eb0f6380..034edcbe 100644 --- a/.github/workflows/gradle-test-main.yml +++ b/.github/workflows/gradle-test-main.yml @@ -25,7 +25,7 @@ jobs: - name: Set up JDK 11 uses: actions/setup-java@f0bb91606209742fe3ea40199be2f3ef195ecabf # tag=v2.5.0 with: - distribution: adopt + distribution: temurin java-version: 11 - uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # tag=v2.1.7 with: diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 03b2e361..b0618e8d 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -36,7 +36,7 @@ jobs: - name: Set up JDK 11 uses: actions/setup-java@f0bb91606209742fe3ea40199be2f3ef195ecabf # tag=v2.5.0 with: - distribution: adopt + distribution: temurin java-version: 11 - uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed # tag=v2.1.7 with: diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7bac25a7..d1069a53 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ findbugs = "3.0.2" lombok = "1.18.22" httpClient = "4.5.13" commonsCodec = "1.15" -azureKeyVaultClient = "4.3.8" +azureKeyVaultClient = "4.4.0" testcontainers = "1.16.3" cucumber = "7.2.3" mockitoCore = "4.4.0" diff --git a/lowkey-vault-client/src/main/java/com/github/nagyesta/lowkeyvault/http/ApacheHttpClientProvider.java b/lowkey-vault-client/src/main/java/com/github/nagyesta/lowkeyvault/http/ApacheHttpClientProvider.java index 84008204..a62882ce 100644 --- a/lowkey-vault-client/src/main/java/com/github/nagyesta/lowkeyvault/http/ApacheHttpClientProvider.java +++ b/lowkey-vault-client/src/main/java/com/github/nagyesta/lowkeyvault/http/ApacheHttpClientProvider.java @@ -7,12 +7,15 @@ import com.azure.security.keyvault.keys.KeyAsyncClient; import com.azure.security.keyvault.keys.KeyClient; import com.azure.security.keyvault.keys.KeyClientBuilder; +import com.azure.security.keyvault.keys.KeyServiceVersion; import com.azure.security.keyvault.keys.cryptography.CryptographyAsyncClient; import com.azure.security.keyvault.keys.cryptography.CryptographyClient; import com.azure.security.keyvault.keys.cryptography.CryptographyClientBuilder; +import com.azure.security.keyvault.keys.cryptography.CryptographyServiceVersion; import com.azure.security.keyvault.secrets.SecretAsyncClient; import com.azure.security.keyvault.secrets.SecretClient; import com.azure.security.keyvault.secrets.SecretClientBuilder; +import com.azure.security.keyvault.secrets.SecretServiceVersion; import com.fasterxml.jackson.databind.ObjectMapper; import com.github.nagyesta.lowkeyvault.http.management.LowkeyVaultManagementClient; import com.github.nagyesta.lowkeyvault.http.management.impl.LowkeyVaultManagementClientImpl; @@ -89,6 +92,7 @@ private KeyClientBuilder getKeyBuilder() { .vaultUrl(getVaultUrl()) .credential(new BasicAuthenticationCredential(DUMMY, DUMMY)) .httpClient(createInstance()) + .serviceVersion(KeyServiceVersion.V7_2) .retryPolicy(new RetryPolicy(new FixedDelay(0, Duration.ZERO))); } @@ -97,6 +101,7 @@ private SecretClientBuilder getSecretBuilder() { .vaultUrl(getVaultUrl()) .credential(new BasicAuthenticationCredential(DUMMY, DUMMY)) .httpClient(createInstance()) + .serviceVersion(SecretServiceVersion.V7_2) .retryPolicy(new RetryPolicy(new FixedDelay(0, Duration.ZERO))); } @@ -105,6 +110,7 @@ private CryptographyClientBuilder getCryptoBuilder(final String webKeyId) { .keyIdentifier(Objects.requireNonNull(webKeyId)) .credential(new BasicAuthenticationCredential(DUMMY, DUMMY)) .httpClient(createInstance()) + .serviceVersion(CryptographyServiceVersion.V7_2) .retryPolicy(new RetryPolicy(new FixedDelay(0, Duration.ZERO))); } diff --git a/lowkey-vault-testcontainers/src/test/java/com/github/nagyesta/lowkeyvault/testcontainers/AbstractLowkeyVaultContainerTest.java b/lowkey-vault-testcontainers/src/test/java/com/github/nagyesta/lowkeyvault/testcontainers/AbstractLowkeyVaultContainerTest.java index ffbd22ba..6360e6bc 100644 --- a/lowkey-vault-testcontainers/src/test/java/com/github/nagyesta/lowkeyvault/testcontainers/AbstractLowkeyVaultContainerTest.java +++ b/lowkey-vault-testcontainers/src/test/java/com/github/nagyesta/lowkeyvault/testcontainers/AbstractLowkeyVaultContainerTest.java @@ -6,6 +6,7 @@ import com.azure.core.http.policy.RetryPolicy; import com.azure.security.keyvault.secrets.SecretClient; import com.azure.security.keyvault.secrets.SecretClientBuilder; +import com.azure.security.keyvault.secrets.SecretServiceVersion; import com.azure.security.keyvault.secrets.models.KeyVaultSecret; import org.junit.jupiter.api.Assertions; @@ -25,6 +26,7 @@ protected void verifyConnectionIsWorking(final String vaultUrl, final HttpClient .vaultUrl(vaultUrl) .credential(credential) .httpClient(httpClient) + .serviceVersion(SecretServiceVersion.V7_2) .retryPolicy(new RetryPolicy(new FixedDelay(0, Duration.ZERO))) .buildClient();