-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] azure-keyvault-extensions.jar and guava.jar version 28 support #6553
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc |
1 similar comment
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc |
@g2vinay can you please help route this "track 1" question? |
@vinayak-kuchekar please note that we have shipped new major releases of the Azure SDK for Java including KeyVault and Storage. The new versions have names starting with 'com.azure' instead of 'com.microsoft.azure'. The new SDK versions have new features, better performance, and are more usable and consistent following the Azure SDK Design Guidelines.
|
After doing some debugging and with the help of @anuchandy, I managed to pinpoint the culprit: the ServiceFuture class, which extends Google's AbstractFuture. In line 214 we override the method @anuchandy and myself were thinking we could add an extra check there to see if the |
@jianghaolu - The only owner of the underlying Rx Keeping that deprecation possibility aside, In the current implementation, it seems the Explicit cancel
Implicit cancel
The new Guava v28 Future chain seems considering a Future as canceled if |
With the rate of development in that repo, a 2 minor release deprecation will take forever, if it ever happens. |
right, Guava's transform operators behavior changed FROM "ignoring" the cancel state of a completed task TO "propagating" the cancel state of a completed task, which uncovered this bug in |
Hello, Thanks & Regards, |
Hi Vinayak, We will release a patch for this later this month, I will let you know once we do so :) The fix would be indeed a part of the |
Hi,
Thanks for the bug fix. The latest client-runtime.jar is working very well
along with guava.jar version 28.
It helped us to solve the critical issue in our product in time.
Thanks and regards,
Vinayak Kuchekar
…On Fri, May 8, 2020, 1:42 AM vcolin7 ***@***.***> wrote:
Hi Vinayak,
We will release a patch for this later this month, I will let you know
once we do so. The fix would be indeed a part of the
com.microsoft.rest:client-runtime library, which is a dependency of the
com.microsoft.azure:azure-keyvault library.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6553 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXAR35AAHFAG5KETV3DKVLRQMIZ5ANCNFSM4JRTW64Q>
.
|
Glad to hear that! We will be releasing a patch to include this dependency in KeyVault in the upcoming days as well. |
The new |
Hi,
We have integrated our product with Azure Blob Storage and communicate using the Azure Java SDK jars. As a jar dependency, we are using the guava.jar (version 26). This version of guava.jar uses unsafe API from Oracle Java SDK and hence not compatible with java 11. The jar provider has fixed these issues in latest version 28.1-jre. But azure-keyvault-extensions.jar(version 1.1) is not compatible with guava.jar (version 28.1-jre).
During Key Vault Key retrieval, request fails with CancellationException. I did analysis of this failure:
https://github.com/Azure/azure-keyvault-java/blob/master/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/KeyVaultKeyResolver.java#L108
private ListenableFuture resolveKeyFromKeyAsync(String kid) {
ListenableFuture futureCall = client.getKeyAsync(kid, null);
return Futures.transform(futureCall, new FutureKeyFromKey(), MoreExecutors.directExecutor());
}
Here, futureCall is able to return the result, but it also tell that the task was cancelled.
Futures.transform – API from Google’s guava.jar which is responsible for chaining for async calls, is working fine till 26th version of guava.jar - although task was cancelled.
But in 28th version of guava.jar, Google has made improvements over cancelled task. They just transfer the cancellation status to caller
Nested exception is: wt.objectstorage.exception.ObjectStorageException: java.util.concurrent.CancellationException: Task was cancelled.
Nested exception is: java.util.concurrent.CancellationException: Task was cancelled.
at com.google.common.util.concurrent.AbstractFuture.cancellationExceptionWithCause(AbstractFuture.java:1349)
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:550)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:513)
at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:86)
at com.ptc.windchill.objectstorage.azureblob.encryption.csekeyvault.CSEKeyVaultBlobEncryptConfig.getKeyVaultKey(CSEKeyVaultBlobEncryptConfig.java:98)
To Reproduce
Steps to reproduce the behavior:
Get Key from Key Vault Service using azure-keyvault-extensions.jar and guava.jar (version 28).
Code Snippet
KeyVaultConnectionParams kvConParams = keyProvider.getKeyVaultConnectionDetails(containerName, blobName);
KeyVaultCredentials kvCred = new KeyVaultCredentials() {
public String doAuthenticate(String authorization, String resource, String scope) {
AuthenticationResult token = getAccessTokenFromClientCredentials(authorization, resource, "", "");
return token.getAccessToken();
}
};
KeyVaultClient vc = new KeyVaultClient(kvCred);
KeyVaultKeyResolver cloudResolver = new KeyVaultKeyResolver(vc);
CachingKeyResolver cachingResolver = new CachingKeyResolver(1, cloudResolver);
IKey encryptionKey = cachingResolver.resolveKeyAsync("").get();
Expected behavior
We should be able to fetch the Key from Key Vault Service using guava.jar (version 28) and Azure Java SDK libraries.
No Screenshots
Setup :
azure-keyvault.jar (1.2.0)
azure-keyvault-core.jar (1.2.0)
azure-keyvault-cryptography.jar (1.2.0)
azure-keyvault-extensions.jar (1.2.0)
azure-keyvault-webkey.jar (1.2.0)
guava.jar (version 28.1-jre)
Additional context
We are upgrading the java support to version 11 for our product.
The text was updated successfully, but these errors were encountered: