tink-crypto / tink

Tink is a multi-language, cross-platform, open source library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.
https://developers.google.com/tink
Apache License 2.0
13.5k stars 1.18k forks source link

Bump google-api-services-cloudkms to latest #670

Closed roar-skinderviken closed 1 year ago

roar-skinderviken commented 1 year ago

Problem tink-gcpkms:1.7.0 has dependencies to google-api-services-cloudkms:v1-rev108-1.25.0 and google-api-client:1.33.2. When trying to bump google-api-client to a version later than 1.35.2, this error appears:

You are currently running with version 2.2.0 of google-api-client. You need at least version 1.15 of google-api-client to run version 1.25.0 of the Cloud Key Management Service (KMS) API library.

google-api-services-cloudkms README points to a version different from latest which also gives the same error: google-api-java-client-services

In Maven Central, latest version of google-api-services-cloudkms appears somewhere in the middle of the list of releases: https://mvnrepository.com/artifact/com.google.apis/google-api-services-cloudkms

Desired solution Bump google-api-services-cloudkms to a version that supports google-api-client:2.x

google-api-services-cloudkms:v1-rev20221107-2.0.0 appears to work with google-api-client:2.2.0 and tink-gcpkms:1.7.0.

morambro commented 1 year ago

Hi @roar-skinderviken, thanks for pointing this out. I've upgraded this in https://github.com/google/tink/commit/6c29d611f4c4c7656fe791741722a5e9b5b5ef64. Could you please try com.google.crypto.tink:tink:HEAD-SNAPSHOT?

roar-skinderviken commented 1 year ago

Hi @morambro Thanks for super-quick response! Just tested com.google.crypto.tink:tink:HEAD-SNAPSHOT, works great.

I spotted a few warnings about conflicts that does not really have any effect except for google-oauth-client, you may want to bump this to google-oauth-client:1.34.1 image

Resolved these warnings in my POM by adding the following deps to dependencyManagement:

<dependency>
    <groupId>com.google.http-client</groupId>
    <artifactId>google-http-client</artifactId>
    <version>1.42.3</version>
</dependency>
<dependency>
    <groupId>com.google.http-client</groupId>
    <artifactId>google-http-client-gson</artifactId>
    <version>1.42.3</version>
</dependency>
<dependency>
    <groupId>com.google.oauth-client</groupId>
    <artifactId>google-oauth-client</artifactId>
    <version>1.34.1</version>
</dependency>
<dependency>
    <groupId>com.google.api-client</groupId>
    <artifactId>google-api-client</artifactId>
    <version>2.2.0</version>
</dependency>
morambro commented 1 year ago

Thanks for the feedback. This should be fixed by https://github.com/google/tink/commit/f1267db697e6c176aa4bdc2417ed3ed8ae714252. I've upgraded google-oauth-client to 1.34.1. com.google.crypto.tink:tink:HEAD-SNAPSHOT should be up-to-date with this commit.

Xgamerz commented 1 year ago

You are currently running with version 2.2.0 of google-api-client. You need at least version 1.31.1 of google-api-client to run version 1.32.1 of the Cloud SQL Admin API library.

roar-skinderviken commented 1 year ago

@Xgamerz

You are currently running with version 2.2.0 of google-api-client. You need at least version 1.31.1 of google-api-client to run version 1.32.1 of the Cloud SQL Admin API library.

google-api-client:2.2.0 is a newer version than 1.31.1, I don't see your concern here.

morambro commented 1 year ago

This was included in the latest release.