diff --git a/README.md b/README.md
index 8624b3d..95768d8 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,71 @@
-# Contributing
+# Microsoft Azure Key Vault SDK for Java
-This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
+This is the Microsoft Azure Key Vault client library which allows for the consumption of Key Vault services. Azure Key Vault helps safeguard cryptographic keys and secrets used by cloud applications and services. By using Key Vault, you can encrypt keys and secrets (such as authentication keys, storage account keys, data encryption keys, .PFX files, and passwords) using keys protected by hardware security modules (HSMs). For added assurance, you can import or generate keys in HSMs. If you choose to do this, Microsoft processes your keys in FIPS 140-2 Level 2 validated HSMs (hardware and firmware).
+Key Vault streamlines the key management process and enables you to maintain control of keys that access and encrypt your data. Developers can create keys for development and testing in minutes, and then seamlessly migrate them to production keys. Security administrators can grant (and revoke) permission to keys, as needed.
+For more information refer to [What is Key Vault?](https://docs.microsoft.com/en-us/azure/key-vault/key-vault-whatis) or [Getting Started](https://docs.microsoft.com/en-us/azure/key-vault/key-vault-get-started).
+
+## Sample code
+You can find sample code that illustrates key vault usage scenarios [here](https://azure.microsoft.com/en-us/resources/samples/?sort=0&service=key-vault&platform=java).
+
+## Download
+
+To get the binaries of this library as distributed by Microsoft, ready for use within your project, you can use Maven.
+
+```xml
+
+ com.microsoft.azure
+ azure-keyvault
+ 1.1
+
+
+ com.microsoft.azure
+ azure-keyvault-cryptography
+ 1.1
+
+
+ com.microsoft.azure
+ azure-keyvault-extensions
+ 1.1
+
+
+ com.microsoft.azure
+ azure-keyvault-core
+ 1.1
+
+
+ com.microsoft.azure
+ azure-keyvault-webkey
+ 1.1
+
+```
+
+## Pre-requisites
+- A Java Developer Kit (JDK), v 1.7 or later
+- Maven
+
+## Building and Testing
+
+Clone the repo, then run `mvn compile` from the root directory.
+
+To run the recorded tests:
+1. If you have not already, you need to install the [Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files](http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html) package.
+2. run `mvn jetty:run` to start a jetty server. This starts a service that will block the terminal so you will likely want to open a second terminal to run the actual tests.
+3. In your second terminal run `mvn test`.
+
+## Contributing
+
+If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html).
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
+
+# More information
+* [Azure Key Vault Java Documentation](https://docs.microsoft.com/en-us/java/api/overview/azure/keyvault)
+* [What is Key Vault?](https://docs.microsoft.com/en-us/azure/key-vault/key-vault-whatis)
+* [Get started with Azure Key Vault](https://docs.microsoft.com/en-us/azure/key-vault/key-vault-get-started)
+* [Azure Key Vault General Documentation](https://docs.microsoft.com/en-us/azure/key-vault/)
+* [Azure Key Vault REST API Reference](https://docs.microsoft.com/en-us/rest/api/keyvault/)
+* [Azure Active Directory Documenation](https://docs.microsoft.com/en-us/azure/active-directory/)
diff --git a/REGENERATING.md b/REGENERATING.md
new file mode 100644
index 0000000..37b870b
--- /dev/null
+++ b/REGENERATING.md
@@ -0,0 +1,19 @@
+# Regenerating SDK
+
+The code in the azure-keyvault package is generated via AutoREST. After code generation, there are currently several manual modifications that need to be made for the build to succeed. In the root of the azure-keyvault-java repo, there is a Python script called "regenerate_and_fix_sdk.py" which will automatically regenerate the code and apply the necessary fixes. To regenerate the code using this script:
+
+- Install AutoREST: https://github.com/Azure/autorest/blob/master/docs/installing-autorest.md
+- Open the script in your favorite editor and change "swagger_source_branch" to contain the branch of the Azure REST spec API repo that you'd like the API spec to be sourced from – likely either "master" or "keyvault_preview"
+ - If there is a tag you'd like to pass to AutoREST – set the "autorest_tag" branch accordingly.
+- Using Python 3.6+, run the script from the root of the checked out repository. Verify that no errors appear, and then build/test the SDK.
+
+
+
+The changes made by the script post-regeneration are as follows:
+
+* The generated webkey models will be removed
+
+
+* Any generated model class which has a corresponding custom class in the "models/custom" folder will be changed to inherit from the custom class.
+* Any class which utilizes webkey models will have the correct imports from the azure-keyvault-webkey package added
+* AutoREST occasionally generates broken parameter declarations in the Javadoc comments - these are repaired.
\ No newline at end of file
diff --git a/azure-keyvault-core/pom.xml b/azure-keyvault-core/pom.xml
index 8ce615a..7b53f5e 100644
--- a/azure-keyvault-core/pom.xml
+++ b/azure-keyvault-core/pom.xml
@@ -8,7 +8,7 @@
com.microsoft.azureazure-keyvault-parent
- 1.0.1-SNAPSHOT
+ 1.1../pom.xml
diff --git a/azure-keyvault-core/src/main/java/com/microsoft/azure/keyvault/core/IKeyResolver.java b/azure-keyvault-core/src/main/java/com/microsoft/azure/keyvault/core/IKeyResolver.java
index e0b08e9..635dd80 100644
--- a/azure-keyvault-core/src/main/java/com/microsoft/azure/keyvault/core/IKeyResolver.java
+++ b/azure-keyvault-core/src/main/java/com/microsoft/azure/keyvault/core/IKeyResolver.java
@@ -1,19 +1,7 @@
/**
- *
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
*/
package com.microsoft.azure.keyvault.core;
diff --git a/azure-keyvault-cryptography/pom.xml b/azure-keyvault-cryptography/pom.xml
index aa3b6e6..66f8eba 100644
--- a/azure-keyvault-cryptography/pom.xml
+++ b/azure-keyvault-cryptography/pom.xml
@@ -1,45 +1,43 @@
-
-
- 4.0.0
+
+
+ 4.0.0com.microsoft.azureazure-keyvault-parent
- 1.0.1-SNAPSHOT
+ 1.1../pom.xml
- azure-keyvault-cryptography
- jar
+ azure-keyvault-cryptography
+ jar
- Microsoft Azure SDK for Key Vault Cryptography
- This package contains Microsoft Azure SDK for Key Vault Cryptography.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for Key Vault Cryptography
+ This package contains Microsoft Azure SDK for Key Vault Cryptography.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- scm:git:https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
-
- UTF-8
-
+
+ UTF-8
+
- true
-
+ true
+
@@ -52,17 +50,28 @@
org.bouncycastlebcprov-jdk15ontest
- 1.54
-
-
- com.microsoft.azure
- azure-keyvault-core
- 1.0.1-SNAPSHOT
+ 1.59com.microsoft.azureazure-keyvault-webkey
- 1.0.1-SNAPSHOT
+ 1.1
+
+ com.microsoft.azure
+ azure-keyvault-core
+ 1.0.0
+
+
+ com.microsoft.rest
+ client-runtime
+ 1.3.0
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ 1.3.0
+
+
diff --git a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/AlgorithmResolver.java b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/AlgorithmResolver.java
index 60930c8..1ac5c06 100644
--- a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/AlgorithmResolver.java
+++ b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/AlgorithmResolver.java
@@ -18,6 +18,10 @@
import com.microsoft.azure.keyvault.cryptography.algorithms.AesKw128;
import com.microsoft.azure.keyvault.cryptography.algorithms.AesKw192;
import com.microsoft.azure.keyvault.cryptography.algorithms.AesKw256;
+import com.microsoft.azure.keyvault.cryptography.algorithms.Es256k;
+import com.microsoft.azure.keyvault.cryptography.algorithms.Es256;
+import com.microsoft.azure.keyvault.cryptography.algorithms.Es384;
+import com.microsoft.azure.keyvault.cryptography.algorithms.Es512;
import com.microsoft.azure.keyvault.cryptography.algorithms.Rs256;
import com.microsoft.azure.keyvault.cryptography.algorithms.Rsa15;
import com.microsoft.azure.keyvault.cryptography.algorithms.RsaOaep;
@@ -44,6 +48,11 @@ public class AlgorithmResolver {
Default.put( Rs256.ALGORITHM_NAME, new Rs256() );
// Default.put( RsNull.ALGORITHM_NAME, new RsNull() );
+
+ Default.put(Es256k.ALGORITHM_NAME, new Es256k());
+ Default.put(Es256.ALGORITHM_NAME, new Es256());
+ Default.put(Es384.ALGORITHM_NAME, new Es384());
+ Default.put(Es512.ALGORITHM_NAME, new Es512());
}
private final ConcurrentMap _algorithms = new ConcurrentHashMap();
diff --git a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/EcKey.java b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/EcKey.java
new file mode 100644
index 0000000..fc82ad2
--- /dev/null
+++ b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/EcKey.java
@@ -0,0 +1,397 @@
+package com.microsoft.azure.keyvault.cryptography;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Provider;
+import java.security.Security;
+import java.security.interfaces.ECPublicKey;
+import java.security.spec.ECGenParameterSpec;
+import java.security.spec.ECParameterSpec;
+import java.security.spec.EllipticCurve;
+import java.security.spec.InvalidKeySpecException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.commons.lang3.tuple.Triple;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.microsoft.azure.keyvault.core.IKey;
+import com.microsoft.azure.keyvault.cryptography.algorithms.Ecdsa;
+import com.microsoft.azure.keyvault.cryptography.algorithms.Es256k;
+import com.microsoft.azure.keyvault.cryptography.algorithms.Es256;
+import com.microsoft.azure.keyvault.cryptography.algorithms.Es384;
+import com.microsoft.azure.keyvault.cryptography.algorithms.Es512;
+import com.microsoft.azure.keyvault.webkey.JsonWebKey;
+import com.microsoft.azure.keyvault.webkey.JsonWebKeyCurveName;
+
+
+public class EcKey implements IKey {
+
+ public static final String P256 = "secp256r1";
+ public static final String P384 = "secp384r1";
+ public static final String P521 = "secp521r1";
+ public static final String P256K = "secp256k1";
+ public static final Map CURVE_TO_SIGNATURE = ImmutableMap.builder()
+ .put(JsonWebKeyCurveName.P_256, Es256.ALGORITHM_NAME)
+ .put(JsonWebKeyCurveName.P_384, Es384.ALGORITHM_NAME)
+ .put(JsonWebKeyCurveName.P_521, Es512.ALGORITHM_NAME)
+ .put(JsonWebKeyCurveName.P_256K, Es256k.ALGORITHM_NAME)
+ .build();
+ public static final Map CURVE_TO_SPEC_NAME = ImmutableMap.builder()
+ .put(JsonWebKeyCurveName.P_256, P256)
+ .put(JsonWebKeyCurveName.P_384, P384)
+ .put(JsonWebKeyCurveName.P_521, P521)
+ .put(JsonWebKeyCurveName.P_256K, P256K)
+ .build();
+
+
+ private final String _kid;
+ private final KeyPair _keyPair;
+ private final Provider _provider;
+ private final JsonWebKeyCurveName _curve;
+
+ protected final String _signatureAlgorithm;
+ protected String defaultEncryptionAlgorithm;
+
+ public static JsonWebKeyCurveName getDefaultCurve() {
+ return JsonWebKeyCurveName.P_256;
+ }
+
+ /**
+ * Constructor.
+ *
+ * Generates a new EcKey with a P_256 curve and a randomly generated kid.
+ *
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidAlgorithmParameterException
+ */
+ public EcKey() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
+ this(UUID.randomUUID().toString());
+ }
+
+ /**
+ * Constructor.
+ *
+ * Generates a new EcKey with a P_256 curve and the given kid.
+ *
+ * @param kid
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidAlgorithmParameterException
+ */
+ public EcKey(String kid) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
+ this(kid, getDefaultCurve(), Security.getProvider("SunEC"));
+ }
+
+ /**
+ * Constructor.
+ *
+ * Generates a new EcKey with the given curve and kid.
+ * @param kid
+ * @param curve
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidAlgorithmParameterException
+ */
+ public EcKey(String kid, JsonWebKeyCurveName curve) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
+ this(kid, curve, Security.getProvider("SunEC"));
+ }
+
+ /**
+ * Constructor.
+ *
+ * Generates a new EcKey with the given curve and kid.
+ * @param kid
+ * @param curve
+ * @param provider Java security provider
+ * @throws InvalidAlgorithmParameterException
+ * @throws NoSuchAlgorithmException
+ */
+ public EcKey(String kid, JsonWebKeyCurveName curve, Provider provider) throws InvalidAlgorithmParameterException, NoSuchAlgorithmException {
+ _kid = kid;
+ _provider = provider;
+ _curve = curve;
+
+ _signatureAlgorithm = CURVE_TO_SIGNATURE.get(curve);
+ if (_signatureAlgorithm == null) {
+ throw new NoSuchAlgorithmException("Curve not supported.");
+ }
+
+ final KeyPairGenerator generator = KeyPairGenerator.getInstance("EC", provider);
+ ECGenParameterSpec gps = new ECGenParameterSpec(CURVE_TO_SPEC_NAME.get(curve));
+
+ generator.initialize(gps);
+ _keyPair = generator.generateKeyPair();
+
+ }
+
+ /**
+ * Constructor.
+ *
+ * Generates a new EcKey with the given keyPair.
+ * The keyPair must be an ECKey.
+ * @param kid
+ * @param keyPair
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidAlgorithmParameterException
+ */
+ public EcKey(String kid, KeyPair keyPair) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
+ this(kid, keyPair, Security.getProvider("SunEC"));
+ }
+
+ /**
+ * Constructor.
+ *
+ * Generates a new EcKey with the given keyPair.
+ * The keyPair must be an ECKey.
+ * @param kid
+ * @param keyPair
+ * @param provider Java security provider
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidAlgorithmParameterException
+ */
+ public EcKey(String kid, KeyPair keyPair, Provider provider) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException {
+
+ if (Strings.isNullOrWhiteSpace(kid)) {
+ throw new IllegalArgumentException("Please provide a kid");
+ }
+
+ if (keyPair == null) {
+ throw new IllegalArgumentException("Please provide an ECKey");
+ }
+
+ if (keyPair.getPublic() == null || !(keyPair.getPublic() instanceof ECPublicKey)) {
+ throw new IllegalArgumentException("The keyPair provided is not an ECKey");
+ }
+
+ _kid = kid;
+ _keyPair = keyPair;
+ _provider = provider;
+ _curve = getCurveFromKeyPair(keyPair);
+ _signatureAlgorithm = CURVE_TO_SIGNATURE.get(_curve);
+ if (_signatureAlgorithm == null) {
+ throw new IllegalArgumentException("Curve not supported.");
+ }
+ }
+
+ /**
+ * Converts JSON web key to EC key pair, does not include the private key.
+ * @param jwk
+ * @return EcKey
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidAlgorithmParameterException
+ * @throws InvalidKeySpecException
+ * @throws NoSuchProviderException
+ */
+ public static EcKey fromJsonWebKey(JsonWebKey jwk) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeySpecException, NoSuchProviderException {
+ return fromJsonWebKey(jwk, false, null);
+ }
+
+ /**
+ * Converts JSON web key to EC key pair and include the private key if set to true.
+ * @param jwk
+ * @param includePrivateParameters true if the EC key pair should include the private key. False otherwise.
+ * @return EcKey
+ * @throws NoSuchAlgorithmException
+ * @throws InvalidAlgorithmParameterException
+ * @throws InvalidKeySpecException
+ * @throws NoSuchProviderException
+ */
+ public static EcKey fromJsonWebKey(JsonWebKey jwk, boolean includePrivateParameters) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeySpecException, NoSuchProviderException {
+ return fromJsonWebKey(jwk, includePrivateParameters, null);
+ }
+
+ /**
+ * Converts JSON web key to EC key pair and include the private key if set to true.
+ * @param jwk
+ * @param includePrivateParameters true if the EC key pair should include the private key. False otherwise.
+ * @param provider the Java Security Provider
+ * @return EcKey
+ */
+ public static EcKey fromJsonWebKey(JsonWebKey jwk, boolean includePrivateParameters, Provider provider) {
+ try {
+ if (jwk.kid() != null) {
+ return new EcKey(jwk.kid(), jwk.toEC(includePrivateParameters, provider));
+ } else {
+ throw new IllegalArgumentException("Json Web Key should have a kid");
+ }
+ } catch (GeneralSecurityException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ /**
+ * Converts EcKey to JSON web key.
+ * @return
+ */
+ public JsonWebKey toJsonWebKey() {
+ return JsonWebKey.fromEC(_keyPair, _provider);
+ }
+
+ // Matches the curve of the keyPair to supported curves.
+ private JsonWebKeyCurveName getCurveFromKeyPair(KeyPair keyPair) {
+ try {
+ ECPublicKey key = (ECPublicKey) keyPair.getPublic();
+ ECParameterSpec spec = key.getParams();
+ EllipticCurve crv = spec.getCurve();
+
+ List curveList = Arrays.asList(JsonWebKeyCurveName.P_256, JsonWebKeyCurveName.P_384, JsonWebKeyCurveName.P_521, JsonWebKeyCurveName.P_256K);
+
+ for (JsonWebKeyCurveName curve : curveList) {
+ ECGenParameterSpec gps = new ECGenParameterSpec(CURVE_TO_SPEC_NAME.get(curve));
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC", _provider);
+ kpg.initialize(gps);
+
+ // Generate dummy keypair to get parameter spec.
+ KeyPair apair = kpg.generateKeyPair();
+ ECPublicKey apub = (ECPublicKey) apair.getPublic();
+ ECParameterSpec aspec = apub.getParams();
+ EllipticCurve acurve = aspec.getCurve();
+
+ //Matches the parameter spec
+ if (acurve.equals(crv)) {
+ return curve;
+ }
+ }
+
+ //Did not find a supported curve.
+ throw new IllegalArgumentException ("Curve not supported.");
+ } catch (GeneralSecurityException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ /**
+ * @return curve of the key
+ */
+ public JsonWebKeyCurveName getCurve() {
+ return _curve;
+ }
+
+ /**
+ *
+ * @return the underlying keyPair of the key
+ */
+ public KeyPair getKeyPair() {
+ return _keyPair;
+ }
+
+ @Override
+ public void close() throws IOException {
+ // Intentionally empty
+ }
+
+ @Override
+ public String getDefaultEncryptionAlgorithm() {
+ return null;
+ }
+
+ @Override
+ public String getDefaultKeyWrapAlgorithm() {
+ return null;
+ }
+
+ @Override
+ public String getDefaultSignatureAlgorithm() {
+ return _signatureAlgorithm;
+ }
+
+ @Override
+ public String getKid() {
+ return _kid;
+ }
+
+ @Override
+ public ListenableFuture decryptAsync(byte[] ciphertext, byte[] iv, byte[] authenticationData,
+ byte[] authenticationTag, String algorithm) throws NoSuchAlgorithmException {
+ throw new UnsupportedOperationException("Decrypt Async is not supported");
+ }
+
+ @Override
+ public ListenableFuture> encryptAsync(byte[] plaintext, byte[] iv,
+ byte[] authenticationData, String algorithm) throws NoSuchAlgorithmException {
+ throw new UnsupportedOperationException("Encrypt Async is not supported");
+ }
+
+ @Override
+ public ListenableFuture> wrapKeyAsync(byte[] key, String algorithm)
+ throws NoSuchAlgorithmException {
+ throw new UnsupportedOperationException("Wrap key is not supported");
+ }
+
+ @Override
+ public ListenableFuture unwrapKeyAsync(byte[] encryptedKey, String algorithm)
+ throws NoSuchAlgorithmException {
+ throw new UnsupportedOperationException("Unwrap key is not supported");
+ }
+
+ @Override
+ public ListenableFuture> signAsync(byte[] digest, String algorithm) throws NoSuchAlgorithmException {
+
+ if (_keyPair.getPrivate() == null) {
+ throw new UnsupportedOperationException("Sign is not supported without a private key.");
+ }
+
+ if (digest == null) {
+ throw new IllegalArgumentException("Please provide a digest to sign.");
+ }
+
+ if (Strings.isNullOrWhiteSpace(algorithm)) {
+ throw new IllegalArgumentException("Please provide a signature algorithm to use.");
+ }
+
+ // Interpret the requested algorithm
+ Algorithm baseAlgorithm = AlgorithmResolver.Default.get(algorithm);
+
+ if (baseAlgorithm == null || !(baseAlgorithm instanceof AsymmetricSignatureAlgorithm)) {
+ throw new NoSuchAlgorithmException(algorithm);
+ }
+
+ Ecdsa algo = (Ecdsa) baseAlgorithm;
+ ISignatureTransform signer = algo.createSignatureTransform(_keyPair, _provider);
+
+ try {
+ return Futures.immediateFuture(Pair.of(signer.sign(digest), algorithm));
+ } catch (Exception e) {
+ return Futures.immediateFailedFuture(e);
+ }
+ }
+
+ @Override
+ public ListenableFuture verifyAsync(byte[] digest, byte[] signature, String algorithm) throws NoSuchAlgorithmException {
+
+ if (digest == null) {
+ throw new IllegalArgumentException("Please provide a digest input.");
+ }
+
+ if (Strings.isNullOrWhiteSpace(algorithm)) {
+ throw new IllegalArgumentException("Please provide an algorithm");
+ }
+
+ // Interpret the requested algorithm
+ Algorithm baseAlgorithm = AlgorithmResolver.Default.get(algorithm);
+
+ if (baseAlgorithm == null || !(baseAlgorithm instanceof AsymmetricSignatureAlgorithm)) {
+ throw new NoSuchAlgorithmException(algorithm);
+ }
+
+ Ecdsa algo = (Ecdsa) baseAlgorithm;
+
+ ISignatureTransform signer = algo.createSignatureTransform(_keyPair, _provider);
+
+ try {
+ return Futures.immediateFuture(signer.verify(digest, signature));
+ } catch (Exception e) {
+ return Futures.immediateFailedFuture(e);
+ }
+ }
+
+}
diff --git a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/RsaKey.java b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/RsaKey.java
index c8807fc..c0ae1b5 100644
--- a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/RsaKey.java
+++ b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/RsaKey.java
@@ -12,6 +12,7 @@
import java.security.NoSuchAlgorithmException;
import java.security.Provider;
import java.security.interfaces.RSAPublicKey;
+import java.util.UUID;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.commons.lang3.tuple.Triple;
@@ -21,12 +22,13 @@
import com.microsoft.azure.keyvault.core.IKey;
import com.microsoft.azure.keyvault.cryptography.algorithms.Rs256;
import com.microsoft.azure.keyvault.cryptography.algorithms.RsaOaep;
-import com.microsoft.azure.keyvault.cryptography.Strings;
+import com.microsoft.azure.keyvault.webkey.JsonWebKey;
public class RsaKey implements IKey {
public static int KeySize1024 = 1024;
public static int KeySize2048 = 2048;
+ public static int KeySize4096 = 4096;
public static int getDefaultKeySize() {
return RsaKey.KeySize2048;
@@ -36,14 +38,48 @@ public static int getDefaultKeySize() {
private final KeyPair _keyPair;
private final Provider _provider;
+ /**
+ * Constructor.
+ *
+ * Generates a new RsaKey with a 2048 size keypair and a randomly generated kid.
+ * @throws NoSuchAlgorithmException
+ */
+ public RsaKey() throws NoSuchAlgorithmException {
+ this(UUID.randomUUID().toString());
+ }
+
+ /**
+ * Constructor.
+ *
+ * Generates a new RsaKey with a 2048 size keypair and the kid given.
+ * @param kid
+ * @throws NoSuchAlgorithmException
+ */
public RsaKey(String kid) throws NoSuchAlgorithmException {
this(kid, getDefaultKeySize());
}
+ /**
+ * Constructor.
+ *
+ * Generates a new RsaKey with size keySize and the kid given.
+ * @param kid
+ * @param keySize
+ * @throws NoSuchAlgorithmException
+ */
public RsaKey(String kid, int keySize) throws NoSuchAlgorithmException {
this(kid, keySize, null);
}
+ /**
+ * Constructor.
+ *
+ * Generates a new RsaKey with size keySize and the kid given. The given provider is used for algorithm implementation.
+ * @param kid
+ * @param keySize
+ * @param provider Java security provider.
+ * @throws NoSuchAlgorithmException
+ */
public RsaKey(String kid, int keySize, Provider provider) throws NoSuchAlgorithmException {
if (Strings.isNullOrWhiteSpace(kid)) {
@@ -59,22 +95,39 @@ public RsaKey(String kid, int keySize, Provider provider) throws NoSuchAlgorithm
_provider = provider;
}
+ /**
+ * Constructor.
+ *
+ * Generates a new RsaKey with the given KeyPair.
+ * The keyPair must be an RSAKey.
+ * @param kid
+ * @param keyPair
+ */
public RsaKey(String kid, KeyPair keyPair) {
this(kid, keyPair, null);
}
+ /**
+ * Constructor.
+ *
+ * Generates a new RsaKey with given KeyPair. The given provider is used for algorithm implementation.
+ * The keyPair must be an RSAKey.
+ * @param kid
+ * @param keyPair
+ * @param provider Java security provider
+ */
public RsaKey(String kid, KeyPair keyPair, Provider provider) {
- if (Strings.isNullOrWhiteSpace(kid)) {
- throw new IllegalArgumentException("kid");
- }
-
+ if (Strings.isNullOrWhiteSpace(kid)) {
+ throw new IllegalArgumentException("Please provide a kid");
+ }
+
if (keyPair == null) {
- throw new IllegalArgumentException("kid");
+ throw new IllegalArgumentException("Please provide a KeyPair");
}
if (keyPair.getPublic() == null || !(keyPair.getPublic() instanceof RSAPublicKey)) {
- throw new IllegalArgumentException("keyPair");
+ throw new IllegalArgumentException("The KeyPair is not an RsaKey");
}
_kid = kid;
@@ -82,6 +135,47 @@ public RsaKey(String kid, KeyPair keyPair, Provider provider) {
_provider = provider;
}
+ /**
+ * Converts JSON web key to RsaKey.
+ * @param jwk
+ * @return RsaKey
+ */
+ public static RsaKey fromJsonWebKey(JsonWebKey jwk) {
+ return fromJsonWebKey(jwk, false, null);
+ }
+
+ /**
+ * Converts JSON web key to RsaKey and include the private key if set to true.
+ * @param jwk
+ * @param includePrivateParameters true if the RSA key pair should include the private key. False otherwise.
+ * @return RsaKey
+ */
+ public static RsaKey fromJsonWebKey(JsonWebKey jwk, boolean includePrivateParameters) {
+ return fromJsonWebKey(jwk, includePrivateParameters, null);
+ }
+
+ /**
+ * Converts JSON web key to RsaKey and include the private key if set to true.
+ * @param provider the Java security provider.
+ * @param includePrivateParameters true if the RSA key pair should include the private key. False otherwise.
+ * @return RsaKey
+ */
+ public static RsaKey fromJsonWebKey(JsonWebKey jwk, boolean includePrivateParameters, Provider provider) {
+ if (jwk.kid() != null) {
+ return new RsaKey(jwk.kid(), jwk.toRSA(includePrivateParameters, provider));
+ } else {
+ throw new IllegalArgumentException("Json Web Key must have a kid");
+ }
+ }
+
+ /**
+ * Converts RsaKey to JSON web key.
+ * @return
+ */
+ public JsonWebKey toJsonWebKey() {
+ return JsonWebKey.fromRSA(_keyPair);
+ }
+
@Override
public String getDefaultEncryptionAlgorithm() {
return RsaOaep.ALGORITHM_NAME;
@@ -102,6 +196,10 @@ public String getKid() {
return _kid;
}
+ public KeyPair getKeyPair() {
+ return _keyPair;
+ }
+
@Override
public ListenableFuture decryptAsync(final byte[] ciphertext, final byte[] iv, final byte[] authenticationData, final byte[] authenticationTag, final String algorithm) throws NoSuchAlgorithmException {
diff --git a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Ecdsa.java b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Ecdsa.java
new file mode 100644
index 0000000..a13fa07
--- /dev/null
+++ b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Ecdsa.java
@@ -0,0 +1,54 @@
+package com.microsoft.azure.keyvault.cryptography.algorithms;
+
+import java.security.GeneralSecurityException;
+import java.security.KeyPair;
+import java.security.Provider;
+import java.security.Signature;
+
+import com.microsoft.azure.keyvault.cryptography.AsymmetricSignatureAlgorithm;
+import com.microsoft.azure.keyvault.cryptography.ISignatureTransform;
+
+public abstract class Ecdsa extends AsymmetricSignatureAlgorithm {
+
+ protected Ecdsa() {
+ super("NONEwithEDCSA");
+ }
+
+ public ISignatureTransform createSignatureTransform(KeyPair key, Provider provider) {
+ return new EcdsaSignatureTransform(key, provider);
+ }
+
+ abstract void checkDigestLength(byte[] digest);
+
+
+ class EcdsaSignatureTransform implements ISignatureTransform {
+ private final String ALGORITHM = "NONEwithECDSA";
+ private final KeyPair _keyPair;
+
+ private final Provider _provider;
+
+ public EcdsaSignatureTransform(KeyPair keyPair, Provider provider) {
+ _keyPair = keyPair;
+ _provider = provider;
+ }
+
+ @Override
+ public byte[] sign(byte[] digest) throws GeneralSecurityException {
+ checkDigestLength(digest);
+ Signature signature = Signature.getInstance(ALGORITHM, _provider);
+ signature.initSign(_keyPair.getPrivate());
+ signature.update(digest);
+ return signature.sign();
+ }
+
+ @Override
+ public boolean verify(byte[] digest, byte[] signature) throws GeneralSecurityException {
+ Signature verify = Signature.getInstance(ALGORITHM, _provider);
+ checkDigestLength(digest);
+ verify.initVerify(_keyPair.getPublic());
+ verify.update(digest);
+ return verify.verify(signature);
+ }
+
+ }
+}
diff --git a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es256.java b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es256.java
new file mode 100644
index 0000000..c9ae074
--- /dev/null
+++ b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es256.java
@@ -0,0 +1,12 @@
+package com.microsoft.azure.keyvault.cryptography.algorithms;
+
+public class Es256 extends Ecdsa {
+ public final static String ALGORITHM_NAME = "SHA256withECDSA";
+
+ @Override
+ public void checkDigestLength(byte[] digest) {
+ if (digest.length != 32) {
+ throw new IllegalArgumentException("Invalid digest length.");
+ }
+ }
+}
diff --git a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es256k.java b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es256k.java
new file mode 100644
index 0000000..b788979
--- /dev/null
+++ b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es256k.java
@@ -0,0 +1,12 @@
+package com.microsoft.azure.keyvault.cryptography.algorithms;
+
+public class Es256k extends Ecdsa {
+ public final static String ALGORITHM_NAME = "NONEwithECDSA";
+
+ @Override
+ public void checkDigestLength(byte[] digest) {
+ if (digest.length != 32) {
+ throw new IllegalArgumentException("Invalid digest length.");
+ }
+ }
+}
diff --git a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es384.java b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es384.java
new file mode 100644
index 0000000..7785fdb
--- /dev/null
+++ b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es384.java
@@ -0,0 +1,13 @@
+package com.microsoft.azure.keyvault.cryptography.algorithms;
+
+public class Es384 extends Ecdsa {
+
+ public final static String ALGORITHM_NAME = "SHA384withECDSA";
+
+ @Override
+ public void checkDigestLength(byte[] digest) {
+ if (digest.length != 48) {
+ throw new IllegalArgumentException("Invalid digest length.");
+ }
+ }
+}
diff --git a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es512.java b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es512.java
new file mode 100644
index 0000000..32fdd37
--- /dev/null
+++ b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/Es512.java
@@ -0,0 +1,13 @@
+package com.microsoft.azure.keyvault.cryptography.algorithms;
+
+public class Es512 extends Ecdsa {
+
+ public final static String ALGORITHM_NAME = "SHA512withECDSA";
+
+ @Override
+ public void checkDigestLength(byte[] digest) {
+ if (digest.length != 64) {
+ throw new IllegalArgumentException("Invalid digest length.");
+ }
+ }
+}
diff --git a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/RsaSignature.java b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/RsaSignature.java
index 84d2257..2e5a475 100644
--- a/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/RsaSignature.java
+++ b/azure-keyvault-cryptography/src/main/java/com/microsoft/azure/keyvault/cryptography/algorithms/RsaSignature.java
@@ -12,6 +12,8 @@
import java.security.NoSuchAlgorithmException;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
+import java.util.Arrays;
+
import com.microsoft.azure.keyvault.cryptography.AsymmetricSignatureAlgorithm;
import com.microsoft.azure.keyvault.cryptography.ISignatureTransform;
import com.microsoft.azure.keyvault.cryptography.Strings;
@@ -57,8 +59,15 @@ protected byte[] I2OSP(BigInteger x, int xLen) {
if ( x.compareTo( twoFiveSix.pow(xLen) ) == 1 ) {
throw new IllegalArgumentException("integer too large");
}
-
- byte[] bytes = x.toByteArray();
+
+ // Even if x is less than 256^xLen, sometiems x.toByteArray() returns 257 bytes with leading zero
+ byte[] bigEndianBytes = x.toByteArray();
+ byte[] bytes;
+ if (bigEndianBytes.length == 257 && bigEndianBytes[0] == 0) {
+ bytes = Arrays.copyOfRange(bigEndianBytes, 1, 257);
+ } else {
+ bytes = bigEndianBytes;
+ }
if ( bytes.length > xLen ) {
throw new IllegalArgumentException("integer too large");
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/ECKeyBCProviderTest.java b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/ECKeyBCProviderTest.java
new file mode 100644
index 0000000..545c0eb
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/ECKeyBCProviderTest.java
@@ -0,0 +1,16 @@
+package com.microsoft.azure.keyvault.cryptography.test;
+
+import java.security.Provider;
+import org.junit.Before;
+
+public class ECKeyBCProviderTest extends ECKeyTest {
+
+ @Before
+ public void setUp() throws Exception {
+ try {
+ super.setProvider((Provider) Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider").newInstance());
+ } catch (Exception ex) {
+ throw new RuntimeException(ex.getMessage());
+ }
+ }
+}
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/ECKeyTest.java b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/ECKeyTest.java
new file mode 100644
index 0000000..748c75f
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/ECKeyTest.java
@@ -0,0 +1,324 @@
+package com.microsoft.azure.keyvault.cryptography.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.KeyFactory;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.Provider;
+import java.security.PublicKey;
+import java.security.Security;
+import java.security.interfaces.ECPrivateKey;
+import java.security.interfaces.ECPublicKey;
+import java.security.spec.ECGenParameterSpec;
+import java.security.spec.ECPoint;
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ExecutionException;
+
+import org.apache.commons.lang3.tuple.Pair;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableMap;
+import com.microsoft.azure.keyvault.cryptography.EcKey;
+import com.microsoft.azure.keyvault.cryptography.test.resources.PemFile;
+import com.microsoft.azure.keyvault.webkey.JsonWebKey;
+import com.microsoft.azure.keyvault.webkey.JsonWebKeyCurveName;
+import com.microsoft.azure.keyvault.webkey.JsonWebKeyType;
+
+public class ECKeyTest {
+
+ private static Provider _provider = null;
+
+ static byte[] CEK;
+ static KeyFactory FACTORY;
+ static MessageDigest DIGEST_256;
+ static MessageDigest DIGEST_384;
+ static MessageDigest DIGEST_512;
+ static KeyPairGenerator EC_KEY_GENERATOR;
+ static Map CURVE_TO_DIGEST;
+ static List CURVE_LIST;
+
+// To create keys and signatures used in this class with openssl:
+//
+// Create key
+// openssl ecparam -name {curve_name} -genkey > {key_name}.pem
+// openssl pkcs8 -topk8 -nocrypt -in {key_name}.pem -out {key_name}pkcs8.pem
+// openssl ec -in {key_name}pkcs8.pem -pubout -out {key_name}pkcs8pub.pem
+//
+// Sign key
+// openssl dgst -{sha_digest} -sign {key_name}pkcs8.pem -out {signature}
+//
+// Verify key
+// openssl dgst -{sha_digest} -verify {key_name}pkcs8pub.pem -signature {signature}
+
+
+ protected static void setProvider(Provider provider) {
+ _provider = provider;
+ }
+
+ @BeforeClass
+ public static void setUpBeforeClass() throws Exception {
+ setProvider(Security.getProvider("SunEC"));
+ EC_KEY_GENERATOR = KeyPairGenerator.getInstance("EC", _provider);
+
+ Path byte_location = Paths.get("src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/byte_array.bin");
+ CEK = Files.readAllBytes(byte_location);
+
+ FACTORY = KeyFactory.getInstance("EC", _provider);
+
+ DIGEST_256 = MessageDigest.getInstance("SHA-256");
+ DIGEST_384 = MessageDigest.getInstance("SHA-384");
+ DIGEST_512 = MessageDigest.getInstance("SHA-512");
+
+ CURVE_TO_DIGEST = ImmutableMap.builder()
+ .put(JsonWebKeyCurveName.P_256, DIGEST_256)
+ .put(JsonWebKeyCurveName.P_384, DIGEST_384)
+ .put(JsonWebKeyCurveName.P_521, DIGEST_512)
+ .put(JsonWebKeyCurveName.P_256K, DIGEST_256)
+ .build();
+ //JsonWebKeyCurveName.SECP256K1)
+ CURVE_LIST = Arrays.asList(JsonWebKeyCurveName.P_256, JsonWebKeyCurveName.P_384, JsonWebKeyCurveName.P_521, JsonWebKeyCurveName.P_256K);
+ }
+
+ @Test
+ public void testCurves() throws Exception {
+ for (JsonWebKeyCurveName crv : CURVE_LIST) {
+ EcKey key = new EcKey("keyId", crv);
+ doSignVerify(key, CURVE_TO_DIGEST.get(crv));
+ }
+ }
+
+ @Test(expected = NoSuchAlgorithmException.class)
+ public void testUnsupportedCurve() throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InstantiationException, IllegalAccessException, ClassNotFoundException {
+ EcKey key = new EcKey("keyId", new JsonWebKeyCurveName("not an algo"));
+ }
+
+ @Test
+ public void testDefaultKey() throws Exception {
+ EcKey key = new EcKey("keyId");
+ doSignVerify(key, DIGEST_256);
+ }
+
+ @Test
+ public void testWithKeyPair() throws Exception {
+ for (JsonWebKeyCurveName crv : CURVE_LIST) {
+ ECGenParameterSpec gps = new ECGenParameterSpec(EcKey.CURVE_TO_SPEC_NAME.get(crv));
+ EC_KEY_GENERATOR.initialize(gps);
+ KeyPair keyPair = EC_KEY_GENERATOR.generateKeyPair();
+
+ final String name = "keyid";
+ EcKey key = new EcKey(name, keyPair);
+ assertEquals(name, key.getKid());
+ assertEquals(crv, key.getCurve());
+ doSignVerify(key, CURVE_TO_DIGEST.get(crv));
+ }
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void testWithNotCurveKeyPair() throws Exception {
+ ECGenParameterSpec gps = new ECGenParameterSpec("secp192k1");
+ EC_KEY_GENERATOR.initialize(gps);
+ KeyPair keyPair = EC_KEY_GENERATOR.generateKeyPair();
+
+ final String name = "keyid";
+ EcKey key = new EcKey(name, keyPair);
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void testFromJsonWebKeyPublicOnly() throws Exception {
+ ECGenParameterSpec gps = new ECGenParameterSpec(EcKey.P256);
+ EC_KEY_GENERATOR.initialize(gps);
+ KeyPair keyPair = EC_KEY_GENERATOR.generateKeyPair();
+
+ ECPublicKey apub = (ECPublicKey) keyPair.getPublic();
+ ECPoint point = apub.getW();
+
+ JsonWebKey jwk = new JsonWebKey()
+ .withKid("kid")
+ .withCrv(JsonWebKeyCurveName.P_256)
+ .withX(point.getAffineX().toByteArray())
+ .withY(point.getAffineY().toByteArray())
+ .withKty(JsonWebKeyType.EC);
+
+ assertFalse(jwk.hasPrivateKey());
+
+ EcKey newKey = EcKey.fromJsonWebKey(jwk, false);
+ assertEquals("kid", newKey.getKid());
+ doSignVerify(newKey, DIGEST_256);
+ }
+
+ @Test
+ public void testFromJsonWebKey() throws Exception {
+ ECGenParameterSpec gps = new ECGenParameterSpec(EcKey.P384);
+ EC_KEY_GENERATOR.initialize(gps);
+ KeyPair keyPair = EC_KEY_GENERATOR.generateKeyPair();
+
+ ECPublicKey apub = (ECPublicKey) keyPair.getPublic();
+ ECPoint point = apub.getW();
+ ECPrivateKey apriv = (ECPrivateKey) keyPair.getPrivate();
+
+ JsonWebKey jwk = new JsonWebKey()
+ .withKid("kid")
+ .withCrv(JsonWebKeyCurveName.P_384)
+ .withX(point.getAffineX().toByteArray())
+ .withY(point.getAffineY().toByteArray())
+ .withD(apriv.getS().toByteArray())
+ .withKty(JsonWebKeyType.EC);
+
+ assertTrue(jwk.hasPrivateKey());
+
+ EcKey newKey = EcKey.fromJsonWebKey(jwk, true);
+ assertEquals("kid", newKey.getKid());
+ doSignVerify(newKey, DIGEST_384);
+ }
+
+ private static PrivateKey generatePrivateKey(KeyFactory factory, String filename) throws InvalidKeySpecException, FileNotFoundException, IOException {
+ PemFile pemFile = new PemFile(filename);
+ byte[] content = pemFile.getPemObject().getContent();
+ PKCS8EncodedKeySpec privKeySpec = new PKCS8EncodedKeySpec(content);
+ return factory.generatePrivate(privKeySpec);
+ }
+
+ private static PublicKey generatePublicKey(KeyFactory factory, String filename) throws InvalidKeySpecException, FileNotFoundException, IOException {
+ PemFile pemFile = new PemFile(filename);
+ byte[] content = pemFile.getPemObject().getContent();
+ X509EncodedKeySpec pubKeySpec = new X509EncodedKeySpec(content);
+ return factory.generatePublic(pubKeySpec);
+ }
+
+ private KeyPair getKeyFromFile(String privateKeyPath, String publicKeyPath) throws InvalidKeySpecException, FileNotFoundException, IOException {
+ PrivateKey priv = generatePrivateKey(FACTORY, privateKeyPath);
+ PublicKey pub = generatePublicKey(FACTORY, publicKeyPath);
+ ECPublicKey apub = (ECPublicKey) pub;
+ ECPrivateKey apriv = (ECPrivateKey) priv;
+
+ KeyPair keyPair = new KeyPair(apub, apriv);
+ return keyPair;
+ }
+
+ private void testFromFile(String keyType, MessageDigest digest) throws Exception {
+ String privateKeyPath = "src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/" + keyType + "keynew.pem";
+ String publicKeyPath = "src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/" + keyType + "keypubnew.pem";
+
+ EcKey newKey = new EcKey("akey", getKeyFromFile(privateKeyPath, publicKeyPath));
+
+ Path signatureLocation = Paths.get("src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/" + keyType + "sig.der");
+ byte[] signature = Files.readAllBytes(signatureLocation);
+
+ doVerify(newKey, digest, signature);
+ }
+
+ @Test
+ public void testCreateSECP256K1Key() throws Exception {
+ ECGenParameterSpec gps = new ECGenParameterSpec("secp256k1");
+ Provider myprov = Security.getProvider("BC");
+ final KeyPairGenerator generator = KeyPairGenerator.getInstance("EC");
+
+ generator.initialize(gps);
+ EcKey key = new EcKey("akey", JsonWebKeyCurveName.P_256K);
+ }
+
+ @Test
+ public void testFromP384File() throws Exception {
+ testFromFile("p384", DIGEST_384);
+ }
+
+ @Test
+ public void testFromP521File() throws Exception {
+ testFromFile("p521", DIGEST_512);
+ }
+
+ @Test
+ public void testFromP256File() throws Exception {
+ testFromFile("p256", DIGEST_256);
+ }
+
+ @Test
+ public void testFromSEC256File() throws Exception{
+ testFromFile("secp256", DIGEST_256);
+ }
+
+ @Test
+ public void testToJsonWebKey() throws Exception {
+ ECGenParameterSpec gps = new ECGenParameterSpec(EcKey.P521);
+ EC_KEY_GENERATOR.initialize(gps);
+ KeyPair keyPair = EC_KEY_GENERATOR.generateKeyPair();
+
+ ECPublicKey apub = (ECPublicKey) keyPair.getPublic();
+ ECPoint point = apub.getW();
+ ECPrivateKey apriv = (ECPrivateKey) keyPair.getPrivate();
+
+ JsonWebKey jwk = new JsonWebKey()
+ .withKid("kid")
+ .withCrv(JsonWebKeyCurveName.P_521)
+ .withX(point.getAffineX().toByteArray())
+ .withY(point.getAffineY().toByteArray())
+ .withD(apriv.getS().toByteArray())
+ .withKty(JsonWebKeyType.EC);
+
+ EcKey newKey = new EcKey("kid", keyPair);
+
+ JsonWebKey newJwk = newKey.toJsonWebKey();
+ //set missing parameters
+ newJwk.withKid("kid");
+
+ assertEquals(jwk, newJwk);
+ }
+
+ //Checks validity of verify by
+ //Externally signing a byte_array with openssl
+ //Verifying with SDK
+ private void doVerify(EcKey key, MessageDigest digest, byte[] preGenSignature) throws IOException, NoSuchAlgorithmException, InterruptedException, ExecutionException {
+ byte[] hash = digest.digest(CEK);
+
+ //Use sign and verify to test each other.
+ boolean result = key.verifyAsync(hash, preGenSignature, key.getDefaultSignatureAlgorithm()).get();
+ assertTrue(result);
+
+ //Check that key denies invalid digest.
+ BigInteger bigInt = new BigInteger(hash);
+ BigInteger shiftInt = bigInt.shiftRight(4);
+ byte [] shifted = shiftInt.toByteArray();
+ boolean incorrectResult = key.verifyAsync(shifted, preGenSignature, key.getDefaultSignatureAlgorithm()).get();
+ assertFalse(incorrectResult);
+
+ key.close();
+ }
+
+ private void doSignVerify(EcKey key, MessageDigest digest) throws IOException, NoSuchAlgorithmException, InterruptedException, ExecutionException {
+
+ byte[] hash = digest.digest(CEK);
+
+ //Use sign and verify to test each other.
+ Pair signature = key.signAsync(hash, key.getDefaultSignatureAlgorithm()).get();
+ boolean result = key.verifyAsync(hash, signature.getLeft(), key.getDefaultSignatureAlgorithm()).get();
+ assertTrue(result);
+
+ //Check that key denies invalid digest.
+ BigInteger bigInt = new BigInteger(hash);
+ BigInteger shiftInt = bigInt.shiftRight(4);
+ byte [] shifted = shiftInt.toByteArray();
+ boolean incorrectResult = key.verifyAsync(shifted, signature.getLeft(), key.getDefaultSignatureAlgorithm()).get();
+ assertFalse(incorrectResult);
+
+ key.close();
+ }
+}
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/RsaKeyTest.java b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/RsaKeyTest.java
index 799827b..4944910 100644
--- a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/RsaKeyTest.java
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/RsaKeyTest.java
@@ -22,14 +22,14 @@
import com.microsoft.azure.keyvault.webkey.JsonWebKey;
public class RsaKeyTest {
-
- // A Content Encryption Key, or Message. This value is kept consistent with the .NET
- // unit test cases to enable cross platform testing.
+
+ // A Content Encryption Key, or Message. This value is kept consistent with the .NET
+ // unit test cases to enable cross platform testing.
static final byte[] CEK = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte)0x88, (byte)0x99, (byte)0xAA, (byte)0xBB, (byte)0xCC, (byte)0xDD, (byte)0xEE, (byte)0xFF };
static final String CrossPlatformHash = "qPrtarvzXBKksm5A9v6xnXNtkARcg7n5ox9jjTI+aBE=";
static final String CrossPlatformSignature = "RaNc+8WcWxplS8I7ynJLSoLJKz+dgBvrZhIGH3VFlTTyzu7b9d+lpaV9IKhzCNBsgSysKhgL7EZwVCOTBZ4m6xvKSXqVFXYaBPyBTD7VoKPMYMW6ai5x6xV5XAMaZPfMkff3Deg/RXcc8xQ28FhYuUa8yly01GySY4Hk55anEvb2wBxSy1UGun/0LE1lYH3C3XEgSry4cEkJHDJl1hp+wB4J/noXOqn5ECGU+/4ehBJOyW1gtUH0/gRe8yXnDH0AXepHRyH8iBHLWlKX1r+1/OrMulqOoi82RZzJlTyEz9X+bsQhllqGF6n3hdLS6toH9o7wUtwYNqSx82JuQT6iMg==";
-
- private Provider _provider = null;
+
+ private Provider _provider = null;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
@@ -46,20 +46,20 @@ public void setUp() throws Exception {
@After
public void tearDown() throws Exception {
}
-
+
protected void setProvider(Provider provider) {
- _provider = provider;
+ _provider = provider;
}
@Test
public void testRsa15() throws Exception {
- RsaKey key = getTestRsaKey();
+ RsaKey key = getTestRsaKey();
// Wrap and Unwrap
Pair wrapped = key.wrapKeyAsync(CEK, Rsa15.ALGORITHM_NAME).get();
byte[] unwrapped = key.unwrapKeyAsync(wrapped.getLeft(), wrapped.getRight()).get();
-
+
// Assert
assertEquals(Rsa15.ALGORITHM_NAME, wrapped.getRight());
assertArrayEquals(CEK, unwrapped);
@@ -67,7 +67,7 @@ public void testRsa15() throws Exception {
// Encrypt and Decrypt
Triple encrypted = key.encryptAsync(CEK, null, null, Rsa15.ALGORITHM_NAME).get();
byte[] decrypted = key.decryptAsync(encrypted.getLeft(), null, null, null, encrypted.getRight()).get();
-
+
// Assert
assertEquals(Rsa15.ALGORITHM_NAME, encrypted.getRight());
assertArrayEquals(CEK, decrypted);
@@ -78,12 +78,12 @@ public void testRsa15() throws Exception {
@Test
public void testRsaOaep() throws Exception {
- RsaKey key = getTestRsaKey();
+ RsaKey key = getTestRsaKey();
// Wrap and Unwrap
Pair wrapped = key.wrapKeyAsync(CEK, RsaOaep.ALGORITHM_NAME).get();
byte[] unwrapped = key.unwrapKeyAsync(wrapped.getLeft(), wrapped.getRight()).get();
-
+
// Assert
assertEquals(RsaOaep.ALGORITHM_NAME, wrapped.getRight());
assertArrayEquals(CEK, unwrapped);
@@ -91,7 +91,7 @@ public void testRsaOaep() throws Exception {
// Encrypt and Decrypt
Triple encrypted = key.encryptAsync(CEK, null, null, RsaOaep.ALGORITHM_NAME).get();
byte[] decrypted = key.decryptAsync(encrypted.getLeft(), null, null, null, encrypted.getRight()).get();
-
+
// Assert
assertEquals(RsaOaep.ALGORITHM_NAME, encrypted.getRight());
assertArrayEquals(CEK, decrypted);
@@ -102,7 +102,7 @@ public void testRsaOaep() throws Exception {
@Test
public void testDefaultAlgorithm() throws Exception {
- RsaKey key = getTestRsaKey();
+ RsaKey key = getTestRsaKey();
assertEquals(RsaOaep.ALGORITHM_NAME, key.getDefaultEncryptionAlgorithm());
assertEquals(RsaOaep.ALGORITHM_NAME, key.getDefaultKeyWrapAlgorithm());
@@ -111,7 +111,7 @@ public void testDefaultAlgorithm() throws Exception {
// Wrap and Unwrap
Pair wrapped = key.wrapKeyAsync(CEK, key.getDefaultKeyWrapAlgorithm()).get();
byte[] unwrapped = key.unwrapKeyAsync(wrapped.getLeft(), wrapped.getRight()).get();
-
+
// Assert
assertEquals(RsaOaep.ALGORITHM_NAME, wrapped.getRight());
assertArrayEquals(CEK, unwrapped);
@@ -119,37 +119,37 @@ public void testDefaultAlgorithm() throws Exception {
// Encrypt and Decrypt
Triple encrypted = key.encryptAsync(CEK, null, null, key.getDefaultEncryptionAlgorithm()).get();
byte[] decrypted = key.decryptAsync(encrypted.getLeft(), null, null, null, encrypted.getRight()).get();
-
+
// Assert
assertEquals(RsaOaep.ALGORITHM_NAME, encrypted.getRight());
assertArrayEquals(CEK, decrypted);
key.close();
}
-
+
@Test
public void testSignVerify() throws Exception {
-
- RsaKey key = getTestRsaKey();
-
- MessageDigest digest = MessageDigest.getInstance("SHA-256");
- byte[] hash = digest.digest(CEK);
-
- byte[] crossPlatformHash = Base64.decodeBase64(CrossPlatformHash);
- byte[] crossPlatformSignature = Base64.decodeBase64(CrossPlatformSignature);
-
- // Check the hash
- assertNotNull( hash );
- assertEquals( 32, hash.length );
- assertArrayEquals(hash, crossPlatformHash);
-
- Pair signature = key.signAsync(hash, "RS256").get();
- boolean result = key.verifyAsync(hash, signature.getLeft(), "RS256").get();
-
- // Check the signature
+
+ RsaKey key = getTestRsaKey();
+
+ MessageDigest digest = MessageDigest.getInstance("SHA-256");
+ byte[] hash = digest.digest(CEK);
+
+ byte[] crossPlatformHash = Base64.decodeBase64(CrossPlatformHash);
+ byte[] crossPlatformSignature = Base64.decodeBase64(CrossPlatformSignature);
+
+ // Check the hash
+ assertNotNull( hash );
+ assertEquals( 32, hash.length );
+ assertArrayEquals(hash, crossPlatformHash);
+
+ Pair signature = key.signAsync(hash, "RS256").get();
+ boolean result = key.verifyAsync(hash, signature.getLeft(), "RS256").get();
+
+ // Check the signature
assertTrue(result);
assertArrayEquals(crossPlatformSignature, signature.getLeft());
-
+
// Now prove we can verify the cross platform signature
result = key.verifyAsync(hash, Base64.decodeBase64(CrossPlatformSignature), "RS256").get();
@@ -157,15 +157,27 @@ public void testSignVerify() throws Exception {
key.close();
}
-
+
+ @Test
+ public void testToFromJsonWebKey() throws Exception {
+ RsaKey key = getTestRsaKey();
+ JsonWebKey jwk = key.toJsonWebKey();
+ jwk.withKid("new kid");
+ //setting kid
+ RsaKey sameKey = RsaKey.fromJsonWebKey(jwk, true, _provider);
+ JsonWebKey jwkSame = sameKey.toJsonWebKey();
+ jwkSame.withKid("new kid");
+ assertEquals(jwk, jwkSame);
+ }
+
private RsaKey getTestRsaKey() throws Exception {
- String jwkString = "{\"kty\":\"RSA\",\"n\":\"rZ8pnmXkhfmmgNWVVdtNcYy2q0OAcCGIpeFzsN9URqJsiBEiWQfxlUxFTbM4kVWPqjauKt6byvApBGEeMA7Qs8kxwRVP-BD4orXRe9VPgliM92rH0UxQWHmCHUe7G7uUAFPwbiDVhWuFzELxNa6Kljg6Z9DuUKoddmQvlYWj8uSunofCtDi_zzlZKGYTOYJma5IYScHNww1yjLp8-b-Be2UdHbrPkCv6Nuwi6MVIKjPpEeRQgfefRmxDBJQKY3OfydMXZmEwukYXVkUcdIP8XwG2OxnfdRK0oAo0NDebNNVuT89k_3AyZLTr1KbDmx1nnjwa8uB8k-uLtcOC9igbTw\",\"e\":\"AQAB\",\"d\":\"H-z7hy_vVJ9yeZBMtIvt8qpQUK_J51STPwV085otcgud72tPKJXoW2658664ASl9kGwbnLBwb2G3-SEunuGqiNS_PGUB3niob6sFSUMRKsPDsB9HfPoOcCZvwZiWFGRqs6C7vlR1TuJVqRjKJ_ffbf4K51oo6FZPspx7j4AShLAwLUSQ60Ld5QPuxYMYZIMpdVbMVIVHJ26pR4Y18e_0GYmEGnbF5N0HkwqQmfmTiIK5aoGnD3GGgqHeHmWBwh6_WAq90ITLcX_zBeqQUgBSj-Z5v61SroO9Eang36T9mMoYrcPpYwemtAOb4HhQYDj8dCCfbeOcVmvZ9UJKWCX2oQ\",\"dp\":\"HW87UpwPoj3lPI9B9K1hJFeuGgarpakvtHuk1HpZ5hXWFGAJiXoWRV-jvYyjoM2k7RpSxPyuuFFmYHcIxiGFp2ES4HnP0BIhKVa2DyugUxIEcMK53C43Ub4mboJPZTSC3sapKgAmA2ue624sapWmshTPpx9qnUP2Oj3cSMkgMGE\",\"dq\":\"RhwEwb5FYio0GS2tmul8FAYsNH7JDehwI1yUApnTiakhSenFetml4PYyVkKR4csgLZEi3RY6J3R8Tg-36zrZuF7hxhVJn80L5_KETSpfEI3jcrXMVg4SRaMsWLY9Ahxflt2FJgUnHOmWRLmP6_hmaTcxxSACjbyUd_HhwNavD5E\",\"qi\":\"wYPZ4lKIslA1w3FaAzQifnNLABYXXUZ_KAA3a8T8fuxkdE4OP3xIFX7WHhnmBd6uOFiEcGoeq2jNQqDg91rV5661-5muQKcvp4uUsNId5rQw9EZw-kdDcwMtVFTEBfvVuyp83X974xYAHn1Jd8wWohSwrpi1QuH5cQMR5Fm6I1A\",\"p\":\"74Ot7MgxRu4euB31UWnGtrqYPjJmvbjYESS43jfDfo-s62ggV5a39P_YPg6oosgtGHNw0QDxunUOXNu9iriaYPf_imptRk69bKN8Nrl727Y-AaBYdLf1UZuwz8X07FqHAH5ghYpk79djld8QvkUUJLpx6rzcW8BJLTOi46DtzZE\",\"q\":\"uZJu-qenARIt28oj_Jlsk-p_KLnqdczczZfbRDd7XNp6csGLa8R0EyYqUB4xLWELQZsX4tAu9SaAO62tuuEy5wbOAmOVrq2ntoia1mGQSJdoeVq6OqtN300xVnaBc3us0rm8C6-824fEQ1PWXoulXLKcSqBhFT-hQahsYi-kat8\"}";
- ObjectMapper mapper = new ObjectMapper();
- JsonWebKey jwk = null;
-
- jwk = mapper.readValue(jwkString, JsonWebKey.class);
-
- return new RsaKey("foo", jwk.toRSA(true, _provider) );
+ String jwkString = "{\"kty\":\"RSA\",\"n\":\"rZ8pnmXkhfmmgNWVVdtNcYy2q0OAcCGIpeFzsN9URqJsiBEiWQfxlUxFTbM4kVWPqjauKt6byvApBGEeMA7Qs8kxwRVP-BD4orXRe9VPgliM92rH0UxQWHmCHUe7G7uUAFPwbiDVhWuFzELxNa6Kljg6Z9DuUKoddmQvlYWj8uSunofCtDi_zzlZKGYTOYJma5IYScHNww1yjLp8-b-Be2UdHbrPkCv6Nuwi6MVIKjPpEeRQgfefRmxDBJQKY3OfydMXZmEwukYXVkUcdIP8XwG2OxnfdRK0oAo0NDebNNVuT89k_3AyZLTr1KbDmx1nnjwa8uB8k-uLtcOC9igbTw\",\"e\":\"AQAB\",\"d\":\"H-z7hy_vVJ9yeZBMtIvt8qpQUK_J51STPwV085otcgud72tPKJXoW2658664ASl9kGwbnLBwb2G3-SEunuGqiNS_PGUB3niob6sFSUMRKsPDsB9HfPoOcCZvwZiWFGRqs6C7vlR1TuJVqRjKJ_ffbf4K51oo6FZPspx7j4AShLAwLUSQ60Ld5QPuxYMYZIMpdVbMVIVHJ26pR4Y18e_0GYmEGnbF5N0HkwqQmfmTiIK5aoGnD3GGgqHeHmWBwh6_WAq90ITLcX_zBeqQUgBSj-Z5v61SroO9Eang36T9mMoYrcPpYwemtAOb4HhQYDj8dCCfbeOcVmvZ9UJKWCX2oQ\",\"dp\":\"HW87UpwPoj3lPI9B9K1hJFeuGgarpakvtHuk1HpZ5hXWFGAJiXoWRV-jvYyjoM2k7RpSxPyuuFFmYHcIxiGFp2ES4HnP0BIhKVa2DyugUxIEcMK53C43Ub4mboJPZTSC3sapKgAmA2ue624sapWmshTPpx9qnUP2Oj3cSMkgMGE\",\"dq\":\"RhwEwb5FYio0GS2tmul8FAYsNH7JDehwI1yUApnTiakhSenFetml4PYyVkKR4csgLZEi3RY6J3R8Tg-36zrZuF7hxhVJn80L5_KETSpfEI3jcrXMVg4SRaMsWLY9Ahxflt2FJgUnHOmWRLmP6_hmaTcxxSACjbyUd_HhwNavD5E\",\"qi\":\"wYPZ4lKIslA1w3FaAzQifnNLABYXXUZ_KAA3a8T8fuxkdE4OP3xIFX7WHhnmBd6uOFiEcGoeq2jNQqDg91rV5661-5muQKcvp4uUsNId5rQw9EZw-kdDcwMtVFTEBfvVuyp83X974xYAHn1Jd8wWohSwrpi1QuH5cQMR5Fm6I1A\",\"p\":\"74Ot7MgxRu4euB31UWnGtrqYPjJmvbjYESS43jfDfo-s62ggV5a39P_YPg6oosgtGHNw0QDxunUOXNu9iriaYPf_imptRk69bKN8Nrl727Y-AaBYdLf1UZuwz8X07FqHAH5ghYpk79djld8QvkUUJLpx6rzcW8BJLTOi46DtzZE\",\"q\":\"uZJu-qenARIt28oj_Jlsk-p_KLnqdczczZfbRDd7XNp6csGLa8R0EyYqUB4xLWELQZsX4tAu9SaAO62tuuEy5wbOAmOVrq2ntoia1mGQSJdoeVq6OqtN300xVnaBc3us0rm8C6-824fEQ1PWXoulXLKcSqBhFT-hQahsYi-kat8\"}";
+ ObjectMapper mapper = new ObjectMapper();
+ JsonWebKey jwk = null;
+
+ jwk = mapper.readValue(jwkString, JsonWebKey.class);
+
+ return new RsaKey("foo", jwk.toRSA(true, _provider) );
}
}
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/PemFile.java b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/PemFile.java
new file mode 100644
index 0000000..1064a94
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/PemFile.java
@@ -0,0 +1,27 @@
+package com.microsoft.azure.keyvault.cryptography.test.resources;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.bouncycastle.util.io.pem.PemObject;
+import org.bouncycastle.util.io.pem.PemReader;
+
+public class PemFile {
+
+ private PemObject pemObject;
+
+ public PemFile(String filename) throws FileNotFoundException, IOException {
+ PemReader pemReader = new PemReader(new InputStreamReader(new FileInputStream(filename)));
+ try {
+ this.pemObject = pemReader.readPemObject();
+ } finally {
+ pemReader.close();
+ }
+ }
+
+ public PemObject getPemObject() {
+ return pemObject;
+ }
+}
\ No newline at end of file
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/SECP256key.pem b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/SECP256key.pem
new file mode 100644
index 0000000..9422787
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/SECP256key.pem
@@ -0,0 +1,8 @@
+-----BEGIN EC PARAMETERS-----
+BgUrgQQACg==
+-----END EC PARAMETERS-----
+-----BEGIN EC PRIVATE KEY-----
+MHQCAQEEIIbmPOGbSMPdQoRmd5CTnkMl5EtyAYG9YF0/cC9/QiOsoAcGBSuBBAAK
+oUQDQgAEcgWYGgCEzF7O2klfOCQJSrIjKZd1InDMUVwbykw5gvbCaL8m2/hSY13o
+X7A1b4PbLn6zK7TAFRqBipA8w2sQ6g==
+-----END EC PRIVATE KEY-----
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/byte_array.bin b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/byte_array.bin
new file mode 100644
index 0000000..2fdaa8e
Binary files /dev/null and b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/byte_array.bin differ
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256key.pem b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256key.pem
new file mode 100644
index 0000000..0dc7ae1
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256key.pem
@@ -0,0 +1,8 @@
+-----BEGIN EC PARAMETERS-----
+BgUrgQQACg==
+-----END EC PARAMETERS-----
+-----BEGIN EC PRIVATE KEY-----
+MHQCAQEEICuTXZmGPyKlnpX/NZjNsfRF3V6np91hIN6JGuq3+ml4oAcGBSuBBAAK
+oUQDQgAEB4kcrPPdAiPb0RNPgqik6RbzD4CluCZB/FcqgS8tBOJ3mSjnCNUzlAng
+QQWZu0YZzq2n4QZwa9E1FZc5hBH7nA==
+-----END EC PRIVATE KEY-----
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256keynew.pem b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256keynew.pem
new file mode 100644
index 0000000..fc9d362
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256keynew.pem
@@ -0,0 +1,5 @@
+-----BEGIN PRIVATE KEY-----
+MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgmDtpx1m8G4Wmwo5+
+CuQx27iupfo5nf4CqsfWmMYxFEehRANCAARIcREG1iUacEdriN3Zim6er9nbgSil
+YSYN9tX1+HhLlPr1MXL7nERsSlVSlTptbC+SxGL+2cBcI4dgM7/XPe9Z
+-----END PRIVATE KEY-----
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256keypubnew.pem b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256keypubnew.pem
new file mode 100644
index 0000000..7e245ae
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256keypubnew.pem
@@ -0,0 +1,4 @@
+-----BEGIN PUBLIC KEY-----
+MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESHERBtYlGnBHa4jd2Ypunq/Z24Eo
+pWEmDfbV9fh4S5T69TFy+5xEbEpVUpU6bWwvksRi/tnAXCOHYDO/1z3vWQ==
+-----END PUBLIC KEY-----
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256sig.der b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256sig.der
new file mode 100644
index 0000000..23f41f2
Binary files /dev/null and b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p256sig.der differ
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p384keynew.pem b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p384keynew.pem
new file mode 100644
index 0000000..9ec79bd
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p384keynew.pem
@@ -0,0 +1,6 @@
+-----BEGIN PRIVATE KEY-----
+MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDC0ooKHLcKqHpTI1Cz2
+AjkFh/DXxz9VaHW6tdRYow3eHRpPyjWzdpK9ThCc2vsVvnqhZANiAATy14M2foWP
+Tbql4vwUhL1JEh0Oy629FNaggH6oGCNNPdtVOWJfRcPvFWdYIcfOotVGHLIl8WLJ
+HnuDUMUbxCJFoWboyPIBzufbiPEvZaAjWjT509d971YJANAwVcYmR4Y=
+-----END PRIVATE KEY-----
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p384keypubnew.pem b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p384keypubnew.pem
new file mode 100644
index 0000000..44de436
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p384keypubnew.pem
@@ -0,0 +1,5 @@
+-----BEGIN PUBLIC KEY-----
+MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE8teDNn6Fj026peL8FIS9SRIdDsutvRTW
+oIB+qBgjTT3bVTliX0XD7xVnWCHHzqLVRhyyJfFiyR57g1DFG8QiRaFm6MjyAc7n
+24jxL2WgI1o0+dPXfe9WCQDQMFXGJkeG
+-----END PUBLIC KEY-----
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p384sig.der b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p384sig.der
new file mode 100644
index 0000000..44e3fc6
Binary files /dev/null and b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p384sig.der differ
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p521keynew.pem b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p521keynew.pem
new file mode 100644
index 0000000..8a95bdd
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p521keynew.pem
@@ -0,0 +1,8 @@
+-----BEGIN PRIVATE KEY-----
+MIHuAgEAMBAGByqGSM49AgEGBSuBBAAjBIHWMIHTAgEBBEIAlTlzXR+eSE1CiFBs
+s139xS1gP1ESKhGeeeohoa0+s2IDlgwz5CZmIOhfHeDqIMiuvt0Da/SdXa8YEdlr
+PfpM9BuhgYkDgYYABAEbJoXHYgVIkmneHp65hog0j3WD7pUaXMwy6HIWCiRU+va9
+1ZN7e8ht4Cor9ME93hiRBFAW1W2unA8AcjIKHhGj1QCq6My/fh4Lur0qgk0DHWj3
+Jlh+hIWAVxLZdkKA2uza01OUN9Ma1VNBoKssZDB7VCGnWUKa6heWDth8hp6X+bLd
+LA==
+-----END PRIVATE KEY-----
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p521keypubnew.pem b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p521keypubnew.pem
new file mode 100644
index 0000000..da5457b
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p521keypubnew.pem
@@ -0,0 +1,6 @@
+-----BEGIN PUBLIC KEY-----
+MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBGyaFx2IFSJJp3h6euYaINI91g+6V
+GlzMMuhyFgokVPr2vdWTe3vIbeAqK/TBPd4YkQRQFtVtrpwPAHIyCh4Ro9UAqujM
+v34eC7q9KoJNAx1o9yZYfoSFgFcS2XZCgNrs2tNTlDfTGtVTQaCrLGQwe1Qhp1lC
+muoXlg7YfIael/my3Sw=
+-----END PUBLIC KEY-----
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p521sig.der b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p521sig.der
new file mode 100644
index 0000000..819d2e3
Binary files /dev/null and b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/p521sig.der differ
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/secp256keynew.pem b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/secp256keynew.pem
new file mode 100644
index 0000000..3f68ccd
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/secp256keynew.pem
@@ -0,0 +1,5 @@
+-----BEGIN PRIVATE KEY-----
+MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQghuY84ZtIw91ChGZ3kJOe
+QyXkS3IBgb1gXT9wL39CI6yhRANCAARyBZgaAITMXs7aSV84JAlKsiMpl3UicMxR
+XBvKTDmC9sJovybb+FJjXehfsDVvg9sufrMrtMAVGoGKkDzDaxDq
+-----END PRIVATE KEY-----
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/secp256keypubnew.pem b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/secp256keypubnew.pem
new file mode 100644
index 0000000..4e7cddb
--- /dev/null
+++ b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/secp256keypubnew.pem
@@ -0,0 +1,4 @@
+-----BEGIN PUBLIC KEY-----
+MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEcgWYGgCEzF7O2klfOCQJSrIjKZd1InDM
+UVwbykw5gvbCaL8m2/hSY13oX7A1b4PbLn6zK7TAFRqBipA8w2sQ6g==
+-----END PUBLIC KEY-----
diff --git a/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/secp256sig.der b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/secp256sig.der
new file mode 100644
index 0000000..2dc90f9
Binary files /dev/null and b/azure-keyvault-cryptography/src/test/java/com/microsoft/azure/keyvault/cryptography/test/resources/secp256sig.der differ
diff --git a/azure-keyvault-extensions/pom.xml b/azure-keyvault-extensions/pom.xml
index 2795d6f..03610bf 100644
--- a/azure-keyvault-extensions/pom.xml
+++ b/azure-keyvault-extensions/pom.xml
@@ -8,7 +8,7 @@
com.microsoft.azureazure-keyvault-parent
- 1.0.1-SNAPSHOT
+ 1.1../pom.xml
@@ -68,24 +68,30 @@
com.microsoft.azureazure-keyvault-core
- 1.0.1-SNAPSHOT
+ 1.1com.microsoft.azureazure-keyvault-cryptography
- 1.0.1-SNAPSHOT
+ 1.1com.microsoft.azureazure-keyvault
- 1.0.1-SNAPSHOT
+ 1.1com.microsoft.azureazure-keyvault-webkey
- 1.0.1-SNAPSHOT
+ 1.1
-
+
+ com.microsoft.azure
+ azure
+ 1.3.0
+ test
+
+ com.microsoft.azureazure-mgmt-resources1.3.1-SNAPSHOT
diff --git a/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/AggregateKeyResolver.java b/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/AggregateKeyResolver.java
index 30062e6..8ce09dd 100644
--- a/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/AggregateKeyResolver.java
+++ b/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/AggregateKeyResolver.java
@@ -1,19 +1,7 @@
/**
- *
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
*/
package com.microsoft.azure.keyvault.extensions;
diff --git a/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/CachingKeyResolver.java b/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/CachingKeyResolver.java
index f86a98b..cfefd73 100644
--- a/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/CachingKeyResolver.java
+++ b/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/CachingKeyResolver.java
@@ -1,19 +1,7 @@
/**
- *
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
*/
package com.microsoft.azure.keyvault.extensions;
diff --git a/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/KeyVaultKey.java b/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/KeyVaultKey.java
index d3bf97a..f903de9 100644
--- a/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/KeyVaultKey.java
+++ b/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/KeyVaultKey.java
@@ -1,21 +1,8 @@
/**
- *
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
*/
-
package com.microsoft.azure.keyvault.extensions;
import java.io.IOException;
diff --git a/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/KeyVaultKeyResolver.java b/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/KeyVaultKeyResolver.java
index 7f8e778..a969082 100644
--- a/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/KeyVaultKeyResolver.java
+++ b/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/KeyVaultKeyResolver.java
@@ -1,19 +1,7 @@
/**
- *
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
*/
package com.microsoft.azure.keyvault.extensions;
diff --git a/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/Strings.java b/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/Strings.java
index 52ef356..5d5fe93 100644
--- a/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/Strings.java
+++ b/azure-keyvault-extensions/src/main/java/com/microsoft/azure/keyvault/extensions/Strings.java
@@ -1,19 +1,7 @@
/**
- *
- * Copyright (c) Microsoft and contributors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
*/
package com.microsoft.azure.keyvault.extensions;
diff --git a/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultClientIntegrationTestBase.java b/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultClientIntegrationTestBase.java
index 6618177..2e17e5e 100644
--- a/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultClientIntegrationTestBase.java
+++ b/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultClientIntegrationTestBase.java
@@ -8,6 +8,9 @@
import com.microsoft.azure.keyvault.KeyVaultClient;
import com.microsoft.azure.keyvault.authentication.KeyVaultCredentials;
import com.microsoft.azure.keyvault.models.Attributes;
+import com.microsoft.azure.keyvault.models.DeletedCertificateBundle;
+import com.microsoft.azure.keyvault.models.DeletedKeyBundle;
+import com.microsoft.azure.keyvault.models.DeletedSecretBundle;
import com.microsoft.azure.management.resources.core.AzureTestCredentials;
import com.microsoft.azure.management.resources.core.InterceptorManager;
import com.microsoft.azure.management.resources.core.TestBase;
@@ -262,7 +265,7 @@ public static void beforeClass() throws IOException {
}
@Before
- public void beforeTest() throws Exception {
+ public void beforeMethod() throws Exception {
printThreadInfo(String.format("%s: %s", "beforeTest", testName.getMethodName()));
final String skipMessage = shouldCancelTest(isPlaybackMode());
Assume.assumeTrue(skipMessage, skipMessage == null);
@@ -309,9 +312,63 @@ public void write(int b) {
}
}
+
+ protected static DeletedCertificateBundle pollOnCertificateDeletion(String vaultBaseUrl, String certificateName)
+ throws Exception {
+ int pendingPollCount = 0;
+ while (pendingPollCount < 21) {
+ DeletedCertificateBundle certificateBundle = keyVaultClient.getDeletedCertificate(vaultBaseUrl,
+ certificateName);
+ if (certificateBundle == null) {
+ if (isRecordMode()) {
+ Thread.sleep(10000);
+ }
+ pendingPollCount += 1;
+ continue;
+ } else {
+ return certificateBundle;
+ }
+ }
+ throw new Exception("Deleting certificate delayed");
+ }
+
+ protected static DeletedKeyBundle pollOnKeyDeletion(String vaultBaseUrl, String certificateName) throws Exception {
+ int pendingPollCount = 0;
+ while (pendingPollCount < 21) {
+ DeletedKeyBundle deletedKeyBundle = keyVaultClient.getDeletedKey(vaultBaseUrl, certificateName);
+ if (deletedKeyBundle == null) {
+ if (isRecordMode()) {
+ Thread.sleep(10000);
+ }
+ pendingPollCount += 1;
+ continue;
+ } else {
+ return deletedKeyBundle;
+ }
+ }
+ throw new Exception("Deleting key delayed");
+ }
+
+ protected static DeletedSecretBundle pollOnSecretDeletion(String vaultBaseUrl, String secretName) throws Exception {
+ int pendingPollCount = 0;
+ while (pendingPollCount < 50) {
+ DeletedSecretBundle deletedSecretBundle = keyVaultClient.getDeletedSecret(vaultBaseUrl, secretName);
+ if (deletedSecretBundle == null) {
+ if (isRecordMode()) {
+ Thread.sleep(10000);
+ }
+ pendingPollCount += 1;
+ continue;
+ } else {
+ return deletedSecretBundle;
+ }
+ }
+ throw new Exception("Deleting secret delayed");
+ }
+
@After
- public void afterTest() throws IOException {
+ public void afterMethod() throws IOException {
if (shouldCancelTest(isPlaybackMode()) != null) {
return;
}
diff --git a/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultKeyResolverBCProviderTest.java b/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultKeyResolverBCProviderTest.java
index c4612b7..767ba16 100644
--- a/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultKeyResolverBCProviderTest.java
+++ b/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultKeyResolverBCProviderTest.java
@@ -77,9 +77,10 @@ public void tearDown() throws Exception {
@Test
public void KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverBCProviderTest() throws InterruptedException, ExecutionException
{
+ String TEST_KEY_NAME = KEY_NAME + "1";
try {
// Create a key on a vault.
- CreateKeyRequest request = new CreateKeyRequest.Builder(getVaultUri(), KEY_NAME, JsonWebKeyType.RSA).build();
+ CreateKeyRequest request = new CreateKeyRequest.Builder(getVaultUri(), TEST_KEY_NAME, JsonWebKeyType.RSA).build();
KeyBundle bundle = keyVaultClient.createKey(request);
if ( bundle != null )
@@ -100,7 +101,10 @@ public void KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverBCProviderTest()
finally
{
// Delete the key
- keyVaultClient.deleteKey( getVaultUri(), KEY_NAME );
+ keyVaultClient.deleteKey( getVaultUri(), TEST_KEY_NAME );
+ pollOnKeyDeletion( getVaultUri(), TEST_KEY_NAME );
+ keyVaultClient.purgeDeletedKey( getVaultUri(), TEST_KEY_NAME);
+
}
}
}
@@ -121,9 +125,10 @@ public void KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverBCPr
byte[] CEK = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF };
byte[] EK = { 0x1F, (byte) 0xA6, (byte) 0x8B, 0x0A, (byte) 0x81, 0x12, (byte) 0xB4, 0x47, (byte) 0xAE, (byte) 0xF3, 0x4B, (byte) 0xD8, (byte) 0xFB, 0x5A, 0x7B, (byte) 0x82, (byte) 0x9D, 0x3E, (byte) 0x86, 0x23, 0x71, (byte) 0xD2, (byte) 0xCF, (byte) 0xE5 };
+ String TEST_SECRET_NAME = SECRET_NAME + "1";
try {
- SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
+ SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), TEST_SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
SecretBundle secretBundle = keyVaultClient.setSecret( request );
if ( secretBundle != null )
@@ -162,7 +167,10 @@ public void KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverBCPr
finally
{
// Delete the secret
- keyVaultClient.deleteSecret( getVaultUri(), SECRET_NAME );
+ keyVaultClient.deleteSecret( getVaultUri(), TEST_SECRET_NAME );
+ pollOnSecretDeletion( getVaultUri(), TEST_SECRET_NAME );
+ keyVaultClient.purgeDeletedSecret( getVaultUri(), TEST_SECRET_NAME );
+
}
}
}
@@ -182,8 +190,9 @@ public void KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverBCPr
byte[] CEK = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF };
byte[] EK = { (byte) 0x96, 0x77, (byte) 0x8B, 0x25, (byte) 0xAE, 0x6C, (byte) 0xA4, 0x35, (byte) 0xF9, 0x2B, 0x5B, (byte) 0x97, (byte) 0xC0, 0x50, (byte) 0xAE, (byte) 0xD2, 0x46, (byte) 0x8A, (byte) 0xB8, (byte) 0xA1, 0x7A, (byte) 0xD8, 0x4E, 0x5D };
+ String TEST_SECRET_NAME = SECRET_NAME + "2";
try {
- SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
+ SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), TEST_SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
SecretBundle secretBundle = keyVaultClient.setSecret( request );
if ( secretBundle != null )
@@ -223,7 +232,9 @@ public void KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverBCPr
finally
{
// Delete the key
- keyVaultClient.deleteSecret( getVaultUri(), SECRET_NAME );
+ keyVaultClient.deleteSecret( getVaultUri(), TEST_SECRET_NAME );
+ pollOnSecretDeletion( getVaultUri(), TEST_SECRET_NAME );
+ keyVaultClient.purgeDeletedSecret( getVaultUri(), TEST_SECRET_NAME);
}
}
} catch (Exception ex) {
@@ -242,8 +253,10 @@ public void KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverBCPr
byte[] CEK = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF };
byte[] EK = { 0x64, (byte) 0xE8, (byte) 0xC3, (byte) 0xF9, (byte) 0xCE, 0x0F, 0x5B, (byte) 0xA2, 0x63, (byte) 0xE9, 0x77, 0x79, 0x05, (byte) 0x81, (byte) 0x8A, 0x2A, (byte) 0x93, (byte) 0xC8, 0x19, 0x1E, 0x7D, 0x6E, (byte) 0x8A, (byte) 0xE7 };
+ String TEST_SECRET_NAME = SECRET_NAME + "3";
+
try {
- SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
+ SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), TEST_SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
SecretBundle secretBundle = keyVaultClient.setSecret( request );
if ( secretBundle != null )
@@ -283,7 +296,9 @@ public void KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverBCPr
finally
{
// Delete the key
- keyVaultClient.deleteSecret( getVaultUri(), SECRET_NAME );
+ keyVaultClient.deleteSecret( getVaultUri(), TEST_SECRET_NAME );
+ pollOnSecretDeletion( getVaultUri(), TEST_SECRET_NAME );
+ keyVaultClient.purgeDeletedSecret( getVaultUri(), TEST_SECRET_NAME );
}
}
} catch ( Exception ex ) {
diff --git a/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultKeyResolverDefaultProviderTest.java b/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultKeyResolverDefaultProviderTest.java
index 4e3190d..2df4c05 100644
--- a/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultKeyResolverDefaultProviderTest.java
+++ b/azure-keyvault-extensions/src/test/java/com/microsoft/azure/keyvault/extensions/test/KeyVaultKeyResolverDefaultProviderTest.java
@@ -78,9 +78,10 @@ public void tearDown() throws Exception {
@Test
public void KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverDefaultProviderTest() throws InterruptedException, ExecutionException
{
+ String TEST_KEY_NAME = KEY_NAME + "1";
try {
// Create a key on a vault.
- CreateKeyRequest request = new CreateKeyRequest.Builder(getVaultUri(), KEY_NAME, JsonWebKeyType.RSA).build();
+ CreateKeyRequest request = new CreateKeyRequest.Builder(getVaultUri(), TEST_KEY_NAME, JsonWebKeyType.RSA).build();
KeyBundle keyBundle = keyVaultClient.createKey(request);
try
@@ -96,7 +97,9 @@ public void KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverDefaultProviderT
finally
{
// Delete the key
- keyVaultClient.deleteKey( getVaultUri(), KEY_NAME );
+ keyVaultClient.deleteKey( getVaultUri(), TEST_KEY_NAME );
+ pollOnKeyDeletion( getVaultUri(), TEST_KEY_NAME );
+ keyVaultClient.purgeDeletedKey( getVaultUri(), TEST_KEY_NAME );
}
} catch(Exception ex) {
fail(ex.getMessage());
@@ -114,8 +117,10 @@ public void KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverDefa
byte[] CEK = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF };
byte[] EK = { 0x1F, (byte) 0xA6, (byte) 0x8B, 0x0A, (byte) 0x81, 0x12, (byte) 0xB4, 0x47, (byte) 0xAE, (byte) 0xF3, 0x4B, (byte) 0xD8, (byte) 0xFB, 0x5A, 0x7B, (byte) 0x82, (byte) 0x9D, 0x3E, (byte) 0x86, 0x23, 0x71, (byte) 0xD2, (byte) 0xCF, (byte) 0xE5 };
+ String TEST_SECRET_NAME = SECRET_NAME + "1";
+
try {
- SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
+ SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), TEST_SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
SecretBundle secretBundle = keyVaultClient.setSecret(request);
if ( secretBundle != null )
@@ -155,7 +160,9 @@ public void KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverDefa
finally
{
// Delete the key
- keyVaultClient.deleteSecret( getVaultUri(), SECRET_NAME );
+ keyVaultClient.deleteSecret( getVaultUri(), TEST_SECRET_NAME );
+ pollOnSecretDeletion( getVaultUri(), TEST_SECRET_NAME );
+ keyVaultClient.purgeDeletedSecret( getVaultUri(), TEST_SECRET_NAME );
}
}
} catch ( Exception ex ) {
@@ -174,8 +181,10 @@ public void KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverDefa
byte[] CEK = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF };
byte[] EK = { (byte) 0x96, 0x77, (byte) 0x8B, 0x25, (byte) 0xAE, 0x6C, (byte) 0xA4, 0x35, (byte) 0xF9, 0x2B, 0x5B, (byte) 0x97, (byte) 0xC0, 0x50, (byte) 0xAE, (byte) 0xD2, 0x46, (byte) 0x8A, (byte) 0xB8, (byte) 0xA1, 0x7A, (byte) 0xD8, 0x4E, 0x5D };
+ String TEST_SECRET_NAME = SECRET_NAME + "2";
+
try {
- SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
+ SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), TEST_SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
SecretBundle secretBundle = keyVaultClient.setSecret( request );
if ( secretBundle != null )
@@ -228,7 +237,9 @@ public void KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverDefa
finally
{
// Delete the key
- keyVaultClient.deleteSecret( getVaultUri(), SECRET_NAME );
+ keyVaultClient.deleteSecret( getVaultUri(), TEST_SECRET_NAME );
+ pollOnSecretDeletion( getVaultUri(), TEST_SECRET_NAME );
+ keyVaultClient.purgeDeletedSecret( getVaultUri(), TEST_SECRET_NAME );
}
}
} catch ( Exception ex ) {
@@ -247,8 +258,10 @@ public void KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverDefa
byte[] CEK = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88, (byte) 0x99, (byte) 0xAA, (byte) 0xBB, (byte) 0xCC, (byte) 0xDD, (byte) 0xEE, (byte) 0xFF };
byte[] EK = { 0x64, (byte) 0xE8, (byte) 0xC3, (byte) 0xF9, (byte) 0xCE, 0x0F, 0x5B, (byte) 0xA2, 0x63, (byte) 0xE9, 0x77, 0x79, 0x05, (byte) 0x81, (byte) 0x8A, 0x2A, (byte) 0x93, (byte) 0xC8, 0x19, 0x1E, 0x7D, 0x6E, (byte) 0x8A, (byte) 0xE7 };
+ String TEST_SECRET_NAME = SECRET_NAME + "3";
+
try {
- SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
+ SetSecretRequest request = new SetSecretRequest.Builder(getVaultUri(), TEST_SECRET_NAME, _base64.encodeAsString(keyBytes)).withContentType("application/octet-stream").build();
SecretBundle secretBundle = keyVaultClient.setSecret( request );
if ( secretBundle != null )
@@ -307,7 +320,9 @@ public void KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverDefa
finally
{
// Delete the key
- keyVaultClient.deleteSecret( getVaultUri(), SECRET_NAME );
+ keyVaultClient.deleteSecret( getVaultUri(), TEST_SECRET_NAME );
+ pollOnSecretDeletion( getVaultUri(), TEST_SECRET_NAME );
+ keyVaultClient.purgeDeletedSecret( getVaultUri(), TEST_SECRET_NAME );
}
}
} catch ( Exception ex ) {
diff --git a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverBCProviderTest.json b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverBCProviderTest.json
index 5b49ca2..7411b42 100644
--- a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverBCProviderTest.json
+++ b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverBCProviderTest.json
@@ -1,15 +1,15 @@
{
"networkCallRecords" : [ {
"Method" : "POST",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/create?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/create?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:37 GMT",
- "server" : "Microsoft-IIS/8.5",
+ "date" : "Mon, 25 Jun 2018 21:42:25 GMT",
"content-length" : "0",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
@@ -19,23 +19,24 @@
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "72dcb83a-3410-4fd4-8dec-307536ceb9d5",
- "x-ms-keyvault-service-version" : "1.0.0.826",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "b33299d5-0d84-429a-9863-9f71fa653e33",
"Body" : ""
}
}, {
"Method" : "POST",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/create?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/create?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:37 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "661",
+ "date" : "Mon, 25 Jun 2018 21:42:26 GMT",
+ "content-length" : "674",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -45,49 +46,51 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "b81fc3f4-def6-4bcb-85dc-6920d69ba4d6",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/48b62b3ede7744569920e4a35acf6601\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"njZZak4ugkmCJXgbyfAAEXFa50d3SVOnfxUR2tJZ90YCqF6AeXteWjJjgfQdvsp8H1u0HvMGHB8PYqAkdQWYCZPplSTySrTeM_SAp649NB90ZMwo2B6TG-tqZqJXQlaRZQ5NiRXkkBgSLY5UhPPHrIPwg9lgBRrp7wmTx4ADaE8ObCN7Hbqk52pu6rEuh2KADDFmFL4U0kEDjYq4c9z-VZxrosSAdxYME7RYajyZeoIDHotMGmVJK4HxDmIKvyAWFj-TUBbwNFnes9LcqPIUpsl8JAEwHGlqwT_fGvgPGJ3Pv5jUGyakIIFYqXVYbPowef53Hy2Sv0javDC7GiTNQQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1509124958,\"updated\":1509124958,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "3c394856-1f18-486b-8a72-a0e1da379be6",
+ "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/dccd6ba8014a4ae39ac2f122499c6eca\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"j1Yl305qd5uKultZ9jitFjj2NaVvElwBOk2qQGX0YeCncznmfAqk5QgwqwgUhDWKt2Ojutud3n-Ptuw8pJ4zY2je119omDo_7X3R1CBD13vqAhReNFLbZuF-pFXCPR0xRz0tQpX8kQeV4Rq5IxMR6id1XoxX7isjbBZmwSesH7inRqkM3vWSkqZkNF0V02g6YUzDajmudzH1zppPlBLXkymECXQOA_GA2LImAaBk35YSDYgeXbCqtCdkCaV4PsyPEmBTis5xM30KDrTxviVCJltM9fut6s8dJstammi4wHodZe0ZNkBu-cCKvX9DbPAvymdG3NFD5ss-nCMWSWcQUQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1529962946,\"updated\":1529962946,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:37 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:42:28 GMT",
+ "content-length" : "674",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "a498a634-71a7-4c68-9a2b-0adae5a03a90",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "5954b38a-0273-42bf-9517-e511ccf15578",
+ "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/dccd6ba8014a4ae39ac2f122499c6eca\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"j1Yl305qd5uKultZ9jitFjj2NaVvElwBOk2qQGX0YeCncznmfAqk5QgwqwgUhDWKt2Ojutud3n-Ptuw8pJ4zY2je119omDo_7X3R1CBD13vqAhReNFLbZuF-pFXCPR0xRz0tQpX8kQeV4Rq5IxMR6id1XoxX7isjbBZmwSesH7inRqkM3vWSkqZkNF0V02g6YUzDajmudzH1zppPlBLXkymECXQOA_GA2LImAaBk35YSDYgeXbCqtCdkCaV4PsyPEmBTis5xM30KDrTxviVCJltM9fut6s8dJstammi4wHodZe0ZNkBu-cCKvX9DbPAvymdG3NFD5ss-nCMWSWcQUQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1529962946,\"updated\":1529962946,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/dccd6ba8014a4ae39ac2f122499c6eca?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:37 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "661",
+ "date" : "Mon, 25 Jun 2018 21:42:30 GMT",
+ "content-length" : "674",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -97,101 +100,105 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "4f050389-ab11-4f08-bad9-ea603679ae71",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/48b62b3ede7744569920e4a35acf6601\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"njZZak4ugkmCJXgbyfAAEXFa50d3SVOnfxUR2tJZ90YCqF6AeXteWjJjgfQdvsp8H1u0HvMGHB8PYqAkdQWYCZPplSTySrTeM_SAp649NB90ZMwo2B6TG-tqZqJXQlaRZQ5NiRXkkBgSLY5UhPPHrIPwg9lgBRrp7wmTx4ADaE8ObCN7Hbqk52pu6rEuh2KADDFmFL4U0kEDjYq4c9z-VZxrosSAdxYME7RYajyZeoIDHotMGmVJK4HxDmIKvyAWFj-TUBbwNFnes9LcqPIUpsl8JAEwHGlqwT_fGvgPGJ3Pv5jUGyakIIFYqXVYbPowef53Hy2Sv0javDC7GiTNQQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1509124958,\"updated\":1509124958,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "0e9d2a1b-1251-403d-8471-87cbb685789c",
+ "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/dccd6ba8014a4ae39ac2f122499c6eca\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"j1Yl305qd5uKultZ9jitFjj2NaVvElwBOk2qQGX0YeCncznmfAqk5QgwqwgUhDWKt2Ojutud3n-Ptuw8pJ4zY2je119omDo_7X3R1CBD13vqAhReNFLbZuF-pFXCPR0xRz0tQpX8kQeV4Rq5IxMR6id1XoxX7isjbBZmwSesH7inRqkM3vWSkqZkNF0V02g6YUzDajmudzH1zppPlBLXkymECXQOA_GA2LImAaBk35YSDYgeXbCqtCdkCaV4PsyPEmBTis5xM30KDrTxviVCJltM9fut6s8dJstammi4wHodZe0ZNkBu-cCKvX9DbPAvymdG3NFD5ss-nCMWSWcQUQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1529962946,\"updated\":1529962946,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
- "Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/48b62b3ede7744569920e4a35acf6601?api-version=2016-10-01",
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:37 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:42:31 GMT",
+ "content-length" : "823",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "ea21b41f-46ab-46ac-91e3-eed4882fe11a",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "5e445b91-1dbb-4c2c-9236-7020164618cc",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1\",\"deletedDate\":1529962951,\"scheduledPurgeDate\":1537738951,\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/dccd6ba8014a4ae39ac2f122499c6eca\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"j1Yl305qd5uKultZ9jitFjj2NaVvElwBOk2qQGX0YeCncznmfAqk5QgwqwgUhDWKt2Ojutud3n-Ptuw8pJ4zY2je119omDo_7X3R1CBD13vqAhReNFLbZuF-pFXCPR0xRz0tQpX8kQeV4Rq5IxMR6id1XoxX7isjbBZmwSesH7inRqkM3vWSkqZkNF0V02g6YUzDajmudzH1zppPlBLXkymECXQOA_GA2LImAaBk35YSDYgeXbCqtCdkCaV4PsyPEmBTis5xM30KDrTxviVCJltM9fut6s8dJstammi4wHodZe0ZNkBu-cCKvX9DbPAvymdG3NFD5ss-nCMWSWcQUQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1529962946,\"updated\":1529962946,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/48b62b3ede7744569920e4a35acf6601?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:37 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "661",
+ "date" : "Mon, 25 Jun 2018 21:42:33 GMT",
+ "content-length" : "85",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "080010c1-62b3-4f52-9079-79c47b540726",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/48b62b3ede7744569920e4a35acf6601\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"njZZak4ugkmCJXgbyfAAEXFa50d3SVOnfxUR2tJZ90YCqF6AeXteWjJjgfQdvsp8H1u0HvMGHB8PYqAkdQWYCZPplSTySrTeM_SAp649NB90ZMwo2B6TG-tqZqJXQlaRZQ5NiRXkkBgSLY5UhPPHrIPwg9lgBRrp7wmTx4ADaE8ObCN7Hbqk52pu6rEuh2KADDFmFL4U0kEDjYq4c9z-VZxrosSAdxYME7RYajyZeoIDHotMGmVJK4HxDmIKvyAWFj-TUBbwNFnes9LcqPIUpsl8JAEwHGlqwT_fGvgPGJ3Pv5jUGyakIIFYqXVYbPowef53Hy2Sv0javDC7GiTNQQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1509124958,\"updated\":1509124958,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "e51c8e1d-2212-4e90-9fea-5c6f8b20d9be",
+ "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: JavaExtensionKey1\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:38 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:42:44 GMT",
+ "content-length" : "85",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "65e6f0ea-150a-461e-8d59-15879d44c3a8",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "5078e4f6-465d-4cb9-ad74-4915df6d855c",
+ "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: JavaExtensionKey1\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:38 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "661",
+ "date" : "Mon, 25 Jun 2018 21:42:57 GMT",
+ "content-length" : "823",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -201,11 +208,37 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
+ "x-ms-keyvault-region" : "West US",
+ "cache-control" : "no-cache",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "4dc4c494-f0b4-4fe1-8917-cd31d45ff7ff",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1\",\"deletedDate\":1529962951,\"scheduledPurgeDate\":1537738951,\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/dccd6ba8014a4ae39ac2f122499c6eca\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"j1Yl305qd5uKultZ9jitFjj2NaVvElwBOk2qQGX0YeCncznmfAqk5QgwqwgUhDWKt2Ojutud3n-Ptuw8pJ4zY2je119omDo_7X3R1CBD13vqAhReNFLbZuF-pFXCPR0xRz0tQpX8kQeV4Rq5IxMR6id1XoxX7isjbBZmwSesH7inRqkM3vWSkqZkNF0V02g6YUzDajmudzH1zppPlBLXkymECXQOA_GA2LImAaBk35YSDYgeXbCqtCdkCaV4PsyPEmBTis5xM30KDrTxviVCJltM9fut6s8dJstammi4wHodZe0ZNkBu-cCKvX9DbPAvymdG3NFD5ss-nCMWSWcQUQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1529962946,\"updated\":1529962946,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
+ }
+ }, {
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1?api-version=7.0",
+ "Headers" : {
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
+ "Content-Type" : "application/json; charset=utf-8"
+ },
+ "Response" : {
+ "date" : "Mon, 25 Jun 2018 21:42:58 GMT",
+ "server" : "Microsoft-IIS/10.0",
+ "expires" : "-1",
+ "x-aspnet-version" : "4.0.30319",
+ "retry-after" : "0",
+ "StatusCode" : "204",
+ "pragma" : "no-cache",
+ "strict-transport-security" : "max-age=31536000;includeSubDomains",
+ "x-content-type-options" : "nosniff",
+ "x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "517739c3-dcbd-4e07-b55b-f4e9a93b49a8",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/48b62b3ede7744569920e4a35acf6601\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"njZZak4ugkmCJXgbyfAAEXFa50d3SVOnfxUR2tJZ90YCqF6AeXteWjJjgfQdvsp8H1u0HvMGHB8PYqAkdQWYCZPplSTySrTeM_SAp649NB90ZMwo2B6TG-tqZqJXQlaRZQ5NiRXkkBgSLY5UhPPHrIPwg9lgBRrp7wmTx4ADaE8ObCN7Hbqk52pu6rEuh2KADDFmFL4U0kEDjYq4c9z-VZxrosSAdxYME7RYajyZeoIDHotMGmVJK4HxDmIKvyAWFj-TUBbwNFnes9LcqPIUpsl8JAEwHGlqwT_fGvgPGJ3Pv5jUGyakIIFYqXVYbPowef53Hy2Sv0javDC7GiTNQQ\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1509124958,\"updated\":1509124958,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "8ad5c8a9-cf11-4427-818d-efaa3f2bad05",
+ "Body" : ""
}
} ],
"variables" : [ ]
diff --git a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverDefaultProviderTest.json b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverDefaultProviderTest.json
index 4e293c6..ffc9a93 100644
--- a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverDefaultProviderTest.json
+++ b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Key_KeyVaultKeyResolverDefaultProviderTest.json
@@ -1,15 +1,15 @@
{
"networkCallRecords" : [ {
"Method" : "POST",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/create?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/create?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:48 GMT",
- "server" : "Microsoft-IIS/8.5",
+ "date" : "Mon, 25 Jun 2018 21:22:14 GMT",
"content-length" : "0",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
@@ -19,23 +19,24 @@
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "836fe45b-3337-4084-bd71-f4a01234f275",
- "x-ms-keyvault-service-version" : "1.0.0.826",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "c045ccf2-263b-4be5-bb45-cf61cdf8d191",
"Body" : ""
}
}, {
"Method" : "POST",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/create?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/create?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:49 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "661",
+ "date" : "Mon, 25 Jun 2018 21:22:16 GMT",
+ "content-length" : "674",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -45,49 +46,51 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "ead3802d-87fc-4dcd-9a8d-d61cd9a5388b",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/ad8d8e7e860f43f5ac4bf4b900972ec2\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"mHlhF3WRE8XkchnbUG4xYx_7w11w8GXkdWv2yqp5WpRmSS0cSxv4qiZLL3Oznjj8AQs2pjL8uiqsXjJBqcPJvkMhnB9sha6vmUnuoiKpyi1bMV-zNXIBpTabrYjEnhPx9BFqXQWdLzmWQdlWu7JJTtabw9boVMHsJ-5jr5_wmoy8uF0XnNPSpunSKH3dUNrU-NrftMRPEW93ga59IiTmlGNUe_zOQeHBEJ_o4nxE07H7NjX3nBsrar-ycEMWdUV1XaJQrtBR3mgZxztx3OfXugzIn0bsGfYDf5mWjSnKUclhkeMen5ergTd8tN05tT_uOiUKKbj7ls0J53EniuaNmw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1509124909,\"updated\":1509124909,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "3ab77773-2743-4cd4-b573-aa2acbfd05a1",
+ "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/93d42ad97a7842eb8925c5b4dfbea76e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"0l9rjWJoKf-BnGB78pt1q_Qt43e2oEM2wE0zG8VqczMsD6H72iL_RcQZUwgIyJAZAinJQ9cUqbwz21C20rACtaPEi99uVv0cYQUnQK66F8frCrPTH_H2B2mLFk4DJs442FW3GcMt5i8kozs-Kc532g-DSTNPdz2of-MDVtF0wG0bk6V1s0Gs6tRd087goZUCre8eYUC_wc1jsivhN4z9teyHqqJQi7-3jO_PBiaBsc3NaitVMuwg797QOjMO84eO3PQnkYeCA6Jb10SThFMgbH5JXtRZOegptyrzYxPRzyah7OfVsiqHsgLMtJ9LnhLpXtc9nSXlaf20II7MP-7SUw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1529961736,\"updated\":1529961736,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:49 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:22:18 GMT",
+ "content-length" : "674",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "34a13f06-b0d3-4923-ba20-e14ee2e279e1",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "acbca651-c8ab-47e8-bb2f-04d4d2f1eab5",
+ "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/93d42ad97a7842eb8925c5b4dfbea76e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"0l9rjWJoKf-BnGB78pt1q_Qt43e2oEM2wE0zG8VqczMsD6H72iL_RcQZUwgIyJAZAinJQ9cUqbwz21C20rACtaPEi99uVv0cYQUnQK66F8frCrPTH_H2B2mLFk4DJs442FW3GcMt5i8kozs-Kc532g-DSTNPdz2of-MDVtF0wG0bk6V1s0Gs6tRd087goZUCre8eYUC_wc1jsivhN4z9teyHqqJQi7-3jO_PBiaBsc3NaitVMuwg797QOjMO84eO3PQnkYeCA6Jb10SThFMgbH5JXtRZOegptyrzYxPRzyah7OfVsiqHsgLMtJ9LnhLpXtc9nSXlaf20II7MP-7SUw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1529961736,\"updated\":1529961736,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/93d42ad97a7842eb8925c5b4dfbea76e?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:49 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "661",
+ "date" : "Mon, 25 Jun 2018 21:22:19 GMT",
+ "content-length" : "674",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -97,115 +100,118 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "2c686c34-63be-4860-97a4-51b2b55a817e",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/ad8d8e7e860f43f5ac4bf4b900972ec2\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"mHlhF3WRE8XkchnbUG4xYx_7w11w8GXkdWv2yqp5WpRmSS0cSxv4qiZLL3Oznjj8AQs2pjL8uiqsXjJBqcPJvkMhnB9sha6vmUnuoiKpyi1bMV-zNXIBpTabrYjEnhPx9BFqXQWdLzmWQdlWu7JJTtabw9boVMHsJ-5jr5_wmoy8uF0XnNPSpunSKH3dUNrU-NrftMRPEW93ga59IiTmlGNUe_zOQeHBEJ_o4nxE07H7NjX3nBsrar-ycEMWdUV1XaJQrtBR3mgZxztx3OfXugzIn0bsGfYDf5mWjSnKUclhkeMen5ergTd8tN05tT_uOiUKKbj7ls0J53EniuaNmw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1509124909,\"updated\":1509124909,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "34697143-5109-4df3-b36e-e8488d0a729f",
+ "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/93d42ad97a7842eb8925c5b4dfbea76e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"0l9rjWJoKf-BnGB78pt1q_Qt43e2oEM2wE0zG8VqczMsD6H72iL_RcQZUwgIyJAZAinJQ9cUqbwz21C20rACtaPEi99uVv0cYQUnQK66F8frCrPTH_H2B2mLFk4DJs442FW3GcMt5i8kozs-Kc532g-DSTNPdz2of-MDVtF0wG0bk6V1s0Gs6tRd087goZUCre8eYUC_wc1jsivhN4z9teyHqqJQi7-3jO_PBiaBsc3NaitVMuwg797QOjMO84eO3PQnkYeCA6Jb10SThFMgbH5JXtRZOegptyrzYxPRzyah7OfVsiqHsgLMtJ9LnhLpXtc9nSXlaf20II7MP-7SUw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1529961736,\"updated\":1529961736,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
- "Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/ad8d8e7e860f43f5ac4bf4b900972ec2?api-version=2016-10-01",
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:49 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:22:19 GMT",
+ "content-length" : "823",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "422e602c-4357-4c09-b73c-3ebae57455fb",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "85fbccc4-89ce-44e2-b631-fc0742d93f56",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1\",\"deletedDate\":1529961739,\"scheduledPurgeDate\":1537737739,\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/93d42ad97a7842eb8925c5b4dfbea76e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"0l9rjWJoKf-BnGB78pt1q_Qt43e2oEM2wE0zG8VqczMsD6H72iL_RcQZUwgIyJAZAinJQ9cUqbwz21C20rACtaPEi99uVv0cYQUnQK66F8frCrPTH_H2B2mLFk4DJs442FW3GcMt5i8kozs-Kc532g-DSTNPdz2of-MDVtF0wG0bk6V1s0Gs6tRd087goZUCre8eYUC_wc1jsivhN4z9teyHqqJQi7-3jO_PBiaBsc3NaitVMuwg797QOjMO84eO3PQnkYeCA6Jb10SThFMgbH5JXtRZOegptyrzYxPRzyah7OfVsiqHsgLMtJ9LnhLpXtc9nSXlaf20II7MP-7SUw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1529961736,\"updated\":1529961736,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/ad8d8e7e860f43f5ac4bf4b900972ec2?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:49 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "661",
+ "date" : "Mon, 25 Jun 2018 21:22:23 GMT",
+ "content-length" : "85",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "36df9e87-7f06-4a36-8fc5-692be8a31eea",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/ad8d8e7e860f43f5ac4bf4b900972ec2\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"mHlhF3WRE8XkchnbUG4xYx_7w11w8GXkdWv2yqp5WpRmSS0cSxv4qiZLL3Oznjj8AQs2pjL8uiqsXjJBqcPJvkMhnB9sha6vmUnuoiKpyi1bMV-zNXIBpTabrYjEnhPx9BFqXQWdLzmWQdlWu7JJTtabw9boVMHsJ-5jr5_wmoy8uF0XnNPSpunSKH3dUNrU-NrftMRPEW93ga59IiTmlGNUe_zOQeHBEJ_o4nxE07H7NjX3nBsrar-ycEMWdUV1XaJQrtBR3mgZxztx3OfXugzIn0bsGfYDf5mWjSnKUclhkeMen5ergTd8tN05tT_uOiUKKbj7ls0J53EniuaNmw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1509124909,\"updated\":1509124909,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "3e663752-1ab5-4824-bb3c-51c46afb30e2",
+ "Body" : "{\"error\":{\"code\":\"KeyNotFound\",\"message\":\"Deleted Key not found: JavaExtensionKey1\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:49 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:22:34 GMT",
+ "content-length" : "823",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "8bb56581-7736-4d46-93b3-9accf548418b",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "3460e39b-9e11-4133-9477-ce4c7e92410f",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1\",\"deletedDate\":1529961739,\"scheduledPurgeDate\":1537737739,\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey1/93d42ad97a7842eb8925c5b4dfbea76e\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"0l9rjWJoKf-BnGB78pt1q_Qt43e2oEM2wE0zG8VqczMsD6H72iL_RcQZUwgIyJAZAinJQ9cUqbwz21C20rACtaPEi99uVv0cYQUnQK66F8frCrPTH_H2B2mLFk4DJs442FW3GcMt5i8kozs-Kc532g-DSTNPdz2of-MDVtF0wG0bk6V1s0Gs6tRd087goZUCre8eYUC_wc1jsivhN4z9teyHqqJQi7-3jO_PBiaBsc3NaitVMuwg797QOjMO84eO3PQnkYeCA6Jb10SThFMgbH5JXtRZOegptyrzYxPRzyah7OfVsiqHsgLMtJ9LnhLpXtc9nSXlaf20II7MP-7SUw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1529961736,\"updated\":1529961736,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedkeys/JavaExtensionKey1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:49 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "661",
+ "date" : "Mon, 25 Jun 2018 21:22:35 GMT",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "204",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
- "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "6c6ff180-702c-44ae-9e42-ea9821519bb7",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"key\":{\"kid\":\"https://tifchen-keyvault-fancy.vault.azure.net/keys/JavaExtensionKey/ad8d8e7e860f43f5ac4bf4b900972ec2\",\"kty\":\"RSA\",\"key_ops\":[\"encrypt\",\"decrypt\",\"sign\",\"verify\",\"wrapKey\",\"unwrapKey\"],\"n\":\"mHlhF3WRE8XkchnbUG4xYx_7w11w8GXkdWv2yqp5WpRmSS0cSxv4qiZLL3Oznjj8AQs2pjL8uiqsXjJBqcPJvkMhnB9sha6vmUnuoiKpyi1bMV-zNXIBpTabrYjEnhPx9BFqXQWdLzmWQdlWu7JJTtabw9boVMHsJ-5jr5_wmoy8uF0XnNPSpunSKH3dUNrU-NrftMRPEW93ga59IiTmlGNUe_zOQeHBEJ_o4nxE07H7NjX3nBsrar-ycEMWdUV1XaJQrtBR3mgZxztx3OfXugzIn0bsGfYDf5mWjSnKUclhkeMen5ergTd8tN05tT_uOiUKKbj7ls0J53EniuaNmw\",\"e\":\"AQAB\"},\"attributes\":{\"enabled\":true,\"created\":1509124909,\"updated\":1509124909,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "4418fde5-e9e7-457a-81af-b33c2acb6c31",
+ "Body" : ""
}
} ],
"variables" : [ ]
diff --git a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverBCProviderTest.json b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverBCProviderTest.json
index 8b528b6..bc2d373 100644
--- a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverBCProviderTest.json
+++ b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverBCProviderTest.json
@@ -1,15 +1,15 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:33 GMT",
- "server" : "Microsoft-IIS/8.5",
+ "date" : "Mon, 25 Jun 2018 21:41:41 GMT",
"content-length" : "0",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
@@ -19,23 +19,24 @@
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "cf8fdd63-340a-42d4-827e-65732acf3adb",
- "x-ms-keyvault-service-version" : "1.0.0.826",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "54df7778-3be6-4420-8ed0-892b94f7f1a4",
"Body" : ""
}
}, {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:34 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "290",
+ "date" : "Mon, 25 Jun 2018 21:41:43 GMT",
+ "content-length" : "303",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -45,49 +46,51 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "fbcbc52d-c3f8-4e0e-9b11-65da75b5585e",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/97dd67e8a33e49a5b289e529d31aa361\",\"attributes\":{\"enabled\":true,\"created\":1509124954,\"updated\":1509124954,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "e6e6b826-232a-4f1f-9ced-d766c5f40563",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/b1bdfdb663494a2f8a7594d4aca309f5\",\"attributes\":{\"enabled\":true,\"created\":1529962903,\"updated\":1529962903,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:34 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:41:44 GMT",
+ "content-length" : "303",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "72468fbd-6fef-4b47-8dad-b8ab604604d9",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "9397cc6f-3fd4-4e7e-8ac3-cbd6510fb284",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/b1bdfdb663494a2f8a7594d4aca309f5\",\"attributes\":{\"enabled\":true,\"created\":1529962903,\"updated\":1529962903,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/b1bdfdb663494a2f8a7594d4aca309f5?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:34 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "290",
+ "date" : "Mon, 25 Jun 2018 21:41:45 GMT",
+ "content-length" : "303",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -97,115 +100,118 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "9287c437-b510-4b59-9ddb-f4d61dc0365c",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/97dd67e8a33e49a5b289e529d31aa361\",\"attributes\":{\"enabled\":true,\"created\":1509124954,\"updated\":1509124954,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "49169fdc-b7f6-4dde-8775-9cff28e9903f",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/b1bdfdb663494a2f8a7594d4aca309f5\",\"attributes\":{\"enabled\":true,\"created\":1529962903,\"updated\":1529962903,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
- "Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/97dd67e8a33e49a5b289e529d31aa361?api-version=2016-10-01",
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:34 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:41:47 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "710c9354-5c70-448f-bf86-706fd8307b76",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "6b11c66b-440d-4582-8f3f-36fce9aba79a",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1\",\"deletedDate\":1529962907,\"scheduledPurgeDate\":1537738907,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/b1bdfdb663494a2f8a7594d4aca309f5\",\"attributes\":{\"enabled\":true,\"created\":1529962903,\"updated\":1529962903,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/97dd67e8a33e49a5b289e529d31aa361?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:34 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "290",
+ "date" : "Mon, 25 Jun 2018 21:41:47 GMT",
+ "content-length" : "94",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "c25e6d0a-a416-4789-be99-d7aa6362300f",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/97dd67e8a33e49a5b289e529d31aa361\",\"attributes\":{\"enabled\":true,\"created\":1509124954,\"updated\":1509124954,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "27dd6357-1025-4c6f-95f1-3aa5f4382dc2",
+ "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: JavaExtensionSecret1\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:34 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:42:00 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "093b60e4-f440-4030-abc6-6be35c8c207a",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "c4842b6d-1abf-440c-8953-d97b5d77ee0e",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1\",\"deletedDate\":1529962907,\"scheduledPurgeDate\":1537738907,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/b1bdfdb663494a2f8a7594d4aca309f5\",\"attributes\":{\"enabled\":true,\"created\":1529962903,\"updated\":1529962903,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:34 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "257",
+ "date" : "Mon, 25 Jun 2018 21:42:01 GMT",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "204",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
- "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "027d43f0-3f23-45f4-b27b-ab2205dc4ac2",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/97dd67e8a33e49a5b289e529d31aa361\",\"attributes\":{\"enabled\":true,\"created\":1509124954,\"updated\":1509124954,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "dc6e5859-4d2c-4a67-896b-421e70026551",
+ "Body" : ""
}
} ],
"variables" : [ ]
diff --git a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverDefaultProviderTest.json b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverDefaultProviderTest.json
index c64c066..c21eda2 100644
--- a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverDefaultProviderTest.json
+++ b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret128Base64_KeyVaultKeyResolverDefaultProviderTest.json
@@ -1,15 +1,15 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:46 GMT",
- "server" : "Microsoft-IIS/8.5",
+ "date" : "Mon, 25 Jun 2018 21:21:05 GMT",
"content-length" : "0",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
@@ -19,23 +19,24 @@
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "49d577f9-a58d-4027-bcb3-8aaba751ab1f",
- "x-ms-keyvault-service-version" : "1.0.0.826",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "cb1b7f7f-72ee-4642-bec1-b5c8030f042b",
"Body" : ""
}
}, {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:46 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "290",
+ "date" : "Mon, 25 Jun 2018 21:21:08 GMT",
+ "content-length" : "303",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -45,49 +46,51 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "59bc1f86-9162-4eec-bcb4-9b0b82ef1a06",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/052b93a607c249cebd8ce0fae91ba347\",\"attributes\":{\"enabled\":true,\"created\":1509124907,\"updated\":1509124907,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "8b6bc90f-8930-48e2-96b8-c9a176eed228",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/3660edafb1a04204876ed246a3c4514b\",\"attributes\":{\"enabled\":true,\"created\":1529961668,\"updated\":1529961668,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:46 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:21:09 GMT",
+ "content-length" : "303",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "87f49054-9261-4d73-b8bc-49185702daa4",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "71739e44-356f-4d91-8fd9-8082cac85d19",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/3660edafb1a04204876ed246a3c4514b\",\"attributes\":{\"enabled\":true,\"created\":1529961668,\"updated\":1529961668,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/3660edafb1a04204876ed246a3c4514b?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:47 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "290",
+ "date" : "Mon, 25 Jun 2018 21:21:11 GMT",
+ "content-length" : "303",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -97,101 +100,105 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "7cf90a9f-41b1-4c02-8a73-96a440ef86b3",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/052b93a607c249cebd8ce0fae91ba347\",\"attributes\":{\"enabled\":true,\"created\":1509124907,\"updated\":1509124907,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "5d62591d-66f3-4be9-b5e5-652a410a299e",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/3660edafb1a04204876ed246a3c4514b\",\"attributes\":{\"enabled\":true,\"created\":1529961668,\"updated\":1529961668,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
- "Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/052b93a607c249cebd8ce0fae91ba347?api-version=2016-10-01",
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:47 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:21:11 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "22fa3017-a166-4e98-8a60-844d7ba78105",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "b59f0561-bb57-4a4a-8ad4-a4e69d598e76",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1\",\"deletedDate\":1529961672,\"scheduledPurgeDate\":1537737672,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/3660edafb1a04204876ed246a3c4514b\",\"attributes\":{\"enabled\":true,\"created\":1529961668,\"updated\":1529961668,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/052b93a607c249cebd8ce0fae91ba347?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:47 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "290",
+ "date" : "Mon, 25 Jun 2018 21:21:12 GMT",
+ "content-length" : "94",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "fe02fdd5-d52b-47e2-bc69-93d899ecb496",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODw\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/052b93a607c249cebd8ce0fae91ba347\",\"attributes\":{\"enabled\":true,\"created\":1509124907,\"updated\":1509124907,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "1cfffd8b-acd9-476b-8fcb-e639fbf2b078",
+ "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: JavaExtensionSecret1\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:47 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:21:23 GMT",
+ "content-length" : "94",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "d1dba06c-4be0-42de-b0b3-313557f8744f",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "73497dde-2cbb-4188-bb39-2258e4c7e8cb",
+ "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: JavaExtensionSecret1\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:47 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "257",
+ "date" : "Mon, 25 Jun 2018 21:21:34 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -201,11 +208,37 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
+ "x-ms-keyvault-region" : "West US",
+ "cache-control" : "no-cache",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "5f1232e2-0b99-4ff7-b511-5ea1ee435f7a",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1\",\"deletedDate\":1529961672,\"scheduledPurgeDate\":1537737672,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret1/3660edafb1a04204876ed246a3c4514b\",\"attributes\":{\"enabled\":true,\"created\":1529961668,\"updated\":1529961668,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
+ }
+ }, {
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret1?api-version=7.0",
+ "Headers" : {
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
+ "Content-Type" : "application/json; charset=utf-8"
+ },
+ "Response" : {
+ "date" : "Mon, 25 Jun 2018 21:21:37 GMT",
+ "server" : "Microsoft-IIS/10.0",
+ "expires" : "-1",
+ "x-aspnet-version" : "4.0.30319",
+ "retry-after" : "0",
+ "StatusCode" : "204",
+ "pragma" : "no-cache",
+ "strict-transport-security" : "max-age=31536000;includeSubDomains",
+ "x-content-type-options" : "nosniff",
+ "x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "c41590c6-cfea-42e8-b53e-c311b845a1d8",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/052b93a607c249cebd8ce0fae91ba347\",\"attributes\":{\"enabled\":true,\"created\":1509124907,\"updated\":1509124907,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "019bf790-a06b-454f-8d4c-ddf2f872e943",
+ "Body" : ""
}
} ],
"variables" : [ ]
diff --git a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverBCProviderTest.json b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverBCProviderTest.json
index b411b9d..e01e72a 100644
--- a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverBCProviderTest.json
+++ b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverBCProviderTest.json
@@ -1,15 +1,15 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:37 GMT",
- "server" : "Microsoft-IIS/8.5",
+ "date" : "Mon, 25 Jun 2018 21:42:58 GMT",
"content-length" : "0",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
@@ -19,23 +19,24 @@
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "e8981109-9337-46d3-b704-3c2ef83f3037",
- "x-ms-keyvault-service-version" : "1.0.0.826",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "d4374be8-8f6e-431d-a2f7-43d4a14b21fe",
"Body" : ""
}
}, {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:37 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "300",
+ "date" : "Mon, 25 Jun 2018 21:42:59 GMT",
+ "content-length" : "313",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -45,49 +46,51 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "fac3ba6a-9444-4497-a676-716f8666775c",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/40e7914b8c464c77bc65cee1552405f0\",\"attributes\":{\"enabled\":true,\"created\":1509124958,\"updated\":1509124958,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "d47caae8-b82d-4fd0-9aa3-a8adb80b91e9",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/b501f89c350e430a81d4efd59c372c91\",\"attributes\":{\"enabled\":true,\"created\":1529962979,\"updated\":1529962979,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:37 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:43:00 GMT",
+ "content-length" : "313",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "91bdde45-9737-4202-a7dd-c895f8beca25",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "9ec8c543-5875-4cf7-a7fd-2fe9af5066b2",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/b501f89c350e430a81d4efd59c372c91\",\"attributes\":{\"enabled\":true,\"created\":1529962979,\"updated\":1529962979,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/b501f89c350e430a81d4efd59c372c91?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:38 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "300",
+ "date" : "Mon, 25 Jun 2018 21:43:03 GMT",
+ "content-length" : "313",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -97,115 +100,118 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "41fe493c-4910-4626-ab3d-fcc4d1f5b24d",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/40e7914b8c464c77bc65cee1552405f0\",\"attributes\":{\"enabled\":true,\"created\":1509124958,\"updated\":1509124958,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "2b0bbedb-6a9f-4dc3-8306-e56019c8f97c",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/b501f89c350e430a81d4efd59c372c91\",\"attributes\":{\"enabled\":true,\"created\":1529962979,\"updated\":1529962979,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
- "Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/40e7914b8c464c77bc65cee1552405f0?api-version=2016-10-01",
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:38 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:43:04 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "e285db27-d957-4a26-86bc-7dc46a6805b6",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "4380c7a1-1a69-4987-90c9-2b92567d7f8a",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret2\",\"deletedDate\":1529962984,\"scheduledPurgeDate\":1537738984,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/b501f89c350e430a81d4efd59c372c91\",\"attributes\":{\"enabled\":true,\"created\":1529962979,\"updated\":1529962979,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/40e7914b8c464c77bc65cee1552405f0?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:38 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "300",
+ "date" : "Mon, 25 Jun 2018 21:43:05 GMT",
+ "content-length" : "94",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "3a5f6ae8-0b6c-4177-bbf0-3c0458c518ba",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/40e7914b8c464c77bc65cee1552405f0\",\"attributes\":{\"enabled\":true,\"created\":1509124958,\"updated\":1509124958,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "bccc94ad-d3d1-41d3-90b5-3a2af1c299e5",
+ "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: JavaExtensionSecret2\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:38 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:43:20 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "fc72f01a-bf36-4a43-a3cc-dc0bfea8ebbf",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "705f16af-2a5b-45e9-96c4-db3dc60016d8",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret2\",\"deletedDate\":1529962984,\"scheduledPurgeDate\":1537738984,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/b501f89c350e430a81d4efd59c372c91\",\"attributes\":{\"enabled\":true,\"created\":1529962979,\"updated\":1529962979,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:38 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "257",
+ "date" : "Mon, 25 Jun 2018 21:43:21 GMT",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "204",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
- "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "ec691a7d-f6ca-49ae-8a8c-a44573412319",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/40e7914b8c464c77bc65cee1552405f0\",\"attributes\":{\"enabled\":true,\"created\":1509124958,\"updated\":1509124958,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "b65c2739-f027-4e75-ac8c-f78f8b7c87c3",
+ "Body" : ""
}
} ],
"variables" : [ ]
diff --git a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverDefaultProviderTest.json b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverDefaultProviderTest.json
index 2b4b9cf..e5c6aed 100644
--- a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverDefaultProviderTest.json
+++ b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret192Base64_KeyVaultKeyResolverDefaultProviderTest.json
@@ -1,15 +1,15 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:44 GMT",
- "server" : "Microsoft-IIS/8.5",
+ "date" : "Mon, 25 Jun 2018 21:20:36 GMT",
"content-length" : "0",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
@@ -19,23 +19,24 @@
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "a506ac1e-e1d6-4200-8eb0-e37bf51a4f1b",
- "x-ms-keyvault-service-version" : "1.0.0.826",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "62cb3197-e61c-44fb-87a2-b1fcaa0260ed",
"Body" : ""
}
}, {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:44 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "300",
+ "date" : "Mon, 25 Jun 2018 21:20:40 GMT",
+ "content-length" : "313",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -45,49 +46,51 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "e0fdbef4-ff32-46a8-99f9-007b9dd0a57f",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/478f8e1512844a77b961b88cc4529018\",\"attributes\":{\"enabled\":true,\"created\":1509124905,\"updated\":1509124905,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "b5a08ae9-bf3b-46b5-b715-9b20356f7307",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/034d5deab8164ffc97ca154f0cd9466e\",\"attributes\":{\"enabled\":true,\"created\":1529961640,\"updated\":1529961640,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:44 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:20:41 GMT",
+ "content-length" : "313",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "d2f7ec72-7104-428b-922b-ca5713a3165c",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "291803e2-3257-4d43-a855-ffae71542940",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/034d5deab8164ffc97ca154f0cd9466e\",\"attributes\":{\"enabled\":true,\"created\":1529961640,\"updated\":1529961640,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/034d5deab8164ffc97ca154f0cd9466e?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:45 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "300",
+ "date" : "Mon, 25 Jun 2018 21:20:46 GMT",
+ "content-length" : "313",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -97,115 +100,118 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "54808fb3-d391-470c-90ed-45ec88789592",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/478f8e1512844a77b961b88cc4529018\",\"attributes\":{\"enabled\":true,\"created\":1509124905,\"updated\":1509124905,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "efde48d1-b1bb-4abb-9eff-2a18105d3dae",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/034d5deab8164ffc97ca154f0cd9466e\",\"attributes\":{\"enabled\":true,\"created\":1529961640,\"updated\":1529961640,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
- "Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/478f8e1512844a77b961b88cc4529018?api-version=2016-10-01",
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:45 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:20:48 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "3f9bbdda-b658-4dba-8b03-5940f728cb5f",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "4557a962-740d-4221-9ff5-8f0fa90ae5e5",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret2\",\"deletedDate\":1529961648,\"scheduledPurgeDate\":1537737648,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/034d5deab8164ffc97ca154f0cd9466e\",\"attributes\":{\"enabled\":true,\"created\":1529961640,\"updated\":1529961640,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/478f8e1512844a77b961b88cc4529018?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:45 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "300",
+ "date" : "Mon, 25 Jun 2018 21:20:50 GMT",
+ "content-length" : "94",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "0fc71475-07aa-4941-aabf-0791a46aa2b2",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYX\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/478f8e1512844a77b961b88cc4529018\",\"attributes\":{\"enabled\":true,\"created\":1509124905,\"updated\":1509124905,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "d901c334-4cbf-4c39-8706-e7f79ed78e3b",
+ "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: JavaExtensionSecret2\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:45 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:21:03 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "7cae4c71-6b19-4c28-a8ef-8ac682935a4d",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "b1c9446f-bffa-4028-abe0-e29d6bdadbae",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret2\",\"deletedDate\":1529961648,\"scheduledPurgeDate\":1537737648,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret2/034d5deab8164ffc97ca154f0cd9466e\",\"attributes\":{\"enabled\":true,\"created\":1529961640,\"updated\":1529961640,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret2?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:45 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "257",
+ "date" : "Mon, 25 Jun 2018 21:21:04 GMT",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "204",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
- "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "517240c2-d3b3-4689-a082-33c50e736a5f",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/478f8e1512844a77b961b88cc4529018\",\"attributes\":{\"enabled\":true,\"created\":1509124905,\"updated\":1509124905,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "c1f5b6ab-e133-4215-956a-2da4f3be09df",
+ "Body" : ""
}
} ],
"variables" : [ ]
diff --git a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverBCProviderTest.json b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverBCProviderTest.json
index e2ca480..af284b3 100644
--- a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverBCProviderTest.json
+++ b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverBCProviderTest.json
@@ -1,15 +1,15 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:36 GMT",
- "server" : "Microsoft-IIS/8.5",
+ "date" : "Mon, 25 Jun 2018 21:42:01 GMT",
"content-length" : "0",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
@@ -19,23 +19,24 @@
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "30a31aa1-f647-4930-8700-e71d82a77594",
- "x-ms-keyvault-service-version" : "1.0.0.826",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "cc5bd3d4-d3ff-4453-a20e-fa49e582a84b",
"Body" : ""
}
}, {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:36 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "311",
+ "date" : "Mon, 25 Jun 2018 21:42:03 GMT",
+ "content-length" : "324",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -45,49 +46,51 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "e9efe7ba-d60c-4dd6-8820-653882964356",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/f7a5d02d03c54b27811e2b9ada0bc8f1\",\"attributes\":{\"enabled\":true,\"created\":1509124956,\"updated\":1509124956,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "2a72c49e-5d14-4e46-97fc-62dacb0c9c0f",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/a94886eb8ad64bef8af8e1fcc0d820ab\",\"attributes\":{\"enabled\":true,\"created\":1529962923,\"updated\":1529962923,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:36 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:42:06 GMT",
+ "content-length" : "324",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "78e2bfbd-11ca-42d8-82e3-51c16410affc",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "2277fd77-1acd-4735-84b8-b6ef097c6ac2",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/a94886eb8ad64bef8af8e1fcc0d820ab\",\"attributes\":{\"enabled\":true,\"created\":1529962923,\"updated\":1529962923,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/a94886eb8ad64bef8af8e1fcc0d820ab?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:36 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "311",
+ "date" : "Mon, 25 Jun 2018 21:42:07 GMT",
+ "content-length" : "324",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -97,115 +100,118 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "3686f342-cca2-42af-892d-dd143844495a",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/f7a5d02d03c54b27811e2b9ada0bc8f1\",\"attributes\":{\"enabled\":true,\"created\":1509124956,\"updated\":1509124956,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "d44518f5-ccf1-4e88-9586-4038c1fb1cf4",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/a94886eb8ad64bef8af8e1fcc0d820ab\",\"attributes\":{\"enabled\":true,\"created\":1529962923,\"updated\":1529962923,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
- "Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/f7a5d02d03c54b27811e2b9ada0bc8f1?api-version=2016-10-01",
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:36 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:42:09 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "09d9ac0e-2d61-4599-923b-e593a32e62e8",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "f6e3b359-848e-4cc5-9143-12a6389e9808",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3\",\"deletedDate\":1529962929,\"scheduledPurgeDate\":1537738929,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/a94886eb8ad64bef8af8e1fcc0d820ab\",\"attributes\":{\"enabled\":true,\"created\":1529962923,\"updated\":1529962923,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/f7a5d02d03c54b27811e2b9ada0bc8f1?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:36 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "311",
+ "date" : "Mon, 25 Jun 2018 21:42:10 GMT",
+ "content-length" : "94",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "ca7e346c-2cdc-4626-baa9-d667d44da90c",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/f7a5d02d03c54b27811e2b9ada0bc8f1\",\"attributes\":{\"enabled\":true,\"created\":1509124956,\"updated\":1509124956,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "b391ff5b-fef8-4053-a422-fdbd2f41f7a9",
+ "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: JavaExtensionSecret3\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:36 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:42:22 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "0a98c9c7-a6cf-4724-9f56-8c48f43f3f1d",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "0384cc96-00ef-4404-8de0-04b72ca1b14c",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3\",\"deletedDate\":1529962929,\"scheduledPurgeDate\":1537738929,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/a94886eb8ad64bef8af8e1fcc0d820ab\",\"attributes\":{\"enabled\":true,\"created\":1529962923,\"updated\":1529962923,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:22:37 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "257",
+ "date" : "Mon, 25 Jun 2018 21:42:24 GMT",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "204",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
- "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "35a3391c-382b-49f8-8c44-3dc6f697b470",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/f7a5d02d03c54b27811e2b9ada0bc8f1\",\"attributes\":{\"enabled\":true,\"created\":1509124956,\"updated\":1509124956,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "4212235d-b2eb-4f99-ae79-703da82c16a3",
+ "Body" : ""
}
} ],
"variables" : [ ]
diff --git a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverDefaultProviderTest.json b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverDefaultProviderTest.json
index c28a2e3..449913a 100644
--- a/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverDefaultProviderTest.json
+++ b/azure-keyvault-extensions/target/test-classes/session-records/KeyVault_KeyVaultKeyResolver_Secret256Base64_KeyVaultKeyResolverDefaultProviderTest.json
@@ -1,15 +1,15 @@
{
"networkCallRecords" : [ {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:47 GMT",
- "server" : "Microsoft-IIS/8.5",
+ "date" : "Mon, 25 Jun 2018 21:21:37 GMT",
"content-length" : "0",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
@@ -19,23 +19,24 @@
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "c70c1c57-ed02-434a-9223-6c08b7152d88",
- "x-ms-keyvault-service-version" : "1.0.0.826",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "515fc45a-5154-4def-bd38-7f5e7e225274",
"Body" : ""
}
}, {
"Method" : "PUT",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:47 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "311",
+ "date" : "Mon, 25 Jun 2018 21:21:40 GMT",
+ "content-length" : "324",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -45,49 +46,51 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "04bc5d8b-cdc3-4e26-833a-37d555c6df57",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/a58f82483ca447648d16a2cca913755e\",\"attributes\":{\"enabled\":true,\"created\":1509124908,\"updated\":1509124908,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "fe666844-bbff-4583-aee4-61d597f7e0f7",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/ea1deb0012b24eb89a924fe1783751be\",\"attributes\":{\"enabled\":true,\"created\":1529961701,\"updated\":1529961701,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:48 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:21:44 GMT",
+ "content-length" : "324",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "39a988ab-e1b8-4b67-b520-c19401a5fb9d",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "abd49cc7-f213-4c39-984a-8625ead28a4a",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/ea1deb0012b24eb89a924fe1783751be\",\"attributes\":{\"enabled\":true,\"created\":1529961701,\"updated\":1529961701,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/ea1deb0012b24eb89a924fe1783751be?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:48 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "311",
+ "date" : "Mon, 25 Jun 2018 21:21:46 GMT",
+ "content-length" : "324",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -97,101 +100,105 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "46129c99-ee6c-43fd-91cf-5da430069b80",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/a58f82483ca447648d16a2cca913755e\",\"attributes\":{\"enabled\":true,\"created\":1509124908,\"updated\":1509124908,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "53d069d3-6c2f-4fc8-b0e6-fbdbaacbad4b",
+ "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/ea1deb0012b24eb89a924fe1783751be\",\"attributes\":{\"enabled\":true,\"created\":1529961701,\"updated\":1529961701,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
- "Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/a58f82483ca447648d16a2cca913755e?api-version=2016-10-01",
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:48 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:21:47 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "200",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "688660fc-7def-4dcd-92c7-8c06d6669b0d",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "d406910f-3266-45f2-9913-aa22d4c0ebc2",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3\",\"deletedDate\":1529961708,\"scheduledPurgeDate\":1537737708,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/ea1deb0012b24eb89a924fe1783751be\",\"attributes\":{\"enabled\":true,\"created\":1529961701,\"updated\":1529961701,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
}
}, {
"Method" : "GET",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/a58f82483ca447648d16a2cca913755e?api-version=2016-10-01",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:48 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "311",
+ "date" : "Mon, 25 Jun 2018 21:21:48 GMT",
+ "content-length" : "94",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
- "StatusCode" : "200",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "316e4b25-e102-4308-bd0a-f90f0b706fb0",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"value\":\"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8\",\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/a58f82483ca447648d16a2cca913755e\",\"attributes\":{\"enabled\":true,\"created\":1509124908,\"updated\":1509124908,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "15c519bc-78e5-40a5-bb8e-de82a9e8416d",
+ "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: JavaExtensionSecret3\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:48 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "0",
+ "date" : "Mon, 25 Jun 2018 21:21:59 GMT",
+ "content-length" : "94",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
- "www-authenticate" : "Bearer authorization=\"https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47\", resource=\"https://vault.azure.net\"",
"retry-after" : "0",
- "StatusCode" : "401",
+ "StatusCode" : "404",
"pragma" : "no-cache",
"strict-transport-security" : "max-age=31536000;includeSubDomains",
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
+ "content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "d614f78e-92e1-4ef2-b1d0-b5bee6ffaf52",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : ""
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "9575069d-5da9-492f-bbec-d7e66a695f25",
+ "Body" : "{\"error\":{\"code\":\"SecretNotFound\",\"message\":\"Deleted Secret not found: JavaExtensionSecret3\"}}"
}
}, {
- "Method" : "DELETE",
- "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret?api-version=2016-10-01",
+ "Method" : "GET",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3?api-version=7.0",
"Headers" : {
- "User-Agent" : "Azure-SDK-For-Java/null (KeyVaultClientBase, 2016-10-01)",
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
"Content-Type" : "application/json; charset=utf-8"
},
"Response" : {
- "date" : "Fri, 27 Oct 2017 17:21:48 GMT",
- "server" : "Microsoft-IIS/8.5",
- "content-length" : "257",
+ "date" : "Mon, 25 Jun 2018 21:22:11 GMT",
+ "content-length" : "425",
+ "server" : "Microsoft-IIS/10.0",
"expires" : "-1",
"x-aspnet-version" : "4.0.30319",
"retry-after" : "0",
@@ -201,11 +208,37 @@
"x-content-type-options" : "nosniff",
"x-powered-by" : "ASP.NET",
"content-type" : "application/json; charset=utf-8",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
+ "x-ms-keyvault-region" : "West US",
+ "cache-control" : "no-cache",
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "c3cda06a-f5e3-4ab9-8ac8-7659c73a8c0c",
+ "Body" : "{\"recoveryId\":\"https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3\",\"deletedDate\":1529961708,\"scheduledPurgeDate\":1537737708,\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret3/ea1deb0012b24eb89a924fe1783751be\",\"attributes\":{\"enabled\":true,\"created\":1529961701,\"updated\":1529961701,\"recoveryLevel\":\"Recoverable+Purgeable\"}}"
+ }
+ }, {
+ "Method" : "DELETE",
+ "Uri" : "https://tifchen-keyvault-fancy.vault.azure.net/deletedsecrets/JavaExtensionSecret3?api-version=7.0",
+ "Headers" : {
+ "User-Agent" : "Azure-SDK-For-Java/null OS:Windows 10/10.0 MacAddressHash:08b8c65810754c5927ba6275e7902c61544ffc9cb2de4d24196bc80b2fbba780 Java:1.8.0_172 (KeyVaultClientBase, 7.0)",
+ "Content-Type" : "application/json; charset=utf-8"
+ },
+ "Response" : {
+ "date" : "Mon, 25 Jun 2018 21:22:14 GMT",
+ "server" : "Microsoft-IIS/10.0",
+ "expires" : "-1",
+ "x-aspnet-version" : "4.0.30319",
+ "retry-after" : "0",
+ "StatusCode" : "204",
+ "pragma" : "no-cache",
+ "strict-transport-security" : "max-age=31536000;includeSubDomains",
+ "x-content-type-options" : "nosniff",
+ "x-powered-by" : "ASP.NET",
+ "x-ms-keyvault-network-info" : "addr=167.220.1.18;act_addr_fam=InterNetwork;",
"x-ms-keyvault-region" : "West US",
"cache-control" : "no-cache",
- "x-ms-request-id" : "59aa6f4e-1d46-47a0-baef-357966f19876",
- "x-ms-keyvault-service-version" : "1.0.0.826",
- "Body" : "{\"contentType\":\"application/octet-stream\",\"id\":\"https://tifchen-keyvault-fancy.vault.azure.net/secrets/JavaExtensionSecret/a58f82483ca447648d16a2cca913755e\",\"attributes\":{\"enabled\":true,\"created\":1509124908,\"updated\":1509124908,\"recoveryLevel\":\"Purgeable\"}}"
+ "x-ms-keyvault-service-version" : "1.0.0.849",
+ "x-ms-request-id" : "5ea866f5-7130-48ca-b495-8eed855098eb",
+ "Body" : ""
}
} ],
"variables" : [ ]
diff --git a/azure-keyvault-webkey/pom.xml b/azure-keyvault-webkey/pom.xml
index 9a4b1c2..c33885f 100644
--- a/azure-keyvault-webkey/pom.xml
+++ b/azure-keyvault-webkey/pom.xml
@@ -1,117 +1,122 @@
-
-
- 4.0.0
-
- com.microsoft.azure
- azure-keyvault-parent
- 1.0.1-SNAPSHOT
- ../pom.xml
-
+
+
+ 4.0.0
+
+ com.microsoft.azure
+ azure-keyvault-parent
+ 1.1
+ ../pom.xml
+
- azure-keyvault-webkey
- jar
+ azure-keyvault-webkey
+ jar
- Microsoft Azure SDK for Key Vault WebKey
- This package contains Microsoft Azure Key Vault WebKey library.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for Key Vault WebKey
+ This package contains Microsoft Azure Key Vault WebKey library.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- scm:git:https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
-
- UTF-8
-
-
+
+ UTF-8
+
+
-
-
- microsoft
- Microsoft
-
-
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ commons-codec
+ commons-codec
+
+
+ com.google.guava
+ guava
+
+
+ com.microsoft.rest
+ client-runtime
+ 1.3.0
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ 1.3.0
+
+
+
+ junit
+ junit
+ test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.0.2
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 1.12
+
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
- commons-codec
- commons-codec
-
-
- com.google.guava
- guava
- 20.0
-
-
-
-
- junit
- junit
- test
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 3.0.2
-
-
-
- true
- true
-
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
- 1.12
-
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ 1.7
+ 1.7
+
+
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.1
-
- 1.7
- 1.7
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.8
-
- com.microsoft.schemas._2003._10.serialization;
- /**
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ com.microsoft.schemas._2003._10.serialization;
+ /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/]]>
-
-
-
-
+
+
+
+
diff --git a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/Base64UrlJsonDeserializer.java b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/Base64UrlJsonDeserializer.java
index 9418b15..f36de8c 100644
--- a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/Base64UrlJsonDeserializer.java
+++ b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/Base64UrlJsonDeserializer.java
@@ -1,7 +1,7 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * license information.
*/
package com.microsoft.azure.keyvault.webkey;
diff --git a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/Base64UrlJsonSerializer.java b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/Base64UrlJsonSerializer.java
index eac3d33..c4b56b7 100644
--- a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/Base64UrlJsonSerializer.java
+++ b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/Base64UrlJsonSerializer.java
@@ -1,7 +1,7 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * license information.
*/
package com.microsoft.azure.keyvault.webkey;
diff --git a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKey.java b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKey.java
index 4e6ad1f..c7d317a 100644
--- a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKey.java
+++ b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKey.java
@@ -1,7 +1,7 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * license information.
*/
package com.microsoft.azure.keyvault.webkey;
@@ -11,17 +11,29 @@
import java.security.GeneralSecurityException;
import java.security.KeyFactory;
import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.Provider;
import java.security.PublicKey;
+import java.security.Security;
+import java.security.interfaces.ECPrivateKey;
+import java.security.interfaces.ECPublicKey;
import java.security.interfaces.RSAPrivateCrtKey;
import java.security.interfaces.RSAPublicKey;
+import java.security.spec.ECGenParameterSpec;
+import java.security.spec.ECParameterSpec;
+import java.security.spec.ECPoint;
+import java.security.spec.ECPrivateKeySpec;
+import java.security.spec.ECPublicKeySpec;
+import java.security.spec.EllipticCurve;
import java.security.spec.RSAPrivateCrtKeySpec;
import java.security.spec.RSAPrivateKeySpec;
import java.security.spec.RSAPublicKeySpec;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import javax.crypto.SecretKey;
@@ -36,6 +48,7 @@
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.base.Objects;
+import com.google.common.collect.ImmutableMap;
/**
* As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18.
@@ -46,73 +59,105 @@ public class JsonWebKey {
/**
* Key Identifier.
*/
+ @JsonProperty(value = "kid")
private String kid;
/**
- * Key type, usually RSA. Possible values include: 'EC', 'RSA', 'RSA-HSM',
- * 'oct'.
+ * JsonWebKey key type (kty). Possible values include: 'EC', 'EC-HSM', 'RSA',
+ * 'RSA-HSM', 'oct'.
*/
+ @JsonProperty(value = "kty")
private JsonWebKeyType kty;
/**
* The keyOps property.
*/
+ @JsonProperty(value = "key_ops")
private List keyOps;
/**
* RSA modulus.
*/
+ @JsonProperty(value = "n")
private byte[] n;
/**
* RSA public exponent.
*/
+ @JsonProperty(value = "e")
private byte[] e;
/**
- * RSA private exponent.
+ * RSA private exponent, or the D component of an EC private key.
*/
+ @JsonProperty(value = "d")
private byte[] d;
/**
* RSA Private Key Parameter.
*/
+ @JsonProperty(value = "dp")
private byte[] dp;
/**
* RSA Private Key Parameter.
*/
+ @JsonProperty(value = "dq")
private byte[] dq;
/**
* RSA Private Key Parameter.
*/
+ @JsonProperty(value = "qi")
private byte[] qi;
/**
* RSA secret prime.
*/
+ @JsonProperty(value = "p")
private byte[] p;
/**
- * RSA secret prime, with p < q.
+ * RSA secret prime, with p & q.
*/
+ @JsonProperty(value = "q")
private byte[] q;
/**
* Symmetric key.
*/
+ @JsonProperty(value = "k")
private byte[] k;
/**
* HSM Token, used with Bring Your Own Key.
*/
+ @JsonProperty(value = "key_hsm")
private byte[] t;
/**
- * Key Identifier.
+ * Elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible
+ * values include: 'P-256', 'P-384', 'P-521', 'SECP256K1'.
+ */
+ @JsonProperty(value = "crv")
+ private JsonWebKeyCurveName crv;
+
+ /**
+ * X component of an EC public key.
+ */
+ @JsonProperty(value = "x")
+ private byte[] x;
+
+ /**
+ * Y component of an EC public key.
+ */
+ @JsonProperty(value = "y")
+ private byte[] y;
+
+ /**
+ * Get the kid value.
*
- * @return the kid value.
+ * @return the kid value
*/
@JsonProperty("kid")
public String kid() {
@@ -122,7 +167,8 @@ public String kid() {
/**
* Set the key identifier value.
*
- * @param kid the key identifier
+ * @param kid
+ * the kid value to set
* @return the JsonWebKey object itself.
*/
public JsonWebKey withKid(String kid) {
@@ -131,10 +177,9 @@ public JsonWebKey withKid(String kid) {
}
/**
- * Key type, usually RSA. Possible values include: 'EC', 'RSA', 'RSA-HSM',
- * 'oct'.
+ * Get the kty value.
*
- * @return the key type.
+ * @return the kty value
*/
@JsonProperty("kty")
public JsonWebKeyType kty() {
@@ -144,7 +189,8 @@ public JsonWebKeyType kty() {
/**
* Set the key type value.
*
- * @param kty the key type
+ * @param kty
+ * the key type
* @return the JsonWebKey object itself.
*/
public JsonWebKey withKty(JsonWebKeyType kty) {
@@ -153,9 +199,9 @@ public JsonWebKey withKty(JsonWebKeyType kty) {
}
/**
- * Get the key operations.
+ * Get the keyOps value.
*
- * @return the key operations.
+ * @return the keyOps value
*/
@JsonProperty("key_ops")
public List keyOps() {
@@ -163,9 +209,10 @@ public List keyOps() {
}
/**
- * Set the key operations value.
+ * Set the keyOps value.
*
- * @param keyOps the key operations value to set
+ * @param keyOps
+ * the keyOps value to set
* @return the JsonWebKey object itself.
*/
public JsonWebKey withKeyOps(List keyOps) {
@@ -174,9 +221,9 @@ public JsonWebKey withKeyOps(List keyOps) {
}
/**
- * Get the RSA modulus value.
+ * Get the n value.
*
- * @return the RSA modulus value.
+ * @return the n value
*/
@JsonProperty("n")
@JsonSerialize(using = Base64UrlJsonSerializer.class)
@@ -186,9 +233,10 @@ public byte[] n() {
}
/**
- * Set the RSA modulus value.
+ * Set the n value.
*
- * @param n the RSA modulus value to set
+ * @param n
+ * the n value to set
* @return the JsonWebKey object itself.
*/
public JsonWebKey withN(byte[] n) {
@@ -197,8 +245,9 @@ public JsonWebKey withN(byte[] n) {
}
/**
- * Get the RSA public exponent value.
- * @return the RSA public exponent value.
+ * Get the e value.
+ *
+ * @return the e value
*/
@JsonProperty("e")
@JsonSerialize(using = Base64UrlJsonSerializer.class)
@@ -208,9 +257,10 @@ public byte[] e() {
}
/**
- * Set the RSA public exponent value.
- *
- * @param e RSA public exponent value to set
+ * Set the e value.
+ *
+ * @param e
+ * the e value to set
* @return the JsonWebKey object itself.
*/
public JsonWebKey withE(byte[] e) {
@@ -219,8 +269,9 @@ public JsonWebKey withE(byte[] e) {
}
/**
- * Get the RSA private exponent value.
- * @return the RSA private exponent value.
+ * Get the d value.
+ *
+ * @return the d value
*/
@JsonProperty("d")
@JsonSerialize(using = Base64UrlJsonSerializer.class)
@@ -230,9 +281,10 @@ public byte[] d() {
}
/**
- * Set RSA private exponent value.
- *
- * @param d the RSA private exponent value to set.
+ * Set the d value.
+ *
+ * @param d
+ * the d value to set
* @return the JsonWebKey object itself.
*/
public JsonWebKey withD(byte[] d) {
@@ -242,6 +294,7 @@ public JsonWebKey withD(byte[] d) {
/**
* Get the RSA Private Key Parameter value.
+ *
* @return the RSA Private Key Parameter value.
*/
@JsonProperty("dp")
@@ -253,7 +306,9 @@ public byte[] dp() {
/**
* Set RSA Private Key Parameter value.
- * @param dp the RSA Private Key Parameter value to set.
+ *
+ * @param dp
+ * the RSA Private Key Parameter value to set.
* @return the JsonWebKey object itself.
*/
public JsonWebKey withDp(byte[] dp) {
@@ -263,6 +318,7 @@ public JsonWebKey withDp(byte[] dp) {
/**
* Get the RSA Private Key Parameter value.
+ *
* @return the RSA Private Key Parameter value.
*/
@JsonProperty("dq")
@@ -274,7 +330,9 @@ public byte[] dq() {
/**
* Set RSA Private Key Parameter value .
- * @param dq the RSA Private Key Parameter value to set.
+ *
+ * @param dq
+ * the RSA Private Key Parameter value to set.
* @return the JsonWebKey object itself.
*/
public JsonWebKey withDq(byte[] dq) {
@@ -284,6 +342,7 @@ public JsonWebKey withDq(byte[] dq) {
/**
* Get the RSA Private Key Parameter value.
+ *
* @return the RSA Private Key Parameter value.
*/
@JsonProperty("qi")
@@ -295,7 +354,9 @@ public byte[] qi() {
/**
* Set RSA Private Key Parameter value.
- * @param qi the RSA Private Key Parameter value to set.
+ *
+ * @param qi
+ * the RSA Private Key Parameter value to set.
* @return the JsonWebKey object itself.
*/
public JsonWebKey withQi(byte[] qi) {
@@ -305,6 +366,7 @@ public JsonWebKey withQi(byte[] qi) {
/**
* Get the RSA secret prime value.
+ *
* @return the RSA secret prime value.
*/
@JsonProperty("p")
@@ -316,7 +378,9 @@ public byte[] p() {
/**
* Set the RSA secret prime value.
- * @param p the RSA secret prime value.
+ *
+ * @param p
+ * the RSA secret prime value.
* @return the JsonWebKey object itself.
*/
public JsonWebKey withP(byte[] p) {
@@ -326,6 +390,7 @@ public JsonWebKey withP(byte[] p) {
/**
* Get RSA secret prime, with p < q value.
+ *
* @return the RSA secret prime, with p < q value.
*/
@JsonProperty("q")
@@ -337,7 +402,9 @@ public byte[] q() {
/**
* Set the RSA secret prime, with p < q value.
- * @param q the the RSA secret prime, with p < q value to be set.
+ *
+ * @param q
+ * the the RSA secret prime, with p < q value to be set.
* @return the JsonWebKey object itself.
*/
public JsonWebKey withQ(byte[] q) {
@@ -347,6 +414,7 @@ public JsonWebKey withQ(byte[] q) {
/**
* Get Symmetric key value.
+ *
* @return the symmetric key value.
*/
@JsonProperty("k")
@@ -358,7 +426,9 @@ public byte[] k() {
/**
* Set the Symmetric key value.
- * @param k the symmetric key value to set.
+ *
+ * @param k
+ * the symmetric key value to set.
* @return the JsonWebKey object itself.
*/
public JsonWebKey withK(byte[] k) {
@@ -368,6 +438,7 @@ public JsonWebKey withK(byte[] k) {
/**
* Get HSM Token value, used with Bring Your Own Key.
+ *
* @return HSM Token, used with Bring Your Own Key.
*/
@JsonProperty("key_hsm")
@@ -379,7 +450,9 @@ public byte[] t() {
/**
* Set HSM Token value, used with Bring Your Own Key.
- * @param t HSM Token value to set, used with Bring Your Own Key
+ *
+ * @param t
+ * HSM Token value to set, used with Bring Your Own Key
* @return the JsonWebKey object itself.
*/
public JsonWebKey withT(byte[] t) {
@@ -401,6 +474,76 @@ public String toString() {
}
}
+ /**
+ * Get the crv value.
+ *
+ * @return the crv value
+ */
+ @JsonProperty("crv")
+ public JsonWebKeyCurveName crv() {
+ return this.crv;
+ }
+
+ /**
+ * Set the crv value.
+ *
+ * @param crv
+ * the crv value to set
+ * @return the JsonWebKey object itself.
+ */
+ public JsonWebKey withCrv(JsonWebKeyCurveName crv) {
+ this.crv = crv;
+ return this;
+ }
+
+ /**
+ * Get the x value.
+ *
+ * @return the x value
+ */
+ @JsonProperty("x")
+ @JsonSerialize(using = Base64UrlJsonSerializer.class)
+ @JsonDeserialize(using = Base64UrlJsonDeserializer.class)
+ public byte[] x() {
+ return this.x;
+ }
+
+ /**
+ * Set the x value.
+ *
+ * @param x
+ * the x value to set
+ * @return the JsonWebKey object itself.
+ */
+ public JsonWebKey withX(byte[] x) {
+ this.x = x;
+ return this;
+ }
+
+ /**
+ * Get the y value.
+ *
+ * @return the y value
+ */
+ @JsonProperty("y")
+ @JsonSerialize(using = Base64UrlJsonSerializer.class)
+ @JsonDeserialize(using = Base64UrlJsonDeserializer.class)
+ public byte[] y() {
+ return this.y;
+ }
+
+ /**
+ * Set the y value.
+ *
+ * @param y
+ * the y value to set
+ * @return the JsonWebKey object itself.
+ */
+ public JsonWebKey withY(byte[] y) {
+ this.y = y;
+ return this;
+ }
+
/**
* Get the RSA public key spec value.
*
@@ -425,14 +568,16 @@ private RSAPrivateKeySpec getRSAPrivateKeySpec() {
/**
* Get the RSA public key value.
*
- * @param provider the Java security provider.
+ * @param provider
+ * the Java security provider.
* @return the RSA public key value
*/
private PublicKey getRSAPublicKey(Provider provider) {
try {
RSAPublicKeySpec publicKeySpec = getRSAPublicKeySpec();
- KeyFactory factory = provider != null ? KeyFactory.getInstance("RSA", provider) : KeyFactory.getInstance("RSA");
+ KeyFactory factory = provider != null ? KeyFactory.getInstance("RSA", provider)
+ : KeyFactory.getInstance("RSA");
return factory.generatePublic(publicKeySpec);
} catch (GeneralSecurityException e) {
@@ -443,14 +588,16 @@ private PublicKey getRSAPublicKey(Provider provider) {
/**
* Get the RSA private key value.
*
- * @param provider the Java security provider.
+ * @param provider
+ * the Java security provider.
* @return the RSA private key value
*/
private PrivateKey getRSAPrivateKey(Provider provider) {
try {
RSAPrivateKeySpec privateKeySpec = getRSAPrivateKeySpec();
- KeyFactory factory = provider != null ? KeyFactory.getInstance("RSA", provider) : KeyFactory.getInstance("RSA");
+ KeyFactory factory = provider != null ? KeyFactory.getInstance("RSA", provider)
+ : KeyFactory.getInstance("RSA");
return factory.generatePrivate(privateKeySpec);
} catch (GeneralSecurityException e) {
@@ -458,6 +605,29 @@ private PrivateKey getRSAPrivateKey(Provider provider) {
}
}
+ private static PublicKey getECPublicKey(ECPoint ecPoint, ECParameterSpec curveSpec, Provider provider) {
+ // Create public key spec with given point
+ try {
+ ECPublicKeySpec pubSpec = new ECPublicKeySpec(ecPoint, curveSpec);
+ KeyFactory kf = provider != null ? KeyFactory.getInstance("EC", provider)
+ : KeyFactory.getInstance("EC", "SunEC");
+ return (ECPublicKey) kf.generatePublic(pubSpec);
+ } catch (GeneralSecurityException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ private static PrivateKey getECPrivateKey(byte[] d, ECParameterSpec curveSpec, Provider provider) {
+ try {
+ ECPrivateKeySpec priSpec = new ECPrivateKeySpec(new BigInteger(1, d), curveSpec);
+ KeyFactory kf = provider != null ? KeyFactory.getInstance("EC", provider)
+ : KeyFactory.getInstance("EC", "SunEC");
+ return (ECPrivateKey) kf.generatePrivate(priSpec);
+ } catch (GeneralSecurityException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
/**
* Verifies if the key is an RSA key.
*/
@@ -491,7 +661,9 @@ private static BigInteger toBigInteger(byte[] b) {
/**
* Converts RSA key pair to JSON web key.
- * @param keyPair RSA key pair
+ *
+ * @param keyPair
+ * RSA key pair
* @return the JSON web key, converted from RSA key pair.
*/
public static JsonWebKey fromRSA(KeyPair keyPair) {
@@ -501,30 +673,19 @@ public static JsonWebKey fromRSA(KeyPair keyPair) {
if (privateKey != null) {
- key = new JsonWebKey()
- .withKty(JsonWebKeyType.RSA)
- .withN(toByteArray(privateKey.getModulus()))
+ key = new JsonWebKey().withKty(JsonWebKeyType.RSA).withN(toByteArray(privateKey.getModulus()))
.withE(toByteArray(privateKey.getPublicExponent()))
- .withD(toByteArray(privateKey.getPrivateExponent()))
- .withP(toByteArray(privateKey.getPrimeP()))
- .withQ(toByteArray(privateKey.getPrimeQ()))
- .withDp(toByteArray(privateKey.getPrimeExponentP()))
+ .withD(toByteArray(privateKey.getPrivateExponent())).withP(toByteArray(privateKey.getPrimeP()))
+ .withQ(toByteArray(privateKey.getPrimeQ())).withDp(toByteArray(privateKey.getPrimeExponentP()))
.withDq(toByteArray(privateKey.getPrimeExponentQ()))
.withQi(toByteArray(privateKey.getCrtCoefficient()));
} else {
RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
- key = new JsonWebKey()
- .withKty(JsonWebKeyType.RSA)
- .withN(toByteArray(publicKey.getModulus()))
- .withE(toByteArray(publicKey.getPublicExponent()))
- .withD(null)
- .withP(null)
- .withQ(null)
- .withDp(null)
- .withDq(null)
- .withQi(null);
+ key = new JsonWebKey().withKty(JsonWebKeyType.RSA).withN(toByteArray(publicKey.getModulus()))
+ .withE(toByteArray(publicKey.getPublicExponent())).withD(null).withP(null).withQ(null).withDp(null)
+ .withDq(null).withQi(null);
}
return key;
@@ -532,6 +693,7 @@ public static JsonWebKey fromRSA(KeyPair keyPair) {
/**
* Converts JSON web key to RSA key pair.
+ *
* @return RSA key pair
*/
public KeyPair toRSA() {
@@ -539,18 +701,27 @@ public KeyPair toRSA() {
}
/**
- * Converts JSON web key to RSA key pair and include the private key if set to true.
- * @param includePrivateParameters true if the RSA key pair should include the private key. False otherwise.
+ * Converts JSON web key to RSA key pair and include the private key if set to
+ * true.
+ *
+ * @param includePrivateParameters
+ * true if the RSA key pair should include the private key. False
+ * otherwise.
* @return RSA key pair
*/
public KeyPair toRSA(boolean includePrivateParameters) {
return toRSA(includePrivateParameters, null);
}
-
+
/**
- * Converts JSON web key to RSA key pair and include the private key if set to true.
- * @param provider the Java security provider.
- * @param includePrivateParameters true if the RSA key pair should include the private key. False otherwise.
+ * Converts JSON web key to RSA key pair and include the private key if set to
+ * true.
+ *
+ * @param provider
+ * the Java security provider.
+ * @param includePrivateParameters
+ * true if the RSA key pair should include the private key. False
+ * otherwise.
* @return RSA key pair
*/
public KeyPair toRSA(boolean includePrivateParameters, Provider provider) {
@@ -565,34 +736,169 @@ public KeyPair toRSA(boolean includePrivateParameters, Provider provider) {
}
}
+ /**
+ * Converts JSON web key to EC key pair and include the private key if set to
+ * true.
+ *
+ * @return EC key pair
+ */
+ public KeyPair toEC() {
+ return toEC(false, null);
+ }
+
+ /**
+ * Converts JSON web key to EC key pair and include the private key if set to
+ * true.
+ *
+ * @param includePrivateParameters
+ * true if the EC key pair should include the private key. False
+ * otherwise.
+ * @return EC key pair
+ */
+ public KeyPair toEC(boolean includePrivateParameters) {
+ return toEC(includePrivateParameters, null);
+ }
+
+ /**
+ * Converts JSON web key to EC key pair and include the private key if set to
+ * true.
+ *
+ * @param includePrivateParameters
+ * true if the EC key pair should include the private key. False
+ * otherwise.
+ * @param provider
+ * Java security provider
+ * @return EC key pair
+ */
+ public KeyPair toEC(boolean includePrivateParameters, Provider provider) {
+
+ if (provider == null) {
+ // Our default provider for this class
+ provider = Security.getProvider("SunEC");
+ }
+
+ if (!JsonWebKeyType.EC.equals(kty) && !JsonWebKeyType.EC_HSM.equals(kty)) {
+ throw new IllegalArgumentException("Not an EC key.");
+ }
+
+ try {
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC", provider);
+
+ ECGenParameterSpec gps = new ECGenParameterSpec(CURVE_TO_SPEC_NAME.get(crv));
+ kpg.initialize(gps);
+
+ // Generate dummy keypair to get parameter spec.
+ KeyPair apair = kpg.generateKeyPair();
+ ECPublicKey apub = (ECPublicKey) apair.getPublic();
+ ECParameterSpec aspec = apub.getParams();
+
+ ECPoint ecPoint = new ECPoint(new BigInteger(1, x), new BigInteger(1, y));
+
+ KeyPair realKeyPair;
+
+ if (includePrivateParameters) {
+ realKeyPair = new KeyPair(getECPublicKey(ecPoint, aspec, provider),
+ getECPrivateKey(d, aspec, provider));
+ } else {
+ realKeyPair = new KeyPair(getECPublicKey(ecPoint, aspec, provider), null);
+ }
+
+ return realKeyPair;
+ } catch (GeneralSecurityException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+ /**
+ * Converts EC key pair to JSON web key.
+ *
+ * @param keyPair
+ * EC key pair
+ * @param provider
+ * Java security provider
+ * @return the JSON web key, converted from EC key pair.
+ */
+ public static JsonWebKey fromEC(KeyPair keyPair, Provider provider) {
+
+ ECPublicKey apub = (ECPublicKey) keyPair.getPublic();
+ ECPoint point = apub.getW();
+ ECPrivateKey apriv = (ECPrivateKey) keyPair.getPrivate();
+
+ if (apriv != null) {
+ return new JsonWebKey().withKty(JsonWebKeyType.EC).withCrv(getCurveFromKeyPair(keyPair, provider))
+ .withX(point.getAffineX().toByteArray()).withY(point.getAffineY().toByteArray())
+ .withD(apriv.getS().toByteArray()).withKty(JsonWebKeyType.EC);
+ } else {
+ return new JsonWebKey().withKty(JsonWebKeyType.EC).withCrv(getCurveFromKeyPair(keyPair, provider))
+ .withX(point.getAffineX().toByteArray()).withY(point.getAffineY().toByteArray())
+ .withKty(JsonWebKeyType.EC);
+ }
+ }
+
+ // Matches the curve of the keyPair to supported curves.
+ private static JsonWebKeyCurveName getCurveFromKeyPair(KeyPair keyPair, Provider provider) {
+
+ try {
+ ECPublicKey key = (ECPublicKey) keyPair.getPublic();
+ ECParameterSpec spec = key.getParams();
+ EllipticCurve crv = spec.getCurve();
+
+ List curveList = Arrays.asList(JsonWebKeyCurveName.P_256, JsonWebKeyCurveName.P_384,
+ JsonWebKeyCurveName.P_521, JsonWebKeyCurveName.P_256K);
+
+ for (JsonWebKeyCurveName curve : curveList) {
+ ECGenParameterSpec gps = new ECGenParameterSpec(CURVE_TO_SPEC_NAME.get(curve));
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC", provider);
+ kpg.initialize(gps);
+
+ // Generate dummy keypair to get parameter spec.
+ KeyPair apair = kpg.generateKeyPair();
+ ECPublicKey apub = (ECPublicKey) apair.getPublic();
+ ECParameterSpec aspec = apub.getParams();
+ EllipticCurve acurve = aspec.getCurve();
+
+ // Matches the parameter spec
+ if (acurve.equals(crv)) {
+ return curve;
+ }
+ }
+
+ // Did not find a supported curve.
+ throw new NoSuchAlgorithmException("Curve not supported.");
+ } catch (GeneralSecurityException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
/**
* Converts AES key to JSON web key.
- * @param secretKey AES key
+ *
+ * @param secretKey
+ * AES key
* @return the JSON web key, converted from AES key.
*/
public static JsonWebKey fromAes(SecretKey secretKey) {
if (secretKey == null) {
return null;
}
-
- return new JsonWebKey()
- .withK(secretKey.getEncoded())
- .withKty(JsonWebKeyType.OCT);
+
+ return new JsonWebKey().withK(secretKey.getEncoded()).withKty(JsonWebKeyType.OCT);
}
-
+
/**
* Converts JSON web key to AES key.
+ *
* @return AES key
*/
public SecretKey toAes() {
if (k == null) {
return null;
}
-
+
SecretKey secretKey = new SecretKeySpec(k, "AES");
return secretKey;
}
-
+
@Override
public boolean equals(Object obj) {
if (obj == this) {
@@ -603,33 +909,40 @@ public boolean equals(Object obj) {
}
return super.equals(obj);
}
-
+
/**
* Indicates whether some other {@link JsonWebKey} is "equal to" this one.
- * @param jwk the other {@link JsonWebKey} to compare with.
- * @return true if this {@link JsonWebKey} is the same as the jwk argument; false otherwise.
+ *
+ * @param jwk
+ * the other {@link JsonWebKey} to compare with.
+ * @return true if this {@link JsonWebKey} is the same as the jwk argument;
+ * false otherwise.
*/
public boolean equals(JsonWebKey jwk) {
if (jwk == null) {
return false;
}
-
+
if (!Objects.equal(kid, jwk.kid)) {
return false;
}
-
+
if (!Objects.equal(kty, jwk.kty)) {
return false;
}
-
+
if (!Objects.equal(keyOps, jwk.keyOps)) {
return false;
}
-
+
+ if (!Objects.equal(crv, jwk.crv)) {
+ return false;
+ }
+
if (!Arrays.equals(k, jwk.k)) {
return false;
}
-
+
// Public parameters
if (!Arrays.equals(n, jwk.n)) {
return false;
@@ -657,34 +970,46 @@ public boolean equals(JsonWebKey jwk) {
if (!Arrays.equals(q, jwk.q)) {
return false;
}
-
+ if (!Arrays.equals(x, jwk.x)) {
+ return false;
+ }
+ if (!Arrays.equals(y, jwk.y)) {
+ return false;
+ }
+
// HSM token
if (!Arrays.equals(t, jwk.t)) {
return false;
}
-
+
return true;
}
/**
* Verifies whether the {@link JsonWebKey} has private key.
+ *
* @return true if the {@link JsonWebKey} has private key; false otherwise.
*/
public boolean hasPrivateKey() {
-
+
if (JsonWebKeyType.OCT.equals(kty)) {
return k != null;
}
-
+
else if (JsonWebKeyType.RSA.equals(kty) || JsonWebKeyType.RSA_HSM.equals(kty)) {
return (d != null && dp != null && dq != null && qi != null && p != null && q != null);
}
-
+
+ else if (JsonWebKeyType.EC.equals(kty) || JsonWebKeyType.EC_HSM.equals(kty)) {
+ return (d != null);
+ }
+
return false;
}
/**
* Verifies whether the {@link JsonWebKey} is valid.
+ *
* @return true if the {@link JsonWebKey} is valid; false otherwise.
*/
@JsonIgnore
@@ -692,7 +1017,7 @@ public boolean isValid() {
if (kty == null) {
return false;
}
-
+
if (keyOps != null) {
final Set set = new HashSet(JsonWebKeyOperation.ALL_OPERATIONS);
for (int i = 0; i < keyOps.size(); i++) {
@@ -701,18 +1026,27 @@ public boolean isValid() {
}
}
}
-
+
if (JsonWebKeyType.OCT.equals(kty)) {
return isValidOctet();
}
-
+
else if (JsonWebKeyType.RSA.equals(kty)) {
return isValidRsa();
}
-
+
else if (JsonWebKeyType.RSA_HSM.equals(kty)) {
return isValidRsaHsm();
}
+
+ else if (JsonWebKeyType.EC.equals(kty)) {
+ return isValidEc();
+ }
+
+ else if (JsonWebKeyType.EC_HSM.equals(kty)) {
+ return isValidEcHsm();
+ }
+
return false;
}
@@ -727,11 +1061,10 @@ private boolean isValidRsa() {
if (n == null || e == null) {
return false;
}
-
- return hasPrivateKey()
- || (d == null && dp == null && dq == null && qi == null && p == null && q == null);
+
+ return hasPrivateKey() || (d == null && dp == null && dq == null && qi == null && p == null && q == null);
}
-
+
private boolean isValidRsaHsm() {
// MAY have public key parameters
if ((n == null && e != null) || (n != null && e == null)) {
@@ -742,9 +1075,9 @@ private boolean isValidRsaHsm() {
if (hasPrivateKey()) {
return false;
}
-
+
// MUST have ( T || ( N && E ) )
- boolean tokenParameters = t != null;
+ boolean tokenParameters = t != null;
boolean publicParameters = (n != null && e != null);
if (tokenParameters && publicParameters) {
@@ -753,21 +1086,67 @@ private boolean isValidRsaHsm() {
return (tokenParameters || publicParameters);
}
-
+
+ private boolean isValidEc() {
+ boolean ecPointParameters = (x != null && y != null);
+ if (!ecPointParameters || crv == null) {
+ return false;
+ }
+
+ return hasPrivateKey() || (d == null);
+ }
+
+ private boolean isValidEcHsm() {
+ // MAY have public key parameters
+ boolean ecPointParameters = (x != null && y != null);
+ if ((ecPointParameters && crv == null) || (!ecPointParameters && crv != null)) {
+ return false;
+ }
+
+ // no private key
+ if (hasPrivateKey()) {
+ return false;
+ }
+
+ // MUST have (T || (ecPointParameters && crv))
+ boolean publicParameters = (ecPointParameters && crv != null);
+ boolean tokenParameters = t != null;
+
+ if (tokenParameters && publicParameters) {
+ return false;
+ }
+
+ return (tokenParameters || publicParameters);
+ }
+
/**
* Clear key materials.
*/
public void clearMemory() {
- zeroArray(k); k = null;
- zeroArray(n); n = null;
- zeroArray(e); e = null;
- zeroArray(d); d = null;
- zeroArray(dp); dp = null;
- zeroArray(dq); dq = null;
- zeroArray(qi); qi = null;
- zeroArray(p); p = null;
- zeroArray(q); q = null;
- zeroArray(t); t = null;
+ zeroArray(k);
+ k = null;
+ zeroArray(n);
+ n = null;
+ zeroArray(e);
+ e = null;
+ zeroArray(d);
+ d = null;
+ zeroArray(dp);
+ dp = null;
+ zeroArray(dq);
+ dq = null;
+ zeroArray(qi);
+ qi = null;
+ zeroArray(p);
+ p = null;
+ zeroArray(q);
+ q = null;
+ zeroArray(t);
+ t = null;
+ zeroArray(x);
+ x = null;
+ zeroArray(y);
+ y = null;
}
private static void zeroArray(byte[] bytes) {
@@ -782,32 +1161,43 @@ public int hashCode() {
if (kid != null) {
hashCode += kid.hashCode();
}
-
+
if (JsonWebKeyType.OCT.equals(kty)) {
hashCode += hashCode(k);
}
-
+
else if (JsonWebKeyType.RSA.equals(kty)) {
hashCode += hashCode(n);
}
-
- else if (JsonWebKeyType.RSA_HSM.equals(kty)) {
+
+ else if (JsonWebKeyType.EC.equals(kty)) {
+ hashCode += hashCode(x);
+ hashCode += hashCode(y);
+ hashCode += crv.hashCode();
+ }
+
+ else if (JsonWebKeyType.RSA_HSM.equals(kty) || JsonWebKeyType.EC_HSM.equals(kty)) {
hashCode += hashCode(t);
}
-
+
return hashCode;
}
-
+
private static int hashCode(byte[] obj) {
int hashCode = 0;
-
+
if (obj == null || obj.length == 0) {
return 0;
}
-
+
for (int i = 0; i < obj.length; i++) {
hashCode = (hashCode << 3) | (hashCode >> 29) ^ obj[i];
}
return hashCode;
}
+
+ private static final Map CURVE_TO_SPEC_NAME = ImmutableMap
+ .builder().put(JsonWebKeyCurveName.P_256, "secp256r1")
+ .put(JsonWebKeyCurveName.P_384, "secp384r1").put(JsonWebKeyCurveName.P_521, "secp521r1")
+ .put(JsonWebKeyCurveName.P_256K, "secp256k1").build();
}
\ No newline at end of file
diff --git a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyCurveName.java b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyCurveName.java
new file mode 100644
index 0000000..b12aa57
--- /dev/null
+++ b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyCurveName.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.keyvault.webkey;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for JsonWebKeyCurveName.
+ */
+public final class JsonWebKeyCurveName {
+ /** Static value P-256 for JsonWebKeyCurveName. */
+ public static final JsonWebKeyCurveName P_256 = new JsonWebKeyCurveName("P-256");
+
+ /** Static value P-384 for JsonWebKeyCurveName. */
+ public static final JsonWebKeyCurveName P_384 = new JsonWebKeyCurveName("P-384");
+
+ /** Static value P-521 for JsonWebKeyCurveName. */
+ public static final JsonWebKeyCurveName P_521 = new JsonWebKeyCurveName("P-521");
+
+ /** Static value SECP256K1 for JsonWebKeyCurveName. */
+ public static final JsonWebKeyCurveName P_256K = new JsonWebKeyCurveName("P-256K");
+
+ private String value;
+
+ /**
+ * Creates a custom value for JsonWebKeyCurveName.
+ * @param value the custom value
+ */
+ public JsonWebKeyCurveName(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return value;
+ }
+
+ @Override
+ public int hashCode() {
+ return value.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof JsonWebKeyCurveName)) {
+ return false;
+ }
+ if (obj == this) {
+ return true;
+ }
+ JsonWebKeyCurveName rhs = (JsonWebKeyCurveName) obj;
+ if (value == null) {
+ return rhs.value == null;
+ } else {
+ return value.equals(rhs.value);
+ }
+ }
+}
diff --git a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyEncryptionAlgorithm.java b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyEncryptionAlgorithm.java
index 67e5e99..6631fb4 100644
--- a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyEncryptionAlgorithm.java
+++ b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyEncryptionAlgorithm.java
@@ -16,9 +16,13 @@
* Defines values for JsonWebKeyEncryptionAlgorithm.
*/
public final class JsonWebKeyEncryptionAlgorithm {
+
/** Static value RSA-OAEP for JsonWebKeyEncryptionAlgorithm. */
public static final JsonWebKeyEncryptionAlgorithm RSA_OAEP = new JsonWebKeyEncryptionAlgorithm("RSA-OAEP");
+ /** Static value RSA-OAEP-256 for JsonWebKeyEncryptionAlgorithm. */
+ public static final JsonWebKeyEncryptionAlgorithm RSA_OAEP_256 = new JsonWebKeyEncryptionAlgorithm("RSA-OAEP-256");
+
/** Static value RSA1_5 for JsonWebKeyEncryptionAlgorithm. */
public static final JsonWebKeyEncryptionAlgorithm RSA1_5 = new JsonWebKeyEncryptionAlgorithm("RSA1_5");
@@ -26,7 +30,9 @@ public final class JsonWebKeyEncryptionAlgorithm {
/**
* Creates a custom value for JsonWebKeyEncryptionAlgorithm.
- * @param value the custom value
+ *
+ * @param value
+ * the custom value
*/
public JsonWebKeyEncryptionAlgorithm(String value) {
this.value = value;
@@ -58,10 +64,10 @@ public boolean equals(Object obj) {
return value.equals(rhs.value);
}
}
-
+
/**
* All the JWK encryption algorithms.
*/
- public static final List ALL_ALGORITHMS =
- Collections.unmodifiableList(Arrays.asList(RSA_OAEP, RSA1_5));
+ public static final List ALL_ALGORITHMS = Collections
+ .unmodifiableList(Arrays.asList(RSA_OAEP, RSA1_5, RSA_OAEP_256));
}
diff --git a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeySignatureAlgorithm.java b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeySignatureAlgorithm.java
index 5e532c1..7075d00 100644
--- a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeySignatureAlgorithm.java
+++ b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeySignatureAlgorithm.java
@@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
- */
+ **/
package com.microsoft.azure.keyvault.webkey;
@@ -16,6 +16,16 @@
* Defines values for JsonWebKeySignatureAlgorithm.
*/
public final class JsonWebKeySignatureAlgorithm {
+
+ /** Static value PS256 for JsonWebKeySignatureAlgorithm. */
+ public static final JsonWebKeySignatureAlgorithm PS256 = new JsonWebKeySignatureAlgorithm("PS256");
+
+ /** Static value PS384 for JsonWebKeySignatureAlgorithm. */
+ public static final JsonWebKeySignatureAlgorithm PS384 = new JsonWebKeySignatureAlgorithm("PS384");
+
+ /** Static value PS512 for JsonWebKeySignatureAlgorithm. */
+ public static final JsonWebKeySignatureAlgorithm PS512 = new JsonWebKeySignatureAlgorithm("PS512");
+
/** Static value RS256 for JsonWebKeySignatureAlgorithm. */
public static final JsonWebKeySignatureAlgorithm RS256 = new JsonWebKeySignatureAlgorithm("RS256");
@@ -27,12 +37,22 @@ public final class JsonWebKeySignatureAlgorithm {
/** Static value RSNULL for JsonWebKeySignatureAlgorithm. */
public static final JsonWebKeySignatureAlgorithm RSNULL = new JsonWebKeySignatureAlgorithm("RSNULL");
+ /** Static value ES256 for JsonWebKeySignatureAlgorithm. */
+ public static final JsonWebKeySignatureAlgorithm ES256 = new JsonWebKeySignatureAlgorithm("ES256");
+ /** Static value ES384 for JsonWebKeySignatureAlgorithm. */
+ public static final JsonWebKeySignatureAlgorithm ES384 = new JsonWebKeySignatureAlgorithm("ES384");
+ /** Static value ES512 for JsonWebKeySignatureAlgorithm. */
+ public static final JsonWebKeySignatureAlgorithm ES512 = new JsonWebKeySignatureAlgorithm("ES512");
+ /** Static value ECDSA256 for JsonWebKeySignatureAlgorithm. */
+ public static final JsonWebKeySignatureAlgorithm ES256K = new JsonWebKeySignatureAlgorithm("ES256K");
private String value;
/**
* Creates a custom value for JsonWebKeySignatureAlgorithm.
- * @param value the custom value
+ *
+ * @param value
+ * the custom value
*/
public JsonWebKeySignatureAlgorithm(String value) {
this.value = value;
@@ -64,10 +84,10 @@ public boolean equals(Object obj) {
return value.equals(rhs.value);
}
}
-
+
/**
* All the JWK signature algorithms.
*/
- public static final List ALL_ALGORITHMS =
- Collections.unmodifiableList(Arrays.asList(RS256, RS384, RS512, RSNULL));
+ public static final List ALL_ALGORITHMS = Collections.unmodifiableList(
+ Arrays.asList(RS256, RS384, RS512, RSNULL, PS256, PS384, PS512, ES256, ES384, ES512, ES256K));
}
diff --git a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyType.java b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyType.java
index 8a7c9db..dc5a735 100644
--- a/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyType.java
+++ b/azure-keyvault-webkey/src/main/java/com/microsoft/azure/keyvault/webkey/JsonWebKeyType.java
@@ -18,6 +18,8 @@
public final class JsonWebKeyType {
/** Static value EC for JsonWebKeyType. */
public static final JsonWebKeyType EC = new JsonWebKeyType("EC");
+ /** Static value EC-HSM for JsonWebKeyType. */
+ public static final JsonWebKeyType EC_HSM = new JsonWebKeyType("EC-HSM");
/** Static value RSA for JsonWebKeyType. */
public static final JsonWebKeyType RSA = new JsonWebKeyType("RSA");
@@ -69,5 +71,5 @@ public boolean equals(Object obj) {
* All the JWK key types.
*/
public static final List ALL_TYPES =
- Collections.unmodifiableList(Arrays.asList(EC, RSA, RSA_HSM, OCT));
+ Collections.unmodifiableList(Arrays.asList(EC, RSA, RSA_HSM, OCT, EC_HSM));
}
diff --git a/azure-keyvault-webkey/src/test/java/com/microsoft/azure/keyvault/webkey/test/EcHsmValidationTests.java b/azure-keyvault-webkey/src/test/java/com/microsoft/azure/keyvault/webkey/test/EcHsmValidationTests.java
new file mode 100644
index 0000000..0175b21
--- /dev/null
+++ b/azure-keyvault-webkey/src/test/java/com/microsoft/azure/keyvault/webkey/test/EcHsmValidationTests.java
@@ -0,0 +1,47 @@
+package com.microsoft.azure.keyvault.webkey.test;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.microsoft.azure.keyvault.webkey.JsonWebKeyCurveName;
+import com.microsoft.azure.keyvault.webkey.JsonWebKey;
+
+
+public class EcHsmValidationTests {
+
+ String keyWithoutT = "{\"kid\":\"key_id\",\"kty\":\"EC-HSM\",\"key_ops\":null,\"n\":null,\"e\":null,\"d\":null,\"dp\":null,\"dq\":null,\"qi\":null,\"p\":null,\"q\":null,\"k\":null,\"key_hsm\":null,\"crv\":\"P-256\",\"x\":\"KyjF795jLyVIgswKSQInEGYHNBKSKyPgNojEgYlldMI\",\"y\":\"AIl_ca1ZIKbJ5YGdgGr_7HySldI2aWeBaOImZEYIMpVe\"}";
+ String keyWithT = "{\"kid\":\"key_id\",\"kty\":\"EC-HSM\",\"key_ops\":null,\"key_hsm\":\"T-TOKEN\"}";
+
+ @Test
+ public void ecHsmValidation() throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ JsonWebKey keyNoT = mapper.readValue(keyWithoutT, JsonWebKey.class);
+ JsonWebKey keyT = mapper.readValue(keyWithT, JsonWebKey.class);
+
+ Assert.assertTrue(keyNoT.isValid());
+ Assert.assertFalse(keyNoT.hasPrivateKey());
+
+ Assert.assertTrue(keyT.isValid());
+ Assert.assertFalse(keyT.hasPrivateKey());
+ }
+
+ @Test
+ public void ecHsmHashCode() throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ JsonWebKey keyNoT = mapper.readValue(keyWithoutT, JsonWebKey.class);
+ JsonWebKey keyT = mapper.readValue(keyWithT, JsonWebKey.class);
+
+ Assert.assertNotEquals(keyT.hashCode(), keyNoT.hashCode());
+
+ // Compare hash codes for unequal JWK that would not map to the same hash
+ Assert.assertNotEquals(keyT.hashCode(), new JsonWebKey().withKid(keyT.kid()).withT(keyT.t()).hashCode());
+ Assert.assertNotEquals(keyT.hashCode(), new JsonWebKey().withKid(keyT.kid()).withKty(keyT.kty()).hashCode());
+ Assert.assertNotEquals(keyNoT.hashCode(), new JsonWebKey().hashCode());
+
+ // Compare hash codes for unequal JWK that would map to the same hash
+ Assert.assertEquals(keyT.hashCode(),
+ new JsonWebKey().withKid(keyT.kid()).withKty(keyT.kty()).withT(keyT.t()).hashCode());
+ Assert.assertEquals(keyNoT.hashCode(), new JsonWebKey().withKid(keyT.kid()).hashCode());
+ }
+}
diff --git a/azure-keyvault-webkey/src/test/java/com/microsoft/azure/keyvault/webkey/test/EcValidationTests.java b/azure-keyvault-webkey/src/test/java/com/microsoft/azure/keyvault/webkey/test/EcValidationTests.java
new file mode 100644
index 0000000..a2f341d
--- /dev/null
+++ b/azure-keyvault-webkey/src/test/java/com/microsoft/azure/keyvault/webkey/test/EcValidationTests.java
@@ -0,0 +1,115 @@
+package com.microsoft.azure.keyvault.webkey.test;
+
+import java.security.InvalidKeyException;
+import java.security.KeyPair;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.Security;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.util.Map;
+import java.util.Random;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.collect.ImmutableMap;
+import com.microsoft.azure.keyvault.webkey.JsonWebKey;
+import com.microsoft.azure.keyvault.webkey.JsonWebKeyCurveName;
+
+
+public class EcValidationTests {
+
+ @Test
+ public void ecPublicKeyValidation() throws Exception {
+
+ for (String keyStr : keys.values()) {
+ ObjectMapper mapper = new ObjectMapper();
+ JsonWebKey key = mapper.readValue(keyStr, JsonWebKey.class);
+ Assert.assertTrue(key.hasPrivateKey());
+ Assert.assertTrue(key.isValid());
+
+ KeyPair keyPair = key.toEC();
+ validateEcKey(keyPair, key);
+ Assert.assertNull(keyPair.getPrivate());
+
+ // Compare equal JSON web keys
+ JsonWebKey sameKey = mapper.readValue(keyStr, JsonWebKey.class);
+ Assert.assertEquals(key, key);
+ Assert.assertEquals(key, sameKey);
+ Assert.assertEquals(key.hashCode(), sameKey.hashCode());
+ }
+ }
+
+ @Test
+ public void ecPrivateKeyValidation() throws Exception {
+ for (String keyStr : keys.values()) {
+ ObjectMapper mapper = new ObjectMapper();
+ JsonWebKey key = mapper.readValue(keyStr, JsonWebKey.class);
+ KeyPair keyPairWithPrivate = key.toEC(true);
+ validateEcKey(keyPairWithPrivate, key);
+ signVerify(keyPairWithPrivate.getPublic(), keyPairWithPrivate.getPrivate(), key.crv());
+ }
+ }
+
+ private static void validateEcKey(KeyPair keyPair, JsonWebKey key) throws Exception {
+ JsonWebKey jsonWebKey = JsonWebKey.fromEC(keyPair, Security.getProvider("SunEC"));
+ boolean includePrivateKey = keyPair.getPrivate() != null;
+ KeyPair keyPair2 = jsonWebKey.toEC(includePrivateKey);
+
+ Assert.assertTrue(includePrivateKey == jsonWebKey.hasPrivateKey());
+
+ PublicKey publicKey = keyPair2.getPublic();
+ PrivateKey privateKey = keyPair2.getPrivate();
+
+ if(includePrivateKey) {
+
+ // set the missing properties to compare the keys
+ jsonWebKey.withKid(new String(key.kid()));
+ Assert.assertNotNull(privateKey);
+ Assert.assertEquals(jsonWebKey, key);
+ Assert.assertEquals(key.hashCode(), jsonWebKey.hashCode());
+ signVerify(publicKey, privateKey, jsonWebKey.crv());
+ }
+ }
+
+ private static void signVerify(PublicKey publicKey, PrivateKey privateKey, JsonWebKeyCurveName curve) throws InvalidKeyException, NoSuchAlgorithmException, SignatureException {
+ Signature signature = Signature.getInstance(CURVE_TO_SIGNATURE.get(curve), Security.getProvider("SunEC"));
+ signature.initSign(privateKey);
+ MessageDigest digest = MessageDigest.getInstance(algorithm.get(curve));
+ byte[] plaintext = new byte[10];
+ new Random().nextBytes(plaintext);
+ byte[] hash = digest.digest(plaintext);
+ signature.update(hash);
+ byte[] signed_hash = signature.sign();
+
+ signature.initVerify(publicKey);
+ signature.update(hash);
+ Assert.assertTrue(signature.verify(signed_hash));
+
+ }
+
+ static Map algorithm = ImmutableMap.builder()
+ .put(JsonWebKeyCurveName.P_256, "SHA-256")
+ .put(JsonWebKeyCurveName.P_384, "SHA-384")
+ .put(JsonWebKeyCurveName.P_521, "SHA-512")
+ .put(JsonWebKeyCurveName.P_256K, "SHA-256")
+ .build();
+
+ Map keys = ImmutableMap.builder()
+ .put(256, "{\"kid\":\"key_id\",\"kty\":\"EC\",\"key_ops\":null,\"n\":null,\"e\":null,\"d\":\"AM_iqldq9VSqlf9v3w7lren4pJvZTG81v6_V5ZBLP7ZI\",\"dp\":null,\"dq\":null,\"qi\":null,\"p\":null,\"q\":null,\"k\":null,\"key_hsm\":null,\"crv\":\"P-256\",\"x\":\"KyjF795jLyVIgswKSQInEGYHNBKSKyPgNojEgYlldMI\",\"y\":\"AIl_ca1ZIKbJ5YGdgGr_7HySldI2aWeBaOImZEYIMpVe\"}")
+ .put(384, "{\"kid\":\"key_id\",\"kty\":\"EC\",\"key_ops\":null,\"n\":null,\"e\":null,\"d\":\"AJEYT00mAfa-_uJ8S9ob0-9uZbPEr56CFebUQW9O-jZQBrtrMSPeqVbjJvTVlzOwbg\",\"dp\":null,\"dq\":null,\"qi\":null,\"p\":null,\"q\":null,\"k\":null,\"key_hsm\":null,\"crv\":\"P-384\",\"x\":\"AKOdkhxTtVkLtaslZIOPQGnsdKRT2xo3Ynk-bnAVvTCf3iGrTpRiMxUmyq_tvzBLEg\",\"y\":\"QoHux2O2XGMh8w7a5sWwskAyCR0g3Lj7kPGuvnDq_bQ_-_VoTvsGMAe9MFexv68I\"}")
+ .put(521, "{\"kid\":\"key_id\",\"kty\":\"EC\",\"key_ops\":null,\"n\":null,\"e\":null,\"d\":\"AVW7TFJVOJ8jY5PqK0nnKyVYQwhkBEGKt0nhSZTS5io7U32dR7xZle77Gq6SpjrdFVa32jvGWgchlSguV3WKy3sj\",\"dp\":null,\"dq\":null,\"qi\":null,\"p\":null,\"q\":null,\"k\":null,\"key_hsm\":null,\"crv\":\"P-521\",\"x\":\"AIDmImOrJNKOjOGp7wD8Dzi_uz-00E7cs8iN5SwBkzBXktyRrLDFS_SMwVdnIWpLcdJQn5sTGDS121DhjQA2i2dO\",\"y\":\"AWRoeIfIoRoEx8V9ijjwaco3V6vUPUYvKMKxtCPvm8iwhB7pZAI7-mODSfkb3rZo3gxuWoM3G7L66FttUlKSLK4w\"}")
+ .put(265, "{\"kid\":\"key_id\",\"kty\":\"EC\",\"key_ops\":null,\"n\":null,\"e\":null,\"d\":\"YKv22AkpwBpKUcDodNhKhvI-bRpiWqoN8l0kNCo-Mds\",\"dp\":null,\"dq\":null,\"qi\":null,\"p\":null,\"q\":null,\"k\":null,\"key_hsm\":null,\"crv\":\"P-256K\",\"x\":\"Yw9Sln8gYf_oiFY1anQm0V_WwsRaCIcEccfbhu5hSJo\",\"y\":\"AJq3JT2YldszaohHaS7LkngPWS9y0yAn7HhHb5p0IUDS\"}")
+ .build();
+
+ public static final Map CURVE_TO_SIGNATURE = ImmutableMap.builder()
+ .put(JsonWebKeyCurveName.P_256, "SHA256withECDSA")
+ .put(JsonWebKeyCurveName.P_384, "SHA384withECDSA")
+ .put(JsonWebKeyCurveName.P_521, "SHA512withECDSA")
+ .put(JsonWebKeyCurveName.P_256K, "NONEwithECDSA")
+ .build();
+}
diff --git a/azure-keyvault-webkey/src/test/java/com/microsoft/azure/keyvault/webkey/test/RsaHsmValidationTests.java b/azure-keyvault-webkey/src/test/java/com/microsoft/azure/keyvault/webkey/test/RsaHsmValidationTests.java
index 816db50..fd960ee 100644
--- a/azure-keyvault-webkey/src/test/java/com/microsoft/azure/keyvault/webkey/test/RsaHsmValidationTests.java
+++ b/azure-keyvault-webkey/src/test/java/com/microsoft/azure/keyvault/webkey/test/RsaHsmValidationTests.java
@@ -6,6 +6,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.microsoft.azure.keyvault.webkey.JsonWebKey;
+
public class RsaHsmValidationTests {
String keyWithoutT = "{\"kid\":\"key_id\",\"kty\":\"RSA-HSM\",\"key_ops\":[\"encrypt\",\"decrypt\"],\"n\":\"1_6ZtP288hEkKML-L6nFyZh1PD1rmAgwbbwjEvTSDK_008BYWhjp_6ULy9BhWtRIytNkPkm9gzaBTrCpp-vyDXPGa836Htp-w8u5JmxoUZchJh576m3m-8ZYWTmZSAp5SpruyKAmLSxPJHEWPXQntnmuTMjb9HBT9Ltrwc0ZDk-jsMLYunDJrNmrRUxQgb0zQ_Tl5fJjj8j-0KVx2RXtbfWFvf5fRdBYyP3m0aUpoopQPwtXszD2LcSKMJ_TnmnvMWr8MOA5aRlBaGdBk7zBgRafvDPam3Q2AvFA9mfcAVncpfZ3JFm73VARw6MofXtRqOHtZ7y4oNbY95xXwU2r6w\",\"e\":\"AQAB\"}";
diff --git a/azure-keyvault/.gitignore b/azure-keyvault/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/azure-keyvault/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/azure-keyvault/pom.xml b/azure-keyvault/pom.xml
index d99bbbe..ee2adb5 100644
--- a/azure-keyvault/pom.xml
+++ b/azure-keyvault/pom.xml
@@ -1,12 +1,12 @@
+the MIT License. See License.txt in the project root for license information. -->
4.0.0com.microsoft.azureazure-keyvault-parent
- 1.0.1-SNAPSHOT
+ 1.1../pom.xml
@@ -62,6 +62,7 @@
com.microsoft.azureazure1.3.0
+ testcom.microsoft.azure
@@ -73,6 +74,20 @@
azure-client-authentication[1.1.0,2.0.0)
+
+ com.microsoft.azure
+ azure-keyvault-cryptography
+ 1.1
+ system
+ ${basedir}/../azure-keyvault-cryptography/target/azure-keyvault-cryptography-1.1.jar
+
+
+ com.microsoft.azure
+ azure-keyvault-core
+ 1.1
+ system
+ ${basedir}/../azure-keyvault-core/target/azure-keyvault-core-1.1.jar
+ com.microsoft.azureazure-keyvault-webkey
@@ -84,6 +99,12 @@
junittest
+
+ com.microsoft.azure
+ azure-mgmt-keyvault
+ 1.11.1
+ test
+ com.microsoft.azureazure-mgmt-resources
@@ -100,9 +121,18 @@
org.bouncycastlebcprov-jdk15on1.54
+ test
+
+
+
+ commons-io
+ commons-io
+ 2.6
+ test
+
-
+
@@ -110,12 +140,7 @@
jetty-maven-plugin9.2.22.v20170606
- 0
- 11079
- STOP
-
- ${playbackServerPort}
-
+ ../jetty.xml,../jetty-http.xml
diff --git a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/CertificateIdentifier.java b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/CertificateIdentifier.java
index c78460e..3d89362 100644
--- a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/CertificateIdentifier.java
+++ b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/CertificateIdentifier.java
@@ -1,49 +1,49 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- */
-
-package com.microsoft.azure.keyvault;
-
-/**
- * The certificate identifier.
- */
-public final class CertificateIdentifier extends ObjectIdentifier {
-
- /**
- * Verify whether the identifier is for certificate.
- * @param identifier the certificate identifier
- * @return true if the identifier is the certificate identifier. False otherwise.
- */
- public static boolean isCertificateIdentifier(String identifier) {
- return ObjectIdentifier.isObjectIdentifier("certificates", identifier);
- }
-
- /**
- * Constructor.
- * @param vault The vault url
- * @param name the certificate name
- */
- public CertificateIdentifier(String vault, String name) {
- this(vault, name, "");
- }
-
- /**
- * Constructor.
- * @param vault the vault url
- * @param name the certificate name
- * @param version the certificate version
- */
- public CertificateIdentifier(String vault, String name, String version) {
- super(vault, "certificates", name, version);
- }
-
- /**
- * Constructor.
- * @param identifier the certificate identifier
- */
- public CertificateIdentifier(String identifier) {
- super("certificates", identifier);
- }
-}
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+
+package com.microsoft.azure.keyvault;
+
+/**
+ * The certificate identifier.
+ */
+public final class CertificateIdentifier extends ObjectIdentifier {
+
+ /**
+ * Verify whether the identifier is for certificate.
+ * @param identifier the certificate identifier
+ * @return true if the identifier is the certificate identifier. False otherwise.
+ */
+ public static boolean isCertificateIdentifier(String identifier) {
+ return ObjectIdentifier.isObjectIdentifier("certificates", identifier);
+ }
+
+ /**
+ * Constructor.
+ * @param vault The vault url
+ * @param name the certificate name
+ */
+ public CertificateIdentifier(String vault, String name) {
+ this(vault, name, "");
+ }
+
+ /**
+ * Constructor.
+ * @param vault the vault url
+ * @param name the certificate name
+ * @param version the certificate version
+ */
+ public CertificateIdentifier(String vault, String name, String version) {
+ super(vault, "certificates", name, version);
+ }
+
+ /**
+ * Constructor.
+ * @param identifier the certificate identifier
+ */
+ public CertificateIdentifier(String identifier) {
+ super("certificates", identifier);
+ }
+}
diff --git a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/CertificateOperationIdentifier.java b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/CertificateOperationIdentifier.java
index ed88be4..df61440 100644
--- a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/CertificateOperationIdentifier.java
+++ b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/CertificateOperationIdentifier.java
@@ -1,70 +1,70 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- */
-
-package com.microsoft.azure.keyvault;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-/**
- * The certificate operation identifier.
- */
-public final class CertificateOperationIdentifier extends ObjectIdentifier {
-
- /**
- * Verifies whether the identifier belongs to a key vault certificate operation.
- * @param identifier the key vault certificate operation identifier.
- * @return true if the identifier belongs to a key vault certificate operation. False otherwise.
- */
- public static boolean isCertificateOperationIdentifier(String identifier) {
- identifier = verifyNonEmpty(identifier, "identifier");
-
- URI baseUri;
- try {
- baseUri = new URI(identifier);
- } catch (URISyntaxException e) {
- return false;
- }
-
- // Path is of the form "/certificates/[name]/pending"
- String[] segments = baseUri.getPath().split("/");
- if (segments.length != 4) {
- return false;
- }
-
- if (!(segments[1]).equals("certificates")) {
- return false;
- }
-
- if (!(segments[3]).equals("pending")) {
- return false;
- }
-
- return true;
- }
-
- /**
- * Constructor.
- * @param vault the vault url
- * @param name the name of certificate
- * @param version the certificate version
- */
- public CertificateOperationIdentifier(String vault, String name, String version) {
- super(vault, "certificates", name, "pending");
- }
-
- /**
- * Constructor.
- * @param identifier the key vault certificate operation identifier.
- */
- public CertificateOperationIdentifier(String identifier) {
- super("certificates", identifier);
- if (!version().equals("pending")) {
- throw new IllegalArgumentException(
- String.format("Invalid CertificateOperationIdentifier: {0}", identifier));
- }
- }
-}
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+
+package com.microsoft.azure.keyvault;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * The certificate operation identifier.
+ */
+public final class CertificateOperationIdentifier extends ObjectIdentifier {
+
+ /**
+ * Verifies whether the identifier belongs to a key vault certificate operation.
+ * @param identifier the key vault certificate operation identifier.
+ * @return true if the identifier belongs to a key vault certificate operation. False otherwise.
+ */
+ public static boolean isCertificateOperationIdentifier(String identifier) {
+ identifier = verifyNonEmpty(identifier, "identifier");
+
+ URI baseUri;
+ try {
+ baseUri = new URI(identifier);
+ } catch (URISyntaxException e) {
+ return false;
+ }
+
+ // Path is of the form "/certificates/[name]/pending"
+ String[] segments = baseUri.getPath().split("/");
+ if (segments.length != 4) {
+ return false;
+ }
+
+ if (!(segments[1]).equals("certificates")) {
+ return false;
+ }
+
+ if (!(segments[3]).equals("pending")) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Constructor.
+ * @param vault the vault url
+ * @param name the name of certificate
+ * @param version the certificate version
+ */
+ public CertificateOperationIdentifier(String vault, String name, String version) {
+ super(vault, "certificates", name, "pending");
+ }
+
+ /**
+ * Constructor.
+ * @param identifier the key vault certificate operation identifier.
+ */
+ public CertificateOperationIdentifier(String identifier) {
+ super("certificates", identifier);
+ if (!version().equals("pending")) {
+ throw new IllegalArgumentException(
+ String.format("Invalid CertificateOperationIdentifier: {0}", identifier));
+ }
+ }
+}
diff --git a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/IssuerIdentifier.java b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/IssuerIdentifier.java
index 6d50e9c..71c88d9 100644
--- a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/IssuerIdentifier.java
+++ b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/IssuerIdentifier.java
@@ -1,106 +1,106 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- */
-
-package com.microsoft.azure.keyvault;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.InvalidParameterException;
-
-/**
- * The issuer identifier.
- */
-public final class IssuerIdentifier extends ObjectIdentifier {
-
- /**
- * Verifies whether the identifier belongs to a key vault issuer.
- * @param identifier the key vault issuer identifier.
- * @return true if the identifier belongs to a key vault issuer. False otherwise.
- */
- public static boolean isIssuerIdentifier(String identifier) {
- identifier = verifyNonEmpty(identifier, "identifier");
-
- URI baseUri;
- try {
- baseUri = new URI(identifier);
- } catch (URISyntaxException e) {
- return false;
- }
-
- String[] segments = baseUri.getPath().split("/");
- if (segments.length != 4 || segments[1] != "certificates" || segments[2] != "issuers") {
- return false;
- }
-
- return true;
- }
-
- /**
- * Constructor.
- * @param vault the vault url.
- * @param name the name of issuer.
- */
- public IssuerIdentifier(String vault, String name) {
- vault = verifyNonEmpty(vault, "vault");
-
- name = verifyNonEmpty(name, "name");
-
- URI baseUri;
- try {
- baseUri = new URI(vault);
- } catch (URISyntaxException e) {
- throw new InvalidParameterException(String.format("Invalid ObjectIdentifier: %s. Not a valid URI", vault));
- }
-
- this.name = name;
- this.version = null;
- this.vault = String.format("%s://%s", baseUri.getScheme(), getFullAuthority(baseUri));
-
- baseIdentifier = String.format("%s/%s/%s", this.vault, "certificates/issuers", this.name);
- identifier = baseIdentifier;
- }
-
- /**
- * Constructor.
- * @param identifier the key vault issuer identifier.
- */
- public IssuerIdentifier(String identifier) {
-
- identifier = verifyNonEmpty(identifier, "identifier");
-
- URI baseUri;
- try {
- baseUri = new URI(identifier);
- } catch (URISyntaxException e) {
- throw new InvalidParameterException(
- String.format("Invalid ObjectIdentifier: %s. Not a valid URI", identifier));
- }
-
- // Path is of the form "/collection/name[/version]"
- String[] segments = baseUri.getPath().split("/");
- if (segments.length != 4) {
- throw new InvalidParameterException(String
- .format("Invalid ObjectIdentifier: %s. Bad number of segments: %d", identifier, segments.length));
- }
-
- if (!segments[1].equals("certificates")) {
- throw new InvalidParameterException(
- String.format("Invalid ObjectIdentifier: %s. Segment [1] should be '%s', found '%s'", identifier,
- "certificates", segments[1]));
- }
- if (!segments[2].equals("issuers")) {
- throw new InvalidParameterException(
- String.format("Invalid ObjectIdentifier: %s. Segment [2] should be '%s', found '%s'", identifier,
- "issuers", segments[2]));
- }
-
- name = segments[3];
- version = "";
- vault = String.format("%s://%s", baseUri.getScheme(), getFullAuthority(baseUri));
- baseIdentifier = String.format("%s/%s/%s", vault, "certificates/issuers", name);
- this.identifier = baseIdentifier;
- }
-}
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+
+package com.microsoft.azure.keyvault;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.security.InvalidParameterException;
+
+/**
+ * The issuer identifier.
+ */
+public final class IssuerIdentifier extends ObjectIdentifier {
+
+ /**
+ * Verifies whether the identifier belongs to a key vault issuer.
+ * @param identifier the key vault issuer identifier.
+ * @return true if the identifier belongs to a key vault issuer. False otherwise.
+ */
+ public static boolean isIssuerIdentifier(String identifier) {
+ identifier = verifyNonEmpty(identifier, "identifier");
+
+ URI baseUri;
+ try {
+ baseUri = new URI(identifier);
+ } catch (URISyntaxException e) {
+ return false;
+ }
+
+ String[] segments = baseUri.getPath().split("/");
+ if (segments.length != 4 || segments[1] != "certificates" || segments[2] != "issuers") {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Constructor.
+ * @param vault the vault url.
+ * @param name the name of issuer.
+ */
+ public IssuerIdentifier(String vault, String name) {
+ vault = verifyNonEmpty(vault, "vault");
+
+ name = verifyNonEmpty(name, "name");
+
+ URI baseUri;
+ try {
+ baseUri = new URI(vault);
+ } catch (URISyntaxException e) {
+ throw new InvalidParameterException(String.format("Invalid ObjectIdentifier: %s. Not a valid URI", vault));
+ }
+
+ this.name = name;
+ this.version = null;
+ this.vault = String.format("%s://%s", baseUri.getScheme(), getFullAuthority(baseUri));
+
+ baseIdentifier = String.format("%s/%s/%s", this.vault, "certificates/issuers", this.name);
+ identifier = baseIdentifier;
+ }
+
+ /**
+ * Constructor.
+ * @param identifier the key vault issuer identifier.
+ */
+ public IssuerIdentifier(String identifier) {
+
+ identifier = verifyNonEmpty(identifier, "identifier");
+
+ URI baseUri;
+ try {
+ baseUri = new URI(identifier);
+ } catch (URISyntaxException e) {
+ throw new InvalidParameterException(
+ String.format("Invalid ObjectIdentifier: %s. Not a valid URI", identifier));
+ }
+
+ // Path is of the form "/collection/name[/version]"
+ String[] segments = baseUri.getPath().split("/");
+ if (segments.length != 4) {
+ throw new InvalidParameterException(String
+ .format("Invalid ObjectIdentifier: %s. Bad number of segments: %d", identifier, segments.length));
+ }
+
+ if (!segments[1].equals("certificates")) {
+ throw new InvalidParameterException(
+ String.format("Invalid ObjectIdentifier: %s. Segment [1] should be '%s', found '%s'", identifier,
+ "certificates", segments[1]));
+ }
+ if (!segments[2].equals("issuers")) {
+ throw new InvalidParameterException(
+ String.format("Invalid ObjectIdentifier: %s. Segment [2] should be '%s', found '%s'", identifier,
+ "issuers", segments[2]));
+ }
+
+ name = segments[3];
+ version = "";
+ vault = String.format("%s://%s", baseUri.getScheme(), getFullAuthority(baseUri));
+ baseIdentifier = String.format("%s/%s/%s", vault, "certificates/issuers", name);
+ this.identifier = baseIdentifier;
+ }
+}
diff --git a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyIdentifier.java b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyIdentifier.java
index 67dcd6f..493f409 100644
--- a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyIdentifier.java
+++ b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyIdentifier.java
@@ -1,49 +1,49 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- */
-
-package com.microsoft.azure.keyvault;
-
-/**
- * The Key Vault key identifier.
- */
-public final class KeyIdentifier extends ObjectIdentifier {
-
- /**
- * Verifies whether the identifier belongs to a key vault key.
- * @param identifier the key vault key identifier.
- * @return true if the identifier belongs to a key vault key. False otherwise.
- */
- public static boolean isKeyIdentifier(String identifier) {
- return ObjectIdentifier.isObjectIdentifier("keys", identifier);
- }
-
- /**
- * Constructor.
- * @param vault the vault url.
- * @param name the name of key.
- */
- public KeyIdentifier(String vault, String name) {
- this(vault, name, "");
- }
-
- /**
- * Constructor.
- * @param vault the vault url.
- * @param name the name of key.
- * @param version the key version.
- */
- public KeyIdentifier(String vault, String name, String version) {
- super(vault, "keys", name, version);
- }
-
- /**
- * Constructor.
- * @param identifier the key vault key identifier.
- */
- public KeyIdentifier(String identifier) {
- super("keys", identifier);
- }
-}
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+
+package com.microsoft.azure.keyvault;
+
+/**
+ * The Key Vault key identifier.
+ */
+public final class KeyIdentifier extends ObjectIdentifier {
+
+ /**
+ * Verifies whether the identifier belongs to a key vault key.
+ * @param identifier the key vault key identifier.
+ * @return true if the identifier belongs to a key vault key. False otherwise.
+ */
+ public static boolean isKeyIdentifier(String identifier) {
+ return ObjectIdentifier.isObjectIdentifier("keys", identifier);
+ }
+
+ /**
+ * Constructor.
+ * @param vault the vault url.
+ * @param name the name of key.
+ */
+ public KeyIdentifier(String vault, String name) {
+ this(vault, name, "");
+ }
+
+ /**
+ * Constructor.
+ * @param vault the vault url.
+ * @param name the name of key.
+ * @param version the key version.
+ */
+ public KeyIdentifier(String vault, String name, String version) {
+ super(vault, "keys", name, version);
+ }
+
+ /**
+ * Constructor.
+ * @param identifier the key vault key identifier.
+ */
+ public KeyIdentifier(String identifier) {
+ super("keys", identifier);
+ }
+}
diff --git a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClient.java b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClient.java
index cced528..58e8bd3 100644
--- a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClient.java
+++ b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClient.java
@@ -1,29 +1,39 @@
-package com.microsoft.azure.keyvault;
-
-import com.microsoft.azure.keyvault.implementation.KeyVaultClientCustomImpl;
-import com.microsoft.rest.RestClient;
-import com.microsoft.rest.credentials.ServiceClientCredentials;
-
-public final class KeyVaultClient extends KeyVaultClientCustomImpl implements KeyVaultClientCustom {
-
- /**
- * Initializes an instance of KeyVaultClient client.
- *
- * @param credentials the management credentials for Azure
- */
- public KeyVaultClient(ServiceClientCredentials credentials) {
- super(credentials);
- initializeService();
- }
- /**
- * Initializes an instance of KeyVaultClient client.
- *
- * @param restClient the REST client to connect to Azure.
- */
- public KeyVaultClient(RestClient restClient) {
- super(restClient);
- initializeService();
- }
-
-
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+
+package com.microsoft.azure.keyvault;
+
+import com.microsoft.azure.keyvault.implementation.KeyVaultClientCustomImpl;
+import com.microsoft.rest.RestClient;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+
+/**
+ * Class for Key Vault Client.
+ *
+ */
+public final class KeyVaultClient extends KeyVaultClientCustomImpl implements KeyVaultClientCustom {
+
+ /**
+ * Initializes an instance of KeyVaultClient client.
+ *
+ * @param credentials the management credentials for Azure
+ */
+ public KeyVaultClient(ServiceClientCredentials credentials) {
+ super(credentials);
+ initializeService();
+ }
+ /**
+ * Initializes an instance of KeyVaultClient client.
+ *
+ * @param restClient the REST client to connect to Azure.
+ */
+ public KeyVaultClient(RestClient restClient) {
+ super(restClient);
+ initializeService();
+ }
+
+
}
\ No newline at end of file
diff --git a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientBase.java b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientBase.java
index 96311d4..72f4752 100644
--- a/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientBase.java
+++ b/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientBase.java
@@ -1,3526 +1,6124 @@
-package com.microsoft.azure.keyvault;
-
-
-/**
- * Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
- */
-
-import com.microsoft.azure.AzureClient;
-import com.microsoft.azure.ListOperationCallback;
-import com.microsoft.azure.Page;
-import com.microsoft.azure.PagedList;
-import com.microsoft.azure.keyvault.models.*;
-import com.microsoft.azure.keyvault.webkey.*;
-import com.microsoft.rest.RestClient;
-import com.microsoft.rest.ServiceCallback;
-import com.microsoft.rest.ServiceFuture;
-import com.microsoft.rest.ServiceResponse;
-import rx.Observable;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * The interface for KeyVaultClientBase class.
- */
-public interface KeyVaultClientBase {
- /**
- * Gets the REST client.
- *
- * @return the {@link RestClient} object.
- */
- RestClient restClient();
-
- /**
- * Gets the {@link AzureClient} used for long running operations.
- *
- * @return the azure client;
- */
- AzureClient getAzureClient();
-
- /**
- * Gets the User-Agent header for the client.
- *
- * @return the user agent string.
- */
- String userAgent();
-
- /**
- * Gets Client API version..
- *
- * @return the apiVersion value.
- */
- String apiVersion();
-
- /**
- * Gets Gets or sets the preferred language for the response..
- *
- * @return the acceptLanguage value.
- */
- String acceptLanguage();
-
- /**
- * Sets Gets or sets the preferred language for the response..
- *
- * @param acceptLanguage the acceptLanguage value.
- * @return the service client itself
- */
- KeyVaultClientBase withAcceptLanguage(String acceptLanguage);
-
- /**
- * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30..
- *
- * @return the longRunningOperationRetryTimeout value.
- */
- int longRunningOperationRetryTimeout();
-
- /**
- * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30..
- *
- * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
- * @return the service client itself
- */
- KeyVaultClientBase withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout);
-
- /**
- * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true..
- *
- * @return the generateClientRequestId value.
- */
- boolean generateClientRequestId();
-
- /**
- * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true..
- *
- * @param generateClientRequestId the generateClientRequestId value.
- * @return the service client itself
- */
- KeyVaultClientBase withGenerateClientRequestId(boolean generateClientRequestId);
-
- /**
- * Creates a new key, stores it, then returns key parameters and attributes to the client.
- * The create key operation can be used to create any key type in Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name for the new key. The system will generate the version name for the new key.
- * @param kty The type of key to create. For valid key types, see JsonWebKeyType. Supported JsonWebKey key types (kty) for Elliptic Curve, RSA, HSM, Octet. Possible values include: 'EC', 'RSA', 'RSA-HSM', 'oct'
- * @return the KeyBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyBundle createKey(String vaultBaseUrl, String keyName, JsonWebKeyType kty);
-
- /**
- * Creates a new key, stores it, then returns key parameters and attributes to the client.
- * The create key operation can be used to create any key type in Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name for the new key. The system will generate the version name for the new key.
- * @param kty The type of key to create. For valid key types, see JsonWebKeyType. Supported JsonWebKey key types (kty) for Elliptic Curve, RSA, HSM, Octet. Possible values include: 'EC', 'RSA', 'RSA-HSM', 'oct'
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture createKeyAsync(String vaultBaseUrl, String keyName, JsonWebKeyType kty, final ServiceCallback serviceCallback);
-
- /**
- * Creates a new key, stores it, then returns key parameters and attributes to the client.
- * The create key operation can be used to create any key type in Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name for the new key. The system will generate the version name for the new key.
- * @param kty The type of key to create. For valid key types, see JsonWebKeyType. Supported JsonWebKey key types (kty) for Elliptic Curve, RSA, HSM, Octet. Possible values include: 'EC', 'RSA', 'RSA-HSM', 'oct'
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable createKeyAsync(String vaultBaseUrl, String keyName, JsonWebKeyType kty);
-
- /**
- * Creates a new key, stores it, then returns key parameters and attributes to the client.
- * The create key operation can be used to create any key type in Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name for the new key. The system will generate the version name for the new key.
- * @param kty The type of key to create. For valid key types, see JsonWebKeyType. Supported JsonWebKey key types (kty) for Elliptic Curve, RSA, HSM, Octet. Possible values include: 'EC', 'RSA', 'RSA-HSM', 'oct'
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> createKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName, JsonWebKeyType kty);
-
- /**
- * Creates a new key, stores it, then returns key parameters and attributes to the client.
- * The create key operation can be used to create any key type in Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name for the new key. The system will generate the version name for the new key.
- * @param kty The type of key to create. For valid key types, see JsonWebKeyType. Supported JsonWebKey key types (kty) for Elliptic Curve, RSA, HSM, Octet. Possible values include: 'EC', 'RSA', 'RSA-HSM', 'oct'
- * @param keySize The key size in bytes. For example, 1024 or 2048.
- * @param keyOps the List<JsonWebKeyOperation> value
- * @param keyAttributes the KeyAttributes value
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the KeyBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyBundle createKey(String vaultBaseUrl, String keyName, JsonWebKeyType kty, Integer keySize, List keyOps, KeyAttributes keyAttributes, Map tags);
-
- /**
- * Creates a new key, stores it, then returns key parameters and attributes to the client.
- * The create key operation can be used to create any key type in Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name for the new key. The system will generate the version name for the new key.
- * @param kty The type of key to create. For valid key types, see JsonWebKeyType. Supported JsonWebKey key types (kty) for Elliptic Curve, RSA, HSM, Octet. Possible values include: 'EC', 'RSA', 'RSA-HSM', 'oct'
- * @param keySize The key size in bytes. For example, 1024 or 2048.
- * @param keyOps the List<JsonWebKeyOperation> value
- * @param keyAttributes the KeyAttributes value
- * @param tags Application specific metadata in the form of key-value pairs.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture createKeyAsync(String vaultBaseUrl, String keyName, JsonWebKeyType kty, Integer keySize, List keyOps, KeyAttributes keyAttributes, Map tags, final ServiceCallback serviceCallback);
-
- /**
- * Creates a new key, stores it, then returns key parameters and attributes to the client.
- * The create key operation can be used to create any key type in Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name for the new key. The system will generate the version name for the new key.
- * @param kty The type of key to create. For valid key types, see JsonWebKeyType. Supported JsonWebKey key types (kty) for Elliptic Curve, RSA, HSM, Octet. Possible values include: 'EC', 'RSA', 'RSA-HSM', 'oct'
- * @param keySize The key size in bytes. For example, 1024 or 2048.
- * @param keyOps the List<JsonWebKeyOperation> value
- * @param keyAttributes the KeyAttributes value
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable createKeyAsync(String vaultBaseUrl, String keyName, JsonWebKeyType kty, Integer keySize, List keyOps, KeyAttributes keyAttributes, Map tags);
-
- /**
- * Creates a new key, stores it, then returns key parameters and attributes to the client.
- * The create key operation can be used to create any key type in Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name for the new key. The system will generate the version name for the new key.
- * @param kty The type of key to create. For valid key types, see JsonWebKeyType. Supported JsonWebKey key types (kty) for Elliptic Curve, RSA, HSM, Octet. Possible values include: 'EC', 'RSA', 'RSA-HSM', 'oct'
- * @param keySize The key size in bytes. For example, 1024 or 2048.
- * @param keyOps the List<JsonWebKeyOperation> value
- * @param keyAttributes the KeyAttributes value
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> createKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName, JsonWebKeyType kty, Integer keySize, List keyOps, KeyAttributes keyAttributes, Map tags);
-
- /**
- * Imports an externally created key, stores it, and returns key parameters and attributes to the client.
- * The import key operation may be used to import any key type into an Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName Name for the imported key.
- * @param key The Json web key
- * @return the KeyBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyBundle importKey(String vaultBaseUrl, String keyName, JsonWebKey key);
-
- /**
- * Imports an externally created key, stores it, and returns key parameters and attributes to the client.
- * The import key operation may be used to import any key type into an Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName Name for the imported key.
- * @param key The Json web key
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture importKeyAsync(String vaultBaseUrl, String keyName, JsonWebKey key, final ServiceCallback serviceCallback);
-
- /**
- * Imports an externally created key, stores it, and returns key parameters and attributes to the client.
- * The import key operation may be used to import any key type into an Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName Name for the imported key.
- * @param key The Json web key
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable importKeyAsync(String vaultBaseUrl, String keyName, JsonWebKey key);
-
- /**
- * Imports an externally created key, stores it, and returns key parameters and attributes to the client.
- * The import key operation may be used to import any key type into an Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName Name for the imported key.
- * @param key The Json web key
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> importKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName, JsonWebKey key);
-
- /**
- * Imports an externally created key, stores it, and returns key parameters and attributes to the client.
- * The import key operation may be used to import any key type into an Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName Name for the imported key.
- * @param key The Json web key
- * @param hsm Whether to import as a hardware key (HSM) or software key.
- * @param keyAttributes The key management attributes.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the KeyBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyBundle importKey(String vaultBaseUrl, String keyName, JsonWebKey key, Boolean hsm, KeyAttributes keyAttributes, Map tags);
-
- /**
- * Imports an externally created key, stores it, and returns key parameters and attributes to the client.
- * The import key operation may be used to import any key type into an Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName Name for the imported key.
- * @param key The Json web key
- * @param hsm Whether to import as a hardware key (HSM) or software key.
- * @param keyAttributes The key management attributes.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture importKeyAsync(String vaultBaseUrl, String keyName, JsonWebKey key, Boolean hsm, KeyAttributes keyAttributes, Map tags, final ServiceCallback serviceCallback);
-
- /**
- * Imports an externally created key, stores it, and returns key parameters and attributes to the client.
- * The import key operation may be used to import any key type into an Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName Name for the imported key.
- * @param key The Json web key
- * @param hsm Whether to import as a hardware key (HSM) or software key.
- * @param keyAttributes The key management attributes.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable importKeyAsync(String vaultBaseUrl, String keyName, JsonWebKey key, Boolean hsm, KeyAttributes keyAttributes, Map tags);
-
- /**
- * Imports an externally created key, stores it, and returns key parameters and attributes to the client.
- * The import key operation may be used to import any key type into an Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName Name for the imported key.
- * @param key The Json web key
- * @param hsm Whether to import as a hardware key (HSM) or software key.
- * @param keyAttributes The key management attributes.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> importKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName, JsonWebKey key, Boolean hsm, KeyAttributes keyAttributes, Map tags);
-
- /**
- * Deletes a key of any type from storage in Azure Key Vault.
- * The delete key operation cannot be used to remove individual versions of a key. This operation removes the cryptographic material associated with the key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or Encrypt/Decrypt operations.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key to delete.
- * @return the KeyBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyBundle deleteKey(String vaultBaseUrl, String keyName);
-
- /**
- * Deletes a key of any type from storage in Azure Key Vault.
- * The delete key operation cannot be used to remove individual versions of a key. This operation removes the cryptographic material associated with the key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or Encrypt/Decrypt operations.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key to delete.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture deleteKeyAsync(String vaultBaseUrl, String keyName, final ServiceCallback serviceCallback);
-
- /**
- * Deletes a key of any type from storage in Azure Key Vault.
- * The delete key operation cannot be used to remove individual versions of a key. This operation removes the cryptographic material associated with the key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or Encrypt/Decrypt operations.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key to delete.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable deleteKeyAsync(String vaultBaseUrl, String keyName);
-
- /**
- * Deletes a key of any type from storage in Azure Key Vault.
- * The delete key operation cannot be used to remove individual versions of a key. This operation removes the cryptographic material associated with the key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or Encrypt/Decrypt operations.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key to delete.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> deleteKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName);
-
- /**
- * The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault.
- * In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of key to update.
- * @param keyVersion The version of the key to update.
- * @return the KeyBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyBundle updateKey(String vaultBaseUrl, String keyName, String keyVersion);
-
- /**
- * The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault.
- * In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of key to update.
- * @param keyVersion The version of the key to update.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture updateKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, final ServiceCallback serviceCallback);
-
- /**
- * The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault.
- * In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of key to update.
- * @param keyVersion The version of the key to update.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable updateKeyAsync(String vaultBaseUrl, String keyName, String keyVersion);
-
- /**
- * The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault.
- * In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of key to update.
- * @param keyVersion The version of the key to update.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> updateKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion);
-
- /**
- * The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault.
- * In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of key to update.
- * @param keyVersion The version of the key to update.
- * @param keyOps Json web key operations. For more information on possible key operations, see JsonWebKeyOperation.
- * @param keyAttributes the KeyAttributes value
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the KeyBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyBundle updateKey(String vaultBaseUrl, String keyName, String keyVersion, List keyOps, KeyAttributes keyAttributes, Map tags);
-
- /**
- * The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault.
- * In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of key to update.
- * @param keyVersion The version of the key to update.
- * @param keyOps Json web key operations. For more information on possible key operations, see JsonWebKeyOperation.
- * @param keyAttributes the KeyAttributes value
- * @param tags Application specific metadata in the form of key-value pairs.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture updateKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, List keyOps, KeyAttributes keyAttributes, Map tags, final ServiceCallback serviceCallback);
-
- /**
- * The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault.
- * In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of key to update.
- * @param keyVersion The version of the key to update.
- * @param keyOps Json web key operations. For more information on possible key operations, see JsonWebKeyOperation.
- * @param keyAttributes the KeyAttributes value
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable updateKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, List keyOps, KeyAttributes keyAttributes, Map tags);
-
- /**
- * The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault.
- * In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of key to update.
- * @param keyVersion The version of the key to update.
- * @param keyOps Json web key operations. For more information on possible key operations, see JsonWebKeyOperation.
- * @param keyAttributes the KeyAttributes value
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> updateKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, List keyOps, KeyAttributes keyAttributes, Map tags);
-
- /**
- * Gets the public part of a stored key.
- * The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key to get.
- * @param keyVersion Adding the version parameter retrieves a specific version of a key.
- * @return the KeyBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyBundle getKey(String vaultBaseUrl, String keyName, String keyVersion);
-
- /**
- * Gets the public part of a stored key.
- * The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key to get.
- * @param keyVersion Adding the version parameter retrieves a specific version of a key.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture getKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, final ServiceCallback serviceCallback);
-
- /**
- * Gets the public part of a stored key.
- * The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key to get.
- * @param keyVersion Adding the version parameter retrieves a specific version of a key.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable getKeyAsync(String vaultBaseUrl, String keyName, String keyVersion);
-
- /**
- * Gets the public part of a stored key.
- * The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key to get.
- * @param keyVersion Adding the version parameter retrieves a specific version of a key.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion);
-
- /**
- * Retrieves a list of individual key versions with the same key name.
- * The full key identifier, attributes, and tags are provided in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @return the PagedList<KeyItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getKeyVersions(final String vaultBaseUrl, final String keyName);
-
- /**
- * Retrieves a list of individual key versions with the same key name.
- * The full key identifier, attributes, and tags are provided in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getKeyVersionsAsync(final String vaultBaseUrl, final String keyName, final ListOperationCallback serviceCallback);
-
- /**
- * Retrieves a list of individual key versions with the same key name.
- * The full key identifier, attributes, and tags are provided in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @return the observable to the PagedList<KeyItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getKeyVersionsAsync(final String vaultBaseUrl, final String keyName);
-
- /**
- * Retrieves a list of individual key versions with the same key name.
- * The full key identifier, attributes, and tags are provided in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @return the observable to the PagedList<KeyItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getKeyVersionsWithServiceResponseAsync(final String vaultBaseUrl, final String keyName);
-
- /**
- * Retrieves a list of individual key versions with the same key name.
- * The full key identifier, attributes, and tags are provided in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the PagedList<KeyItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getKeyVersions(final String vaultBaseUrl, final String keyName, final Integer maxresults);
-
- /**
- * Retrieves a list of individual key versions with the same key name.
- * The full key identifier, attributes, and tags are provided in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getKeyVersionsAsync(final String vaultBaseUrl, final String keyName, final Integer maxresults, final ListOperationCallback serviceCallback);
-
- /**
- * Retrieves a list of individual key versions with the same key name.
- * The full key identifier, attributes, and tags are provided in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<KeyItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getKeyVersionsAsync(final String vaultBaseUrl, final String keyName, final Integer maxresults);
-
- /**
- * Retrieves a list of individual key versions with the same key name.
- * The full key identifier, attributes, and tags are provided in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<KeyItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getKeyVersionsWithServiceResponseAsync(final String vaultBaseUrl, final String keyName, final Integer maxresults);
-
- /**
- * List keys in the specified vault.
- * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a stored key. The LIST operation is applicable to all key types, however only the base key identifier,attributes, and tags are provided in the response. Individual versions of a key are not listed in the response. Authorization: Requires the keys/list permission.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the PagedList<KeyItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getKeys(final String vaultBaseUrl);
-
- /**
- * List keys in the specified vault.
- * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a stored key. The LIST operation is applicable to all key types, however only the base key identifier,attributes, and tags are provided in the response. Individual versions of a key are not listed in the response. Authorization: Requires the keys/list permission.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getKeysAsync(final String vaultBaseUrl, final ListOperationCallback serviceCallback);
-
- /**
- * List keys in the specified vault.
- * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a stored key. The LIST operation is applicable to all key types, however only the base key identifier,attributes, and tags are provided in the response. Individual versions of a key are not listed in the response. Authorization: Requires the keys/list permission.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the PagedList<KeyItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getKeysAsync(final String vaultBaseUrl);
-
- /**
- * List keys in the specified vault.
- * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a stored key. The LIST operation is applicable to all key types, however only the base key identifier,attributes, and tags are provided in the response. Individual versions of a key are not listed in the response. Authorization: Requires the keys/list permission.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the PagedList<KeyItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getKeysWithServiceResponseAsync(final String vaultBaseUrl);
-
- /**
- * List keys in the specified vault.
- * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a stored key. The LIST operation is applicable to all key types, however only the base key identifier,attributes, and tags are provided in the response. Individual versions of a key are not listed in the response. Authorization: Requires the keys/list permission.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the PagedList<KeyItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getKeys(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * List keys in the specified vault.
- * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a stored key. The LIST operation is applicable to all key types, however only the base key identifier,attributes, and tags are provided in the response. Individual versions of a key are not listed in the response. Authorization: Requires the keys/list permission.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getKeysAsync(final String vaultBaseUrl, final Integer maxresults, final ListOperationCallback serviceCallback);
-
- /**
- * List keys in the specified vault.
- * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a stored key. The LIST operation is applicable to all key types, however only the base key identifier,attributes, and tags are provided in the response. Individual versions of a key are not listed in the response. Authorization: Requires the keys/list permission.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<KeyItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getKeysAsync(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * List keys in the specified vault.
- * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a stored key. The LIST operation is applicable to all key types, however only the base key identifier,attributes, and tags are provided in the response. Individual versions of a key are not listed in the response. Authorization: Requires the keys/list permission.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<KeyItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getKeysWithServiceResponseAsync(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * Requests that a backup of the specified key be downloaded to the client.
- * The Key Backup operation exports a key from Azure Key Vault in a protected form. Note that this operation does NOT return key material in a form that can be used outside the Azure Key Vault system, the returned key material is either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The intent of this operation is to allow a client to GENERATE a key in one Azure Key Vault instance, BACKUP the key, and then RESTORE it into another Azure Key Vault instance. The BACKUP operation may be used to export, in protected form, any key type from Azure Key Vault. Individual versions of a key cannot be backed up. BACKUP / RESTORE can be performed within geographical boundaries only; meaning that a BACKUP from one geographical area cannot be restored to another geographical area. For example, a backup from the US geographical area cannot be restored in an EU geographical area.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @return the BackupKeyResult object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- BackupKeyResult backupKey(String vaultBaseUrl, String keyName);
-
- /**
- * Requests that a backup of the specified key be downloaded to the client.
- * The Key Backup operation exports a key from Azure Key Vault in a protected form. Note that this operation does NOT return key material in a form that can be used outside the Azure Key Vault system, the returned key material is either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The intent of this operation is to allow a client to GENERATE a key in one Azure Key Vault instance, BACKUP the key, and then RESTORE it into another Azure Key Vault instance. The BACKUP operation may be used to export, in protected form, any key type from Azure Key Vault. Individual versions of a key cannot be backed up. BACKUP / RESTORE can be performed within geographical boundaries only; meaning that a BACKUP from one geographical area cannot be restored to another geographical area. For example, a backup from the US geographical area cannot be restored in an EU geographical area.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture backupKeyAsync(String vaultBaseUrl, String keyName, final ServiceCallback serviceCallback);
-
- /**
- * Requests that a backup of the specified key be downloaded to the client.
- * The Key Backup operation exports a key from Azure Key Vault in a protected form. Note that this operation does NOT return key material in a form that can be used outside the Azure Key Vault system, the returned key material is either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The intent of this operation is to allow a client to GENERATE a key in one Azure Key Vault instance, BACKUP the key, and then RESTORE it into another Azure Key Vault instance. The BACKUP operation may be used to export, in protected form, any key type from Azure Key Vault. Individual versions of a key cannot be backed up. BACKUP / RESTORE can be performed within geographical boundaries only; meaning that a BACKUP from one geographical area cannot be restored to another geographical area. For example, a backup from the US geographical area cannot be restored in an EU geographical area.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @return the observable to the BackupKeyResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable backupKeyAsync(String vaultBaseUrl, String keyName);
-
- /**
- * Requests that a backup of the specified key be downloaded to the client.
- * The Key Backup operation exports a key from Azure Key Vault in a protected form. Note that this operation does NOT return key material in a form that can be used outside the Azure Key Vault system, the returned key material is either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The intent of this operation is to allow a client to GENERATE a key in one Azure Key Vault instance, BACKUP the key, and then RESTORE it into another Azure Key Vault instance. The BACKUP operation may be used to export, in protected form, any key type from Azure Key Vault. Individual versions of a key cannot be backed up. BACKUP / RESTORE can be performed within geographical boundaries only; meaning that a BACKUP from one geographical area cannot be restored to another geographical area. For example, a backup from the US geographical area cannot be restored in an EU geographical area.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @return the observable to the BackupKeyResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> backupKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName);
-
- /**
- * Restores a backed up key to a vault.
- * Imports a previously backed up key into Azure Key Vault, restoring the key, its key identifier, attributes and access control policies. The RESTORE operation may be used to import a previously backed up key. Individual versions of a key cannot be restored. The key is restored in its entirety with the same key name as it had when it was backed up. If the key name is not available in the target Key Vault, the RESTORE operation will be rejected. While the key name is retained during restore, the final key identifier will change if the key is restored to a different vault. Restore will restore all versions and preserve version identifiers. The RESTORE operation is subject to security constraints: The target Key Vault must be owned by the same Microsoft Azure Subscription as the source Key Vault The user must have RESTORE permission in the target Key Vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyBundleBackup The backup blob associated with a key bundle.
- * @return the KeyBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyBundle restoreKey(String vaultBaseUrl, byte[] keyBundleBackup);
-
- /**
- * Restores a backed up key to a vault.
- * Imports a previously backed up key into Azure Key Vault, restoring the key, its key identifier, attributes and access control policies. The RESTORE operation may be used to import a previously backed up key. Individual versions of a key cannot be restored. The key is restored in its entirety with the same key name as it had when it was backed up. If the key name is not available in the target Key Vault, the RESTORE operation will be rejected. While the key name is retained during restore, the final key identifier will change if the key is restored to a different vault. Restore will restore all versions and preserve version identifiers. The RESTORE operation is subject to security constraints: The target Key Vault must be owned by the same Microsoft Azure Subscription as the source Key Vault The user must have RESTORE permission in the target Key Vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyBundleBackup The backup blob associated with a key bundle.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture restoreKeyAsync(String vaultBaseUrl, byte[] keyBundleBackup, final ServiceCallback serviceCallback);
-
- /**
- * Restores a backed up key to a vault.
- * Imports a previously backed up key into Azure Key Vault, restoring the key, its key identifier, attributes and access control policies. The RESTORE operation may be used to import a previously backed up key. Individual versions of a key cannot be restored. The key is restored in its entirety with the same key name as it had when it was backed up. If the key name is not available in the target Key Vault, the RESTORE operation will be rejected. While the key name is retained during restore, the final key identifier will change if the key is restored to a different vault. Restore will restore all versions and preserve version identifiers. The RESTORE operation is subject to security constraints: The target Key Vault must be owned by the same Microsoft Azure Subscription as the source Key Vault The user must have RESTORE permission in the target Key Vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyBundleBackup The backup blob associated with a key bundle.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable restoreKeyAsync(String vaultBaseUrl, byte[] keyBundleBackup);
-
- /**
- * Restores a backed up key to a vault.
- * Imports a previously backed up key into Azure Key Vault, restoring the key, its key identifier, attributes and access control policies. The RESTORE operation may be used to import a previously backed up key. Individual versions of a key cannot be restored. The key is restored in its entirety with the same key name as it had when it was backed up. If the key name is not available in the target Key Vault, the RESTORE operation will be rejected. While the key name is retained during restore, the final key identifier will change if the key is restored to a different vault. Restore will restore all versions and preserve version identifiers. The RESTORE operation is subject to security constraints: The target Key Vault must be owned by the same Microsoft Azure Subscription as the source Key Vault The user must have RESTORE permission in the target Key Vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyBundleBackup The backup blob associated with a key bundle.
- * @return the observable to the KeyBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> restoreKeyWithServiceResponseAsync(String vaultBaseUrl, byte[] keyBundleBackup);
-
- /**
- * Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.
- * The ENCRYPT operation encrypts an arbitrary sequence of bytes using an encryption key that is stored in Azure Key Vault. Note that the ENCRYPT operation only supports a single block of data, the size of which is dependent on the target key and the encryption algorithm to be used. The ENCRYPT operation is only strictly necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed using public portion of the key. This operation is supported for asymmetric keys as a convenience for callers that have a key-reference but do not have access to the public key material.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the KeyOperationResult object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyOperationResult encrypt(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.
- * The ENCRYPT operation encrypts an arbitrary sequence of bytes using an encryption key that is stored in Azure Key Vault. Note that the ENCRYPT operation only supports a single block of data, the size of which is dependent on the target key and the encryption algorithm to be used. The ENCRYPT operation is only strictly necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed using public portion of the key. This operation is supported for asymmetric keys as a convenience for callers that have a key-reference but do not have access to the public key material.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture encryptAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value, final ServiceCallback serviceCallback);
-
- /**
- * Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.
- * The ENCRYPT operation encrypts an arbitrary sequence of bytes using an encryption key that is stored in Azure Key Vault. Note that the ENCRYPT operation only supports a single block of data, the size of which is dependent on the target key and the encryption algorithm to be used. The ENCRYPT operation is only strictly necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed using public portion of the key. This operation is supported for asymmetric keys as a convenience for callers that have a key-reference but do not have access to the public key material.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the observable to the KeyOperationResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable encryptAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.
- * The ENCRYPT operation encrypts an arbitrary sequence of bytes using an encryption key that is stored in Azure Key Vault. Note that the ENCRYPT operation only supports a single block of data, the size of which is dependent on the target key and the encryption algorithm to be used. The ENCRYPT operation is only strictly necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed using public portion of the key. This operation is supported for asymmetric keys as a convenience for callers that have a key-reference but do not have access to the public key material.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the observable to the KeyOperationResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> encryptWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Decrypts a single block of encrypted data.
- * The DECRYPT operation decrypts a well-formed block of ciphertext using the target encryption key and specified algorithm. This operation is the reverse of the ENCRYPT operation; only a single block of data may be decrypted, the size of this block is dependent on the target key and the algorithm to be used. The DECRYPT operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the KeyOperationResult object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyOperationResult decrypt(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Decrypts a single block of encrypted data.
- * The DECRYPT operation decrypts a well-formed block of ciphertext using the target encryption key and specified algorithm. This operation is the reverse of the ENCRYPT operation; only a single block of data may be decrypted, the size of this block is dependent on the target key and the algorithm to be used. The DECRYPT operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture decryptAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value, final ServiceCallback serviceCallback);
-
- /**
- * Decrypts a single block of encrypted data.
- * The DECRYPT operation decrypts a well-formed block of ciphertext using the target encryption key and specified algorithm. This operation is the reverse of the ENCRYPT operation; only a single block of data may be decrypted, the size of this block is dependent on the target key and the algorithm to be used. The DECRYPT operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the observable to the KeyOperationResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable decryptAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Decrypts a single block of encrypted data.
- * The DECRYPT operation decrypts a well-formed block of ciphertext using the target encryption key and specified algorithm. This operation is the reverse of the ENCRYPT operation; only a single block of data may be decrypted, the size of this block is dependent on the target key and the algorithm to be used. The DECRYPT operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the observable to the KeyOperationResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> decryptWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Creates a signature from a digest using the specified key.
- * The SIGN operation is applicable to asymmetric and symmetric keys stored in Azure Key Vault since this operation uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm The signing/verification algorithm identifier. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'RS256', 'RS384', 'RS512', 'RSNULL'
- * @param value the Base64Url value
- * @return the KeyOperationResult object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyOperationResult sign(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] value);
-
- /**
- * Creates a signature from a digest using the specified key.
- * The SIGN operation is applicable to asymmetric and symmetric keys stored in Azure Key Vault since this operation uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm The signing/verification algorithm identifier. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'RS256', 'RS384', 'RS512', 'RSNULL'
- * @param value the Base64Url value
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture signAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] value, final ServiceCallback serviceCallback);
-
- /**
- * Creates a signature from a digest using the specified key.
- * The SIGN operation is applicable to asymmetric and symmetric keys stored in Azure Key Vault since this operation uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm The signing/verification algorithm identifier. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'RS256', 'RS384', 'RS512', 'RSNULL'
- * @param value the Base64Url value
- * @return the observable to the KeyOperationResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable signAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] value);
-
- /**
- * Creates a signature from a digest using the specified key.
- * The SIGN operation is applicable to asymmetric and symmetric keys stored in Azure Key Vault since this operation uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm The signing/verification algorithm identifier. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'RS256', 'RS384', 'RS512', 'RSNULL'
- * @param value the Base64Url value
- * @return the observable to the KeyOperationResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> signWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] value);
-
- /**
- * Verifies a signature using a specified key.
- * The VERIFY operation is applicable to symmetric keys stored in Azure Key Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure Key Vault since signature verification can be performed using the public portion of the key but this operation is supported as a convenience for callers that only have a key-reference and not the public portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm The signing/verification algorithm. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'RS256', 'RS384', 'RS512', 'RSNULL'
- * @param digest The digest used for signing.
- * @param signature The signature to be verified.
- * @return the KeyVerifyResult object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyVerifyResult verify(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature);
-
- /**
- * Verifies a signature using a specified key.
- * The VERIFY operation is applicable to symmetric keys stored in Azure Key Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure Key Vault since signature verification can be performed using the public portion of the key but this operation is supported as a convenience for callers that only have a key-reference and not the public portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm The signing/verification algorithm. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'RS256', 'RS384', 'RS512', 'RSNULL'
- * @param digest The digest used for signing.
- * @param signature The signature to be verified.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture verifyAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature, final ServiceCallback serviceCallback);
-
- /**
- * Verifies a signature using a specified key.
- * The VERIFY operation is applicable to symmetric keys stored in Azure Key Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure Key Vault since signature verification can be performed using the public portion of the key but this operation is supported as a convenience for callers that only have a key-reference and not the public portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm The signing/verification algorithm. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'RS256', 'RS384', 'RS512', 'RSNULL'
- * @param digest The digest used for signing.
- * @param signature The signature to be verified.
- * @return the observable to the KeyVerifyResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable verifyAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature);
-
- /**
- * Verifies a signature using a specified key.
- * The VERIFY operation is applicable to symmetric keys stored in Azure Key Vault. VERIFY is not strictly necessary for asymmetric keys stored in Azure Key Vault since signature verification can be performed using the public portion of the key but this operation is supported as a convenience for callers that only have a key-reference and not the public portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm The signing/verification algorithm. For more information on possible algorithm types, see JsonWebKeySignatureAlgorithm. Possible values include: 'RS256', 'RS384', 'RS512', 'RSNULL'
- * @param digest The digest used for signing.
- * @param signature The signature to be verified.
- * @return the observable to the KeyVerifyResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> verifyWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature);
-
- /**
- * Wraps a symmetric key using a specified key.
- * The WRAP operation supports encryption of a symmetric key using a key encryption key that has previously been stored in an Azure Key Vault. The WRAP operation is only strictly necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed using the public portion of the key. This operation is supported for asymmetric keys as a convenience for callers that have a key-reference but do not have access to the public key material.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the KeyOperationResult object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyOperationResult wrapKey(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Wraps a symmetric key using a specified key.
- * The WRAP operation supports encryption of a symmetric key using a key encryption key that has previously been stored in an Azure Key Vault. The WRAP operation is only strictly necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed using the public portion of the key. This operation is supported for asymmetric keys as a convenience for callers that have a key-reference but do not have access to the public key material.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture wrapKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value, final ServiceCallback serviceCallback);
-
- /**
- * Wraps a symmetric key using a specified key.
- * The WRAP operation supports encryption of a symmetric key using a key encryption key that has previously been stored in an Azure Key Vault. The WRAP operation is only strictly necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed using the public portion of the key. This operation is supported for asymmetric keys as a convenience for callers that have a key-reference but do not have access to the public key material.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the observable to the KeyOperationResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable wrapKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Wraps a symmetric key using a specified key.
- * The WRAP operation supports encryption of a symmetric key using a key encryption key that has previously been stored in an Azure Key Vault. The WRAP operation is only strictly necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed using the public portion of the key. This operation is supported for asymmetric keys as a convenience for callers that have a key-reference but do not have access to the public key material.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the observable to the KeyOperationResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> wrapKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Unwraps a symmetric key using the specified key that was initially used for wrapping that key.
- * The UNWRAP operation supports decryption of a symmetric key using the target key encryption key. This operation is the reverse of the WRAP operation. The UNWRAP operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the KeyOperationResult object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- KeyOperationResult unwrapKey(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Unwraps a symmetric key using the specified key that was initially used for wrapping that key.
- * The UNWRAP operation supports decryption of a symmetric key using the target key encryption key. This operation is the reverse of the WRAP operation. The UNWRAP operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture unwrapKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value, final ServiceCallback serviceCallback);
-
- /**
- * Unwraps a symmetric key using the specified key that was initially used for wrapping that key.
- * The UNWRAP operation supports decryption of a symmetric key using the target key encryption key. This operation is the reverse of the WRAP operation. The UNWRAP operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the observable to the KeyOperationResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable unwrapKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Unwraps a symmetric key using the specified key that was initially used for wrapping that key.
- * The UNWRAP operation supports decryption of a symmetric key using the target key encryption key. This operation is the reverse of the WRAP operation. The UNWRAP operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param keyName The name of the key.
- * @param keyVersion The version of the key.
- * @param algorithm algorithm identifier. Possible values include: 'RSA-OAEP', 'RSA1_5'
- * @param value the Base64Url value
- * @return the observable to the KeyOperationResult object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> unwrapKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeyEncryptionAlgorithm algorithm, byte[] value);
-
- /**
- * Sets a secret in a specified key vault.
- * The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param value The value of the secret.
- * @return the SecretBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- SecretBundle setSecret(String vaultBaseUrl, String secretName, String value);
-
- /**
- * Sets a secret in a specified key vault.
- * The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param value The value of the secret.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture setSecretAsync(String vaultBaseUrl, String secretName, String value, final ServiceCallback serviceCallback);
-
- /**
- * Sets a secret in a specified key vault.
- * The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param value The value of the secret.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable setSecretAsync(String vaultBaseUrl, String secretName, String value);
-
- /**
- * Sets a secret in a specified key vault.
- * The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param value The value of the secret.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> setSecretWithServiceResponseAsync(String vaultBaseUrl, String secretName, String value);
-
- /**
- * Sets a secret in a specified key vault.
- * The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param value The value of the secret.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @param contentType Type of the secret value such as a password.
- * @param secretAttributes The secret management attributes.
- * @return the SecretBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- SecretBundle setSecret(String vaultBaseUrl, String secretName, String value, Map tags, String contentType, SecretAttributes secretAttributes);
-
- /**
- * Sets a secret in a specified key vault.
- * The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param value The value of the secret.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @param contentType Type of the secret value such as a password.
- * @param secretAttributes The secret management attributes.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture setSecretAsync(String vaultBaseUrl, String secretName, String value, Map tags, String contentType, SecretAttributes secretAttributes, final ServiceCallback serviceCallback);
-
- /**
- * Sets a secret in a specified key vault.
- * The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param value The value of the secret.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @param contentType Type of the secret value such as a password.
- * @param secretAttributes The secret management attributes.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable setSecretAsync(String vaultBaseUrl, String secretName, String value, Map tags, String contentType, SecretAttributes secretAttributes);
-
- /**
- * Sets a secret in a specified key vault.
- * The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param value The value of the secret.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @param contentType Type of the secret value such as a password.
- * @param secretAttributes The secret management attributes.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> setSecretWithServiceResponseAsync(String vaultBaseUrl, String secretName, String value, Map tags, String contentType, SecretAttributes secretAttributes);
-
- /**
- * Deletes a secret from a specified key vault.
- * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @return the SecretBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- SecretBundle deleteSecret(String vaultBaseUrl, String secretName);
-
- /**
- * Deletes a secret from a specified key vault.
- * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture deleteSecretAsync(String vaultBaseUrl, String secretName, final ServiceCallback serviceCallback);
-
- /**
- * Deletes a secret from a specified key vault.
- * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable deleteSecretAsync(String vaultBaseUrl, String secretName);
-
- /**
- * Deletes a secret from a specified key vault.
- * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an individual version of a secret.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> deleteSecretWithServiceResponseAsync(String vaultBaseUrl, String secretName);
-
- /**
- * Updates the attributes associated with a specified secret in a given key vault.
- * The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @return the SecretBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- SecretBundle updateSecret(String vaultBaseUrl, String secretName, String secretVersion);
-
- /**
- * Updates the attributes associated with a specified secret in a given key vault.
- * The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture updateSecretAsync(String vaultBaseUrl, String secretName, String secretVersion, final ServiceCallback serviceCallback);
-
- /**
- * Updates the attributes associated with a specified secret in a given key vault.
- * The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable updateSecretAsync(String vaultBaseUrl, String secretName, String secretVersion);
-
- /**
- * Updates the attributes associated with a specified secret in a given key vault.
- * The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> updateSecretWithServiceResponseAsync(String vaultBaseUrl, String secretName, String secretVersion);
-
- /**
- * Updates the attributes associated with a specified secret in a given key vault.
- * The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @param contentType Type of the secret value such as a password.
- * @param secretAttributes The secret management attributes.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the SecretBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- SecretBundle updateSecret(String vaultBaseUrl, String secretName, String secretVersion, String contentType, SecretAttributes secretAttributes, Map tags);
-
- /**
- * Updates the attributes associated with a specified secret in a given key vault.
- * The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @param contentType Type of the secret value such as a password.
- * @param secretAttributes The secret management attributes.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture updateSecretAsync(String vaultBaseUrl, String secretName, String secretVersion, String contentType, SecretAttributes secretAttributes, Map tags, final ServiceCallback serviceCallback);
-
- /**
- * Updates the attributes associated with a specified secret in a given key vault.
- * The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @param contentType Type of the secret value such as a password.
- * @param secretAttributes The secret management attributes.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable updateSecretAsync(String vaultBaseUrl, String secretName, String secretVersion, String contentType, SecretAttributes secretAttributes, Map tags);
-
- /**
- * Updates the attributes associated with a specified secret in a given key vault.
- * The UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not specified in the request are left unchanged. The value of a secret itself cannot be changed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @param contentType Type of the secret value such as a password.
- * @param secretAttributes The secret management attributes.
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> updateSecretWithServiceResponseAsync(String vaultBaseUrl, String secretName, String secretVersion, String contentType, SecretAttributes secretAttributes, Map tags);
-
- /**
- * Get a specified secret from a given key vault.
- * The GET operation is applicable to any secret stored in Azure Key Vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @return the SecretBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- SecretBundle getSecret(String vaultBaseUrl, String secretName, String secretVersion);
-
- /**
- * Get a specified secret from a given key vault.
- * The GET operation is applicable to any secret stored in Azure Key Vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture getSecretAsync(String vaultBaseUrl, String secretName, String secretVersion, final ServiceCallback serviceCallback);
-
- /**
- * Get a specified secret from a given key vault.
- * The GET operation is applicable to any secret stored in Azure Key Vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable getSecretAsync(String vaultBaseUrl, String secretName, String secretVersion);
-
- /**
- * Get a specified secret from a given key vault.
- * The GET operation is applicable to any secret stored in Azure Key Vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param secretVersion The version of the secret.
- * @return the observable to the SecretBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getSecretWithServiceResponseAsync(String vaultBaseUrl, String secretName, String secretVersion);
-
- /**
- * List secrets in a specified key vault.
- * The LIST operation is applicable to the entire vault, however only the base secret identifier and attributes are provided in the response. Individual secret versions are not listed in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the PagedList<SecretItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getSecrets(final String vaultBaseUrl);
-
- /**
- * List secrets in a specified key vault.
- * The LIST operation is applicable to the entire vault, however only the base secret identifier and attributes are provided in the response. Individual secret versions are not listed in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getSecretsAsync(final String vaultBaseUrl, final ListOperationCallback serviceCallback);
-
- /**
- * List secrets in a specified key vault.
- * The LIST operation is applicable to the entire vault, however only the base secret identifier and attributes are provided in the response. Individual secret versions are not listed in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the PagedList<SecretItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getSecretsAsync(final String vaultBaseUrl);
-
- /**
- * List secrets in a specified key vault.
- * The LIST operation is applicable to the entire vault, however only the base secret identifier and attributes are provided in the response. Individual secret versions are not listed in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the PagedList<SecretItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getSecretsWithServiceResponseAsync(final String vaultBaseUrl);
-
- /**
- * List secrets in a specified key vault.
- * The LIST operation is applicable to the entire vault, however only the base secret identifier and attributes are provided in the response. Individual secret versions are not listed in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the PagedList<SecretItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getSecrets(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * List secrets in a specified key vault.
- * The LIST operation is applicable to the entire vault, however only the base secret identifier and attributes are provided in the response. Individual secret versions are not listed in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getSecretsAsync(final String vaultBaseUrl, final Integer maxresults, final ListOperationCallback serviceCallback);
-
- /**
- * List secrets in a specified key vault.
- * The LIST operation is applicable to the entire vault, however only the base secret identifier and attributes are provided in the response. Individual secret versions are not listed in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<SecretItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getSecretsAsync(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * List secrets in a specified key vault.
- * The LIST operation is applicable to the entire vault, however only the base secret identifier and attributes are provided in the response. Individual secret versions are not listed in the response.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<SecretItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getSecretsWithServiceResponseAsync(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * List the versions of the specified secret.
- * The LIST VERSIONS operation can be applied to all versions having the same secret name in the same key vault. The full secret identifier and attributes are provided in the response. No values are returned for the secrets and only current versions of a secret are listed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @return the PagedList<SecretItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getSecretVersions(final String vaultBaseUrl, final String secretName);
-
- /**
- * List the versions of the specified secret.
- * The LIST VERSIONS operation can be applied to all versions having the same secret name in the same key vault. The full secret identifier and attributes are provided in the response. No values are returned for the secrets and only current versions of a secret are listed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getSecretVersionsAsync(final String vaultBaseUrl, final String secretName, final ListOperationCallback serviceCallback);
-
- /**
- * List the versions of the specified secret.
- * The LIST VERSIONS operation can be applied to all versions having the same secret name in the same key vault. The full secret identifier and attributes are provided in the response. No values are returned for the secrets and only current versions of a secret are listed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @return the observable to the PagedList<SecretItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getSecretVersionsAsync(final String vaultBaseUrl, final String secretName);
-
- /**
- * List the versions of the specified secret.
- * The LIST VERSIONS operation can be applied to all versions having the same secret name in the same key vault. The full secret identifier and attributes are provided in the response. No values are returned for the secrets and only current versions of a secret are listed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @return the observable to the PagedList<SecretItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getSecretVersionsWithServiceResponseAsync(final String vaultBaseUrl, final String secretName);
-
- /**
- * List the versions of the specified secret.
- * The LIST VERSIONS operation can be applied to all versions having the same secret name in the same key vault. The full secret identifier and attributes are provided in the response. No values are returned for the secrets and only current versions of a secret are listed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the PagedList<SecretItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getSecretVersions(final String vaultBaseUrl, final String secretName, final Integer maxresults);
-
- /**
- * List the versions of the specified secret.
- * The LIST VERSIONS operation can be applied to all versions having the same secret name in the same key vault. The full secret identifier and attributes are provided in the response. No values are returned for the secrets and only current versions of a secret are listed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getSecretVersionsAsync(final String vaultBaseUrl, final String secretName, final Integer maxresults, final ListOperationCallback serviceCallback);
-
- /**
- * List the versions of the specified secret.
- * The LIST VERSIONS operation can be applied to all versions having the same secret name in the same key vault. The full secret identifier and attributes are provided in the response. No values are returned for the secrets and only current versions of a secret are listed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<SecretItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getSecretVersionsAsync(final String vaultBaseUrl, final String secretName, final Integer maxresults);
-
- /**
- * List the versions of the specified secret.
- * The LIST VERSIONS operation can be applied to all versions having the same secret name in the same key vault. The full secret identifier and attributes are provided in the response. No values are returned for the secrets and only current versions of a secret are listed.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param secretName The name of the secret.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<SecretItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getSecretVersionsWithServiceResponseAsync(final String vaultBaseUrl, final String secretName, final Integer maxresults);
-
- /**
- * List certificates in a specified key vault.
- * The GetCertificates operation returns the set of certificates resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the PagedList<CertificateItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getCertificates(final String vaultBaseUrl);
-
- /**
- * List certificates in a specified key vault.
- * The GetCertificates operation returns the set of certificates resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getCertificatesAsync(final String vaultBaseUrl, final ListOperationCallback serviceCallback);
-
- /**
- * List certificates in a specified key vault.
- * The GetCertificates operation returns the set of certificates resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the PagedList<CertificateItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getCertificatesAsync(final String vaultBaseUrl);
-
- /**
- * List certificates in a specified key vault.
- * The GetCertificates operation returns the set of certificates resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the PagedList<CertificateItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getCertificatesWithServiceResponseAsync(final String vaultBaseUrl);
-
- /**
- * List certificates in a specified key vault.
- * The GetCertificates operation returns the set of certificates resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the PagedList<CertificateItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getCertificates(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * List certificates in a specified key vault.
- * The GetCertificates operation returns the set of certificates resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getCertificatesAsync(final String vaultBaseUrl, final Integer maxresults, final ListOperationCallback serviceCallback);
-
- /**
- * List certificates in a specified key vault.
- * The GetCertificates operation returns the set of certificates resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<CertificateItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getCertificatesAsync(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * List certificates in a specified key vault.
- * The GetCertificates operation returns the set of certificates resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<CertificateItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getCertificatesWithServiceResponseAsync(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * Deletes a certificate from a specified key vault.
- * Deletes all versions of a certificate object along with its associated policy. Delete certificate cannot be used to remove individual versions of a certificate object.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param certificateName The name of the certificate.
- * @return the CertificateBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- CertificateBundle deleteCertificate(String vaultBaseUrl, String certificateName);
-
- /**
- * Deletes a certificate from a specified key vault.
- * Deletes all versions of a certificate object along with its associated policy. Delete certificate cannot be used to remove individual versions of a certificate object.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param certificateName The name of the certificate.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture deleteCertificateAsync(String vaultBaseUrl, String certificateName, final ServiceCallback serviceCallback);
-
- /**
- * Deletes a certificate from a specified key vault.
- * Deletes all versions of a certificate object along with its associated policy. Delete certificate cannot be used to remove individual versions of a certificate object.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param certificateName The name of the certificate.
- * @return the observable to the CertificateBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable deleteCertificateAsync(String vaultBaseUrl, String certificateName);
-
- /**
- * Deletes a certificate from a specified key vault.
- * Deletes all versions of a certificate object along with its associated policy. Delete certificate cannot be used to remove individual versions of a certificate object.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param certificateName The name of the certificate.
- * @return the observable to the CertificateBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> deleteCertificateWithServiceResponseAsync(String vaultBaseUrl, String certificateName);
-
- /**
- * Sets the certificate contacts for the specified key vault.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param contacts The contacts for the key vault certificate.
- * @return the Contacts object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- Contacts setCertificateContacts(String vaultBaseUrl, Contacts contacts);
-
- /**
- * Sets the certificate contacts for the specified key vault.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param contacts The contacts for the key vault certificate.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture setCertificateContactsAsync(String vaultBaseUrl, Contacts contacts, final ServiceCallback serviceCallback);
-
- /**
- * Sets the certificate contacts for the specified key vault.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param contacts The contacts for the key vault certificate.
- * @return the observable to the Contacts object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable setCertificateContactsAsync(String vaultBaseUrl, Contacts contacts);
-
- /**
- * Sets the certificate contacts for the specified key vault.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param contacts The contacts for the key vault certificate.
- * @return the observable to the Contacts object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> setCertificateContactsWithServiceResponseAsync(String vaultBaseUrl, Contacts contacts);
-
- /**
- * Lists the certificate contacts for a specified key vault.
- * The GetCertificateContacts operation returns the set of certificate contact resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the Contacts object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- Contacts getCertificateContacts(String vaultBaseUrl);
-
- /**
- * Lists the certificate contacts for a specified key vault.
- * The GetCertificateContacts operation returns the set of certificate contact resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture getCertificateContactsAsync(String vaultBaseUrl, final ServiceCallback serviceCallback);
-
- /**
- * Lists the certificate contacts for a specified key vault.
- * The GetCertificateContacts operation returns the set of certificate contact resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the Contacts object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable getCertificateContactsAsync(String vaultBaseUrl);
-
- /**
- * Lists the certificate contacts for a specified key vault.
- * The GetCertificateContacts operation returns the set of certificate contact resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the Contacts object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getCertificateContactsWithServiceResponseAsync(String vaultBaseUrl);
-
- /**
- * Deletes the certificate contacts for a specified key vault.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the Contacts object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- Contacts deleteCertificateContacts(String vaultBaseUrl);
-
- /**
- * Deletes the certificate contacts for a specified key vault.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture deleteCertificateContactsAsync(String vaultBaseUrl, final ServiceCallback serviceCallback);
-
- /**
- * Deletes the certificate contacts for a specified key vault.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the Contacts object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable deleteCertificateContactsAsync(String vaultBaseUrl);
-
- /**
- * Deletes the certificate contacts for a specified key vault.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the Contacts object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> deleteCertificateContactsWithServiceResponseAsync(String vaultBaseUrl);
-
- /**
- * List certificate issuers for a specified key vault.
- * The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the PagedList<CertificateIssuerItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getCertificateIssuers(final String vaultBaseUrl);
-
- /**
- * List certificate issuers for a specified key vault.
- * The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getCertificateIssuersAsync(final String vaultBaseUrl, final ListOperationCallback serviceCallback);
-
- /**
- * List certificate issuers for a specified key vault.
- * The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the PagedList<CertificateIssuerItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getCertificateIssuersAsync(final String vaultBaseUrl);
-
- /**
- * List certificate issuers for a specified key vault.
- * The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @return the observable to the PagedList<CertificateIssuerItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getCertificateIssuersWithServiceResponseAsync(final String vaultBaseUrl);
-
- /**
- * List certificate issuers for a specified key vault.
- * The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the PagedList<CertificateIssuerItem> object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- PagedList getCertificateIssuers(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * List certificate issuers for a specified key vault.
- * The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture> getCertificateIssuersAsync(final String vaultBaseUrl, final Integer maxresults, final ListOperationCallback serviceCallback);
-
- /**
- * List certificate issuers for a specified key vault.
- * The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<CertificateIssuerItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getCertificateIssuersAsync(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * List certificate issuers for a specified key vault.
- * The GetCertificateIssuers operation returns the set of certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param maxresults Maximum number of results to return in a page. If not specified the service will return up to 25 results.
- * @return the observable to the PagedList<CertificateIssuerItem> object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable>> getCertificateIssuersWithServiceResponseAsync(final String vaultBaseUrl, final Integer maxresults);
-
- /**
- * Sets the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @return the IssuerBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- IssuerBundle setCertificateIssuer(String vaultBaseUrl, String issuerName, String provider);
-
- /**
- * Sets the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture setCertificateIssuerAsync(String vaultBaseUrl, String issuerName, String provider, final ServiceCallback serviceCallback);
-
- /**
- * Sets the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable setCertificateIssuerAsync(String vaultBaseUrl, String issuerName, String provider);
-
- /**
- * Sets the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> setCertificateIssuerWithServiceResponseAsync(String vaultBaseUrl, String issuerName, String provider);
-
- /**
- * Sets the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @param credentials The credentials to be used for the issuer.
- * @param organizationDetails Details of the organization as provided to the issuer.
- * @param attributes Attributes of the issuer object.
- * @return the IssuerBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- IssuerBundle setCertificateIssuer(String vaultBaseUrl, String issuerName, String provider, IssuerCredentials credentials, OrganizationDetails organizationDetails, IssuerAttributes attributes);
-
- /**
- * Sets the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @param credentials The credentials to be used for the issuer.
- * @param organizationDetails Details of the organization as provided to the issuer.
- * @param attributes Attributes of the issuer object.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture setCertificateIssuerAsync(String vaultBaseUrl, String issuerName, String provider, IssuerCredentials credentials, OrganizationDetails organizationDetails, IssuerAttributes attributes, final ServiceCallback serviceCallback);
-
- /**
- * Sets the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @param credentials The credentials to be used for the issuer.
- * @param organizationDetails Details of the organization as provided to the issuer.
- * @param attributes Attributes of the issuer object.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable setCertificateIssuerAsync(String vaultBaseUrl, String issuerName, String provider, IssuerCredentials credentials, OrganizationDetails organizationDetails, IssuerAttributes attributes);
-
- /**
- * Sets the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @param credentials The credentials to be used for the issuer.
- * @param organizationDetails Details of the organization as provided to the issuer.
- * @param attributes Attributes of the issuer object.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> setCertificateIssuerWithServiceResponseAsync(String vaultBaseUrl, String issuerName, String provider, IssuerCredentials credentials, OrganizationDetails organizationDetails, IssuerAttributes attributes);
-
- /**
- * Updates the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @return the IssuerBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- IssuerBundle updateCertificateIssuer(String vaultBaseUrl, String issuerName);
-
- /**
- * Updates the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture updateCertificateIssuerAsync(String vaultBaseUrl, String issuerName, final ServiceCallback serviceCallback);
-
- /**
- * Updates the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable updateCertificateIssuerAsync(String vaultBaseUrl, String issuerName);
-
- /**
- * Updates the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> updateCertificateIssuerWithServiceResponseAsync(String vaultBaseUrl, String issuerName);
-
- /**
- * Updates the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @param credentials The credentials to be used for the issuer.
- * @param organizationDetails Details of the organization as provided to the issuer.
- * @param attributes Attributes of the issuer object.
- * @return the IssuerBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- IssuerBundle updateCertificateIssuer(String vaultBaseUrl, String issuerName, String provider, IssuerCredentials credentials, OrganizationDetails organizationDetails, IssuerAttributes attributes);
-
- /**
- * Updates the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @param credentials The credentials to be used for the issuer.
- * @param organizationDetails Details of the organization as provided to the issuer.
- * @param attributes Attributes of the issuer object.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture updateCertificateIssuerAsync(String vaultBaseUrl, String issuerName, String provider, IssuerCredentials credentials, OrganizationDetails organizationDetails, IssuerAttributes attributes, final ServiceCallback serviceCallback);
-
- /**
- * Updates the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @param credentials The credentials to be used for the issuer.
- * @param organizationDetails Details of the organization as provided to the issuer.
- * @param attributes Attributes of the issuer object.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable updateCertificateIssuerAsync(String vaultBaseUrl, String issuerName, String provider, IssuerCredentials credentials, OrganizationDetails organizationDetails, IssuerAttributes attributes);
-
- /**
- * Updates the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param provider The issuer provider.
- * @param credentials The credentials to be used for the issuer.
- * @param organizationDetails Details of the organization as provided to the issuer.
- * @param attributes Attributes of the issuer object.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> updateCertificateIssuerWithServiceResponseAsync(String vaultBaseUrl, String issuerName, String provider, IssuerCredentials credentials, OrganizationDetails organizationDetails, IssuerAttributes attributes);
-
- /**
- * Lists the specified certificate issuer.
- * The GetCertificateIssuer operation returns the specified certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @return the IssuerBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- IssuerBundle getCertificateIssuer(String vaultBaseUrl, String issuerName);
-
- /**
- * Lists the specified certificate issuer.
- * The GetCertificateIssuer operation returns the specified certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture getCertificateIssuerAsync(String vaultBaseUrl, String issuerName, final ServiceCallback serviceCallback);
-
- /**
- * Lists the specified certificate issuer.
- * The GetCertificateIssuer operation returns the specified certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable getCertificateIssuerAsync(String vaultBaseUrl, String issuerName);
-
- /**
- * Lists the specified certificate issuer.
- * The GetCertificateIssuer operation returns the specified certificate issuer resources in the specified key vault.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> getCertificateIssuerWithServiceResponseAsync(String vaultBaseUrl, String issuerName);
-
- /**
- * Deletes the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @return the IssuerBundle object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- IssuerBundle deleteCertificateIssuer(String vaultBaseUrl, String issuerName);
-
- /**
- * Deletes the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture deleteCertificateIssuerAsync(String vaultBaseUrl, String issuerName, final ServiceCallback serviceCallback);
-
- /**
- * Deletes the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable deleteCertificateIssuerAsync(String vaultBaseUrl, String issuerName);
-
- /**
- * Deletes the specified certificate issuer.
- * .
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param issuerName The name of the issuer.
- * @return the observable to the IssuerBundle object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> deleteCertificateIssuerWithServiceResponseAsync(String vaultBaseUrl, String issuerName);
-
- /**
- * Creates a new certificate.
- * If this is the first version, the certificate resource is created.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param certificateName The name of the certificate.
- * @return the CertificateOperation object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- CertificateOperation createCertificate(String vaultBaseUrl, String certificateName);
-
- /**
- * Creates a new certificate.
- * If this is the first version, the certificate resource is created.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param certificateName The name of the certificate.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture createCertificateAsync(String vaultBaseUrl, String certificateName, final ServiceCallback serviceCallback);
-
- /**
- * Creates a new certificate.
- * If this is the first version, the certificate resource is created.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param certificateName The name of the certificate.
- * @return the observable to the CertificateOperation object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable createCertificateAsync(String vaultBaseUrl, String certificateName);
-
- /**
- * Creates a new certificate.
- * If this is the first version, the certificate resource is created.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param certificateName The name of the certificate.
- * @return the observable to the CertificateOperation object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- Observable> createCertificateWithServiceResponseAsync(String vaultBaseUrl, String certificateName);
-
- /**
- * Creates a new certificate.
- * If this is the first version, the certificate resource is created.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param certificateName The name of the certificate.
- * @param certificatePolicy The management policy for the certificate.
- * @param certificateAttributes The attributes of the certificate (optional).
- * @param tags Application specific metadata in the form of key-value pairs.
- * @return the CertificateOperation object if successful.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws KeyVaultErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- CertificateOperation createCertificate(String vaultBaseUrl, String certificateName, CertificatePolicy certificatePolicy, CertificateAttributes certificateAttributes, Map tags);
-
- /**
- * Creates a new certificate.
- * If this is the first version, the certificate resource is created.
- *
- * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
- * @param certificateName The name of the certificate.
- * @param certificatePolicy The management policy for the certificate.
- * @param certificateAttributes The attributes of the certificate (optional).
- * @param tags Application specific metadata in the form of key-value pairs.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @return the {@link ServiceFuture} object
- * @throws IllegalArgumentException thrown if parameters fail the validation
- */
- ServiceFuture