Add Azure KeyVault support

This commit is contained in:
Jim Spring 2017-12-22 18:37:08 -08:00 committed by Ignasi Barrera
parent ac5f3a1452
commit a2dee2f84c
114 changed files with 6862 additions and 306 deletions

View File

@ -41,6 +41,7 @@ import org.jclouds.azurecompute.arm.features.ResourceProviderApi;
import org.jclouds.azurecompute.arm.features.StorageAccountApi;
import org.jclouds.azurecompute.arm.features.SubnetApi;
import org.jclouds.azurecompute.arm.features.VMSizeApi;
import org.jclouds.azurecompute.arm.features.VaultApi;
import org.jclouds.azurecompute.arm.features.VirtualMachineApi;
import org.jclouds.azurecompute.arm.features.VirtualMachineScaleSetApi;
import org.jclouds.azurecompute.arm.features.VirtualNetworkApi;
@ -242,7 +243,7 @@ public interface AzureComputeApi extends Closeable {
*/
@Delegate
MetricDefinitionsApi getMetricsDefinitionsApi(@PathParam("resourceid") String resourceid);
/**
* The Azure Active Directory Graph API provides programmatic access to Azure
* AD through REST API endpoints.
@ -252,6 +253,15 @@ public interface AzureComputeApi extends Closeable {
@Delegate
GraphRBACApi getGraphRBACApi();
/**
* Managing your key vaults as well as the keys, secrets, and certificates within your key vaults can be
* accomplished through a REST interface.
*
* @see <a href="https://docs.microsoft.com/en-us/rest/api/keyvault/">docs</a>
*/
@Delegate
VaultApi getVaultApi(@PathParam("resourcegroup") String resourcegroup);
/**
* Returns the information about the current service principal.
*/

View File

@ -57,6 +57,7 @@ import org.jclouds.azurecompute.arm.features.ResourceProviderApi;
import org.jclouds.azurecompute.arm.features.StorageAccountApi;
import org.jclouds.azurecompute.arm.features.SubnetApi;
import org.jclouds.azurecompute.arm.features.VMSizeApi;
import org.jclouds.azurecompute.arm.features.VaultApi;
import org.jclouds.azurecompute.arm.features.VirtualMachineApi;
import org.jclouds.azurecompute.arm.features.VirtualMachineScaleSetApi;
import org.jclouds.azurecompute.arm.features.VirtualNetworkApi;
@ -126,6 +127,7 @@ public class AzureComputeProviderMetadata extends BaseProviderMetadata {
properties.put(API_VERSION_PREFIX + MetricsApi.class.getSimpleName(), "2016-09-01");
properties.put(API_VERSION_PREFIX + VirtualMachineScaleSetApi.class.getSimpleName(), "2017-03-30");
properties.put(API_VERSION_PREFIX + GraphRBACApi.class.getSimpleName(), "1.6");
properties.put(API_VERSION_PREFIX + VaultApi.class.getSimpleName(), "2016-10-01");
return properties;
}

View File

@ -23,6 +23,7 @@ import java.util.Properties;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.azurecompute.arm.compute.config.AzureComputeServiceContextModule;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule;
import org.jclouds.azurecompute.arm.config.AzureComputeHttpApiModule;
import org.jclouds.azurecompute.arm.config.AzureComputeParserModule;
import org.jclouds.azurecompute.arm.config.AzureComputeRateLimitModule;
@ -80,6 +81,7 @@ public class AzureManagementApiMetadata extends BaseHttpApiMetadata<AzureCompute
.add(AzureComputeParserModule.class)
.add(AzureComputeHttpApiModule.class)
.add(AzureComputeServiceContextModule.class)
.add(AzurePredicatesModule.class)
.add(AzureComputeRateLimitModule.class)
.build());
}

View File

@ -45,7 +45,7 @@ import javax.inject.Named;
import javax.inject.Singleton;
import org.jclouds.azurecompute.arm.AzureComputeApi;
import org.jclouds.azurecompute.arm.compute.config.AzureComputeServiceContextModule.PublicIpAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.PublicIpAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
import org.jclouds.azurecompute.arm.compute.functions.CustomImageToVMImage;
import org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions;

View File

@ -16,22 +16,8 @@
*/
package org.jclouds.azurecompute.arm.compute.config;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.OPERATION_TIMEOUT;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_IMAGE_AVAILABLE;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_RUNNING;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_SUSPENDED;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_TERMINATED;
import static org.jclouds.util.Predicates2.retry;
import java.net.URI;
import java.util.List;
import javax.inject.Named;
import javax.inject.Singleton;
import org.jclouds.azurecompute.arm.AzureComputeApi;
import org.jclouds.azurecompute.arm.compute.AzureComputeService;
import org.jclouds.azurecompute.arm.compute.AzureComputeServiceAdapter;
import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndNameAndIngressRules;
@ -47,20 +33,13 @@ import org.jclouds.azurecompute.arm.compute.loaders.CreateSecurityGroupIfNeeded;
import org.jclouds.azurecompute.arm.compute.loaders.DefaultResourceGroup;
import org.jclouds.azurecompute.arm.compute.options.AzureTemplateOptions;
import org.jclouds.azurecompute.arm.compute.strategy.CreateResourcesThenCreateNodes;
import org.jclouds.azurecompute.arm.domain.Image;
import org.jclouds.azurecompute.arm.domain.Location;
import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
import org.jclouds.azurecompute.arm.domain.Provisionable;
import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
import org.jclouds.azurecompute.arm.domain.ResourceDefinition;
import org.jclouds.azurecompute.arm.domain.ResourceGroup;
import org.jclouds.azurecompute.arm.domain.VMHardware;
import org.jclouds.azurecompute.arm.domain.VMImage;
import org.jclouds.azurecompute.arm.domain.VirtualMachine;
import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance;
import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance.PowerState;
import org.jclouds.azurecompute.arm.functions.ParseJobStatus;
import org.jclouds.compute.ComputeService;
import org.jclouds.compute.ComputeServiceAdapter;
import org.jclouds.compute.config.ComputeServiceAdapterContextModule;
@ -72,15 +51,10 @@ import org.jclouds.compute.extensions.SecurityGroupExtension;
import org.jclouds.compute.functions.NodeAndTemplateOptionsToStatement;
import org.jclouds.compute.functions.NodeAndTemplateOptionsToStatementWithoutPublicKey;
import org.jclouds.compute.options.TemplateOptions;
import org.jclouds.compute.reference.ComputeServiceConstants.PollPeriod;
import org.jclouds.compute.reference.ComputeServiceConstants.Timeouts;
import org.jclouds.compute.strategy.CreateNodesInGroupThenAddToSet;
import org.jclouds.net.domain.IpPermission;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import com.google.common.base.Supplier;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
@ -141,247 +115,4 @@ public class AzureComputeServiceContextModule extends
protected final LoadingCache<String, ResourceGroup> defaultResourceGroup(CacheLoader<String, ResourceGroup> in) {
return CacheBuilder.newBuilder().build(in);
}
@Provides
@Named(TIMEOUT_NODE_RUNNING)
protected VirtualMachineInStatePredicateFactory provideVirtualMachineRunningPredicate(final AzureComputeApi api,
final Timeouts timeouts, final PollPeriod pollPeriod) {
return new VirtualMachineInStatePredicateFactory(api, PowerState.RUNNING, timeouts.nodeRunning,
pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
@Provides
@Named(TIMEOUT_NODE_TERMINATED)
protected Predicate<URI> provideNodeTerminatedPredicate(final AzureComputeApi api, final Timeouts timeouts,
final PollPeriod pollPeriod) {
return retry(new ActionDonePredicate(api), timeouts.nodeTerminated, pollPeriod.pollInitialPeriod,
pollPeriod.pollMaxPeriod);
}
@Provides
@Named(TIMEOUT_IMAGE_AVAILABLE)
protected Predicate<URI> provideImageCapturedPredicate(final AzureComputeApi api, final Timeouts timeouts,
final PollPeriod pollPeriod) {
return retry(new ImageCapturedPredicate(api), timeouts.imageAvailable, pollPeriod.pollInitialPeriod,
pollPeriod.pollMaxPeriod);
}
@Provides
@Named(TIMEOUT_RESOURCE_DELETED)
protected Predicate<URI> provideResourceDeletedPredicate(final AzureComputeApi api, final Timeouts timeouts,
final PollPeriod pollPeriod) {
return retry(new ActionDonePredicate(api), timeouts.nodeTerminated, pollPeriod.pollInitialPeriod,
pollPeriod.pollMaxPeriod);
}
@Provides
@Named(TIMEOUT_NODE_SUSPENDED)
protected VirtualMachineInStatePredicateFactory provideNodeSuspendedPredicate(final AzureComputeApi api,
final Timeouts timeouts, final PollPeriod pollPeriod) {
return new VirtualMachineInStatePredicateFactory(api, PowerState.STOPPED, timeouts.nodeTerminated,
pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
@Provides
protected PublicIpAvailablePredicateFactory providePublicIpAvailablePredicate(final AzureComputeApi api,
Predicate<Supplier<Provisionable>> resourceAvailable) {
return new PublicIpAvailablePredicateFactory(api, resourceAvailable);
}
@Provides
protected SecurityGroupAvailablePredicateFactory provideSecurityGroupAvailablePredicate(final AzureComputeApi api,
Predicate<Supplier<Provisionable>> resourceAvailable) {
return new SecurityGroupAvailablePredicateFactory(api, resourceAvailable);
}
@Provides
protected ImageAvailablePredicateFactory provideImageAvailablePredicate(final AzureComputeApi api,
Predicate<Supplier<Provisionable>> resourceAvailable, final Timeouts timeouts, final PollPeriod pollPeriod) {
return new ImageAvailablePredicateFactory(api, retry(new ResourceInStatusPredicate("Succeeded"),
timeouts.imageAvailable, pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod));
}
@Provides
protected Predicate<Supplier<Provisionable>> provideResourceAvailablePredicate(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout, PollPeriod pollPeriod) {
return retry(new ResourceInStatusPredicate("Succeeded"), operationTimeout, pollPeriod.pollInitialPeriod,
pollPeriod.pollMaxPeriod);
}
@Provides
@Named("STORAGE")
protected Predicate<URI> provideStorageAccountAvailablePredicate(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout, PollPeriod pollPeriod) {
return retry(new ActionDonePredicate(api), operationTimeout, pollPeriod.pollInitialPeriod,
pollPeriod.pollMaxPeriod);
}
@VisibleForTesting
static class ActionDonePredicate implements Predicate<URI> {
private final AzureComputeApi api;
public ActionDonePredicate(final AzureComputeApi api) {
this.api = checkNotNull(api, "api must not be null");
}
@Override
public boolean apply(final URI uri) {
checkNotNull(uri, "uri cannot be null");
return ParseJobStatus.JobStatus.DONE == api.getJobApi().jobStatus(uri)
|| ParseJobStatus.JobStatus.NO_CONTENT == api.getJobApi().jobStatus(uri);
}
}
@VisibleForTesting
static class ImageCapturedPredicate implements Predicate<URI> {
private final AzureComputeApi api;
public ImageCapturedPredicate(final AzureComputeApi api) {
this.api = checkNotNull(api, "api must not be null");
}
@Override
public boolean apply(final URI uri) {
checkNotNull(uri, "uri cannot be null");
if (api.getJobApi().jobStatus(uri) != ParseJobStatus.JobStatus.DONE) {
return false;
}
List<ResourceDefinition> definitions = api.getJobApi().captureStatus(uri);
return definitions != null;
}
}
public static class VirtualMachineInStatePredicateFactory {
private final AzureComputeApi api;
private final PowerState powerState;
private final long timeout;
private final long period;
private final long maxPeriod;
VirtualMachineInStatePredicateFactory(final AzureComputeApi api, final PowerState powerState, final long timeout,
final long period, final long maxPeriod) {
this.api = checkNotNull(api, "api cannot be null");
this.powerState = checkNotNull(powerState, "powerState cannot be null");
this.timeout = timeout;
this.period = period;
this.maxPeriod = maxPeriod;
}
public Predicate<String> create(final String azureGroup) {
return retry(new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
VirtualMachineInstance vmInstance = api.getVirtualMachineApi(azureGroup).getInstanceDetails(name);
if (vmInstance == null) {
return false;
}
return powerState == vmInstance.powerState();
}
}, timeout, period, maxPeriod);
}
}
public static class ResourceInStatusPredicate implements Predicate<Supplier<Provisionable>> {
private final String expectedStatus;
ResourceInStatusPredicate(String expectedStatus) {
this.expectedStatus = checkNotNull(expectedStatus, "expectedStatus cannot be null");
}
@Override
public boolean apply(Supplier<Provisionable> provisionableSupplier) {
checkNotNull(provisionableSupplier, "provisionableSupplier supplier cannot be null");
Provisionable provisionable = provisionableSupplier.get();
return provisionable != null && provisionable.provisioningState().equalsIgnoreCase(expectedStatus);
}
}
public static class PublicIpAvailablePredicateFactory {
private final AzureComputeApi api;
private final Predicate<Supplier<Provisionable>> resourceAvailable;
PublicIpAvailablePredicateFactory(final AzureComputeApi api, Predicate<Supplier<Provisionable>> resourceAvailable) {
this.api = checkNotNull(api, "api cannot be null");
this.resourceAvailable = resourceAvailable;
}
public Predicate<String> create(final String azureGroup) {
checkNotNull(azureGroup, "azureGroup cannot be null");
return new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
return resourceAvailable.apply(new Supplier<Provisionable>() {
@Override
public Provisionable get() {
PublicIPAddress publicIp = api.getPublicIPAddressApi(azureGroup).get(name);
return publicIp == null ? null : publicIp.properties();
}
});
}
};
}
}
public static class SecurityGroupAvailablePredicateFactory {
private final AzureComputeApi api;
private final Predicate<Supplier<Provisionable>> resourceAvailable;
SecurityGroupAvailablePredicateFactory(final AzureComputeApi api,
Predicate<Supplier<Provisionable>> resourceAvailable) {
this.api = checkNotNull(api, "api cannot be null");
this.resourceAvailable = resourceAvailable;
}
public Predicate<String> create(final String resourceGroup) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
return new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
return resourceAvailable.apply(new Supplier<Provisionable>() {
@Override
public Provisionable get() {
NetworkSecurityGroup sg = api.getNetworkSecurityGroupApi(resourceGroup).get(name);
return sg == null ? null : sg.properties();
}
});
}
};
}
}
public static class ImageAvailablePredicateFactory {
private final AzureComputeApi api;
private final Predicate<Supplier<Provisionable>> resourceAvailable;
ImageAvailablePredicateFactory(final AzureComputeApi api,
Predicate<Supplier<Provisionable>> resourceAvailable) {
this.api = checkNotNull(api, "api cannot be null");
this.resourceAvailable = resourceAvailable;
}
public Predicate<String> create(final String resourceGroup) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
return new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
return resourceAvailable.apply(new Supplier<Provisionable>() {
@Override
public Provisionable get() {
Image img = api.getVirtualMachineImageApi(resourceGroup).get(name);
return img == null ? null : img.properties();
}
});
}
};
}
}
}

View File

@ -0,0 +1,602 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.jclouds.azurecompute.arm.compute.config;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Predicate;
import com.google.common.base.Supplier;
import com.google.common.collect.Iterables;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.name.Named;
import org.jclouds.compute.reference.ComputeServiceConstants;
import org.jclouds.compute.reference.ComputeServiceConstants.PollPeriod;
import org.jclouds.azurecompute.arm.domain.Image;
import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
import org.jclouds.azurecompute.arm.domain.Provisionable;
import org.jclouds.azurecompute.arm.domain.PublicIPAddress;
import org.jclouds.azurecompute.arm.domain.ResourceDefinition;
import org.jclouds.azurecompute.arm.domain.Vault;
import org.jclouds.azurecompute.arm.domain.VirtualMachineInstance;
import org.jclouds.azurecompute.arm.functions.ParseJobStatus;
import org.jclouds.azurecompute.arm.AzureComputeApi;
import org.jclouds.azurecompute.arm.domain.Key.DeletedKeyBundle;
import org.jclouds.azurecompute.arm.domain.Key.KeyBundle;
import org.jclouds.azurecompute.arm.domain.Secret.DeletedSecretBundle;
import org.jclouds.azurecompute.arm.domain.Secret.SecretBundle;
import org.jclouds.azurecompute.arm.domain.Certificate.DeletedCertificateBundle;
import org.jclouds.azurecompute.arm.domain.Certificate.CertificateBundle;
import org.jclouds.azurecompute.arm.domain.Certificate.CertificateOperation;
import java.net.URI;
import java.util.List;
import static org.jclouds.util.Predicates2.retry;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_RUNNING;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_TERMINATED;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_NODE_SUSPENDED;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_IMAGE_AVAILABLE;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.OPERATION_TIMEOUT;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_DELETE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_KEY_DELETED_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_KEY_RECOVERABLE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_SECRET_DELETE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_SECRET_RECOVERABLE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_DELETE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_RECOVERABLE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_OPERATION_STATUS;
import static com.google.common.base.Preconditions.checkNotNull;
public class AzurePredicatesModule extends AbstractModule {
protected void configure() {
}
@Provides
@Named(TIMEOUT_NODE_RUNNING)
protected VirtualMachineInStatePredicateFactory provideVirtualMachineRunningPredicate(final AzureComputeApi api,
final ComputeServiceConstants.Timeouts timeouts, final PollPeriod pollPeriod) {
return new VirtualMachineInStatePredicateFactory(api, VirtualMachineInstance.PowerState.RUNNING, timeouts.nodeRunning,
pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
@Provides
@Named(TIMEOUT_NODE_TERMINATED)
protected Predicate<URI> provideNodeTerminatedPredicate(final AzureComputeApi api, final ComputeServiceConstants.Timeouts timeouts,
final PollPeriod pollPeriod) {
return retry(new ActionDonePredicate(api), timeouts.nodeTerminated, pollPeriod.pollInitialPeriod,
pollPeriod.pollMaxPeriod);
}
@Provides
@Named(TIMEOUT_IMAGE_AVAILABLE)
protected Predicate<URI> provideImageCapturedPredicate(final AzureComputeApi api, final ComputeServiceConstants.Timeouts timeouts,
final PollPeriod pollPeriod) {
return retry(new ImageCapturedPredicate(api), timeouts.imageAvailable, pollPeriod.pollInitialPeriod,
pollPeriod.pollMaxPeriod);
}
@Provides
@Named(TIMEOUT_RESOURCE_DELETED)
protected Predicate<URI> provideResourceDeletedPredicate(final AzureComputeApi api, final ComputeServiceConstants.Timeouts timeouts,
final PollPeriod pollPeriod) {
return retry(new ActionDonePredicate(api), timeouts.nodeTerminated, pollPeriod.pollInitialPeriod,
pollPeriod.pollMaxPeriod);
}
@Provides
@Named(TIMEOUT_NODE_SUSPENDED)
protected VirtualMachineInStatePredicateFactory provideNodeSuspendedPredicate(final AzureComputeApi api,
final ComputeServiceConstants.Timeouts timeouts, final PollPeriod pollPeriod) {
return new VirtualMachineInStatePredicateFactory(api, VirtualMachineInstance.PowerState.STOPPED, timeouts.nodeTerminated,
pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
@Provides
protected PublicIpAvailablePredicateFactory providePublicIpAvailablePredicate(final AzureComputeApi api,
Predicate<Supplier<Provisionable>> resourceAvailable) {
return new PublicIpAvailablePredicateFactory(api, resourceAvailable);
}
@Provides
protected SecurityGroupAvailablePredicateFactory provideSecurityGroupAvailablePredicate(final AzureComputeApi api,
Predicate<Supplier<Provisionable>> resourceAvailable) {
return new SecurityGroupAvailablePredicateFactory(api, resourceAvailable);
}
@Provides
protected ImageAvailablePredicateFactory provideImageAvailablePredicate(final AzureComputeApi api,
Predicate<Supplier<Provisionable>> resourceAvailable, final ComputeServiceConstants.Timeouts timeouts, final PollPeriod pollPeriod) {
return new ImageAvailablePredicateFactory(api, retry(new ResourceInStatusPredicate("Succeeded"),
timeouts.imageAvailable, pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod));
}
@Provides
protected Predicate<Supplier<Provisionable>> provideResourceAvailablePredicate(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout, PollPeriod pollPeriod) {
return retry(new ResourceInStatusPredicate("Succeeded"), operationTimeout, pollPeriod.pollInitialPeriod,
pollPeriod.pollMaxPeriod);
}
@VisibleForTesting
static class ActionDonePredicate implements Predicate<URI> {
private final AzureComputeApi api;
public ActionDonePredicate(final AzureComputeApi api) {
this.api = checkNotNull(api, "api must not be null");
}
@Override
public boolean apply(final URI uri) {
checkNotNull(uri, "uri cannot be null");
return ParseJobStatus.JobStatus.DONE == api.getJobApi().jobStatus(uri)
|| ParseJobStatus.JobStatus.NO_CONTENT == api.getJobApi().jobStatus(uri);
}
}
@VisibleForTesting
static class ImageCapturedPredicate implements Predicate<URI> {
private final AzureComputeApi api;
public ImageCapturedPredicate(final AzureComputeApi api) {
this.api = checkNotNull(api, "api must not be null");
}
@Override
public boolean apply(final URI uri) {
checkNotNull(uri, "uri cannot be null");
if (api.getJobApi().jobStatus(uri) != ParseJobStatus.JobStatus.DONE) {
return false;
}
List<ResourceDefinition> definitions = api.getJobApi().captureStatus(uri);
return definitions != null;
}
}
public static class VirtualMachineInStatePredicateFactory {
private final AzureComputeApi api;
private final VirtualMachineInstance.PowerState powerState;
private final long timeout;
private final long period;
private final long maxPeriod;
VirtualMachineInStatePredicateFactory(final AzureComputeApi api, final VirtualMachineInstance.PowerState powerState, final long timeout,
final long period, final long maxPeriod) {
this.api = checkNotNull(api, "api cannot be null");
this.powerState = checkNotNull(powerState, "powerState cannot be null");
this.timeout = timeout;
this.period = period;
this.maxPeriod = maxPeriod;
}
public Predicate<String> create(final String azureGroup) {
return retry(new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
VirtualMachineInstance vmInstance = api.getVirtualMachineApi(azureGroup).getInstanceDetails(name);
if (vmInstance == null) {
return false;
}
return powerState == vmInstance.powerState();
}
}, timeout, period, maxPeriod);
}
}
public static class ResourceInStatusPredicate implements Predicate<Supplier<Provisionable>> {
private final String expectedStatus;
ResourceInStatusPredicate(String expectedStatus) {
this.expectedStatus = checkNotNull(expectedStatus, "expectedStatus cannot be null");
}
@Override
public boolean apply(Supplier<Provisionable> provisionableSupplier) {
checkNotNull(provisionableSupplier, "provisionableSupplier supplier cannot be null");
Provisionable provisionable = provisionableSupplier.get();
return provisionable != null && provisionable.provisioningState().equalsIgnoreCase(expectedStatus);
}
}
public static class PublicIpAvailablePredicateFactory {
private final AzureComputeApi api;
private final Predicate<Supplier<Provisionable>> resourceAvailable;
PublicIpAvailablePredicateFactory(final AzureComputeApi api, Predicate<Supplier<Provisionable>> resourceAvailable) {
this.api = checkNotNull(api, "api cannot be null");
this.resourceAvailable = resourceAvailable;
}
public Predicate<String> create(final String azureGroup) {
checkNotNull(azureGroup, "azureGroup cannot be null");
return new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
return resourceAvailable.apply(new Supplier<Provisionable>() {
@Override
public Provisionable get() {
PublicIPAddress publicIp = api.getPublicIPAddressApi(azureGroup).get(name);
return publicIp == null ? null : publicIp.properties();
}
});
}
};
}
}
public static class SecurityGroupAvailablePredicateFactory {
private final AzureComputeApi api;
private final Predicate<Supplier<Provisionable>> resourceAvailable;
SecurityGroupAvailablePredicateFactory(final AzureComputeApi api,
Predicate<Supplier<Provisionable>> resourceAvailable) {
this.api = checkNotNull(api, "api cannot be null");
this.resourceAvailable = resourceAvailable;
}
public Predicate<String> create(final String resourceGroup) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
return new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
return resourceAvailable.apply(new Supplier<Provisionable>() {
@Override
public Provisionable get() {
NetworkSecurityGroup sg = api.getNetworkSecurityGroupApi(resourceGroup).get(name);
return sg == null ? null : sg.properties();
}
});
}
};
}
}
public static class ImageAvailablePredicateFactory {
private final AzureComputeApi api;
private final Predicate<Supplier<Provisionable>> resourceAvailable;
ImageAvailablePredicateFactory(final AzureComputeApi api,
Predicate<Supplier<Provisionable>> resourceAvailable) {
this.api = checkNotNull(api, "api cannot be null");
this.resourceAvailable = resourceAvailable;
}
public Predicate<String> create(final String resourceGroup) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
return new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
return resourceAvailable.apply(new Supplier<Provisionable>() {
@Override
public Provisionable get() {
Image img = api.getVirtualMachineImageApi(resourceGroup).get(name);
return img == null ? null : img.properties();
}
});
}
};
}
}
@Provides
@Named(VAULT_DELETE_STATUS)
protected VaultPredicates.DeletedVaultStatusPredicateFactory provideDeletedVaultStatusPredicateFactory(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout,
final PollPeriod pollPeriod) {
return new VaultPredicates.DeletedVaultStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
public static class VaultPredicates {
public static class DeletedVaultStatusPredicateFactory {
private final AzureComputeApi api;
private final long operationTimeout;
private final long initialPeriod;
private final long maxPeriod;
DeletedVaultStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
this.api = checkNotNull(api, "api cannot be null");
this.operationTimeout = operationTimeout;
this.initialPeriod = initialPeriod;
this.maxPeriod = maxPeriod;
}
public Predicate<String> create(final String resourceGroup, final boolean shouldBePresent) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
return retry(new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
boolean present = false;
List<Vault.DeletedVault> vaults = api.getVaultApi(resourceGroup).listDeletedVaults();
return shouldBePresent == Iterables.any(vaults, new Predicate<Vault.DeletedVault>() {
@Override public boolean apply(Vault.DeletedVault input) {
return input.name().equals(name);
}
});
}
}, operationTimeout, initialPeriod, maxPeriod);
}
}
}
@Provides
@Named(VAULT_KEY_DELETED_STATUS)
protected VaultKeyPredicates.DeletedKeyStatusPredicateFactory provideDeletedKeyStatusPredicateFactory(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout,
final PollPeriod pollPeriod) {
return new VaultKeyPredicates.DeletedKeyStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
@Provides
@Named(VAULT_KEY_RECOVERABLE_STATUS)
protected VaultKeyPredicates.RecoverableKeyStatusPredicateFactory provideRecoverableKeyStatusPredicateFactory(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout,
final PollPeriod pollPeriod) {
return new VaultKeyPredicates.RecoverableKeyStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
public static class VaultKeyPredicates {
public static class DeletedKeyStatusPredicateFactory {
private final AzureComputeApi api;
private final long operationTimeout;
private final long initialPeriod;
private final long maxPeriod;
DeletedKeyStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
this.api = checkNotNull(api, "api cannot be null");
this.operationTimeout = operationTimeout;
this.initialPeriod = initialPeriod;
this.maxPeriod = maxPeriod;
}
public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean shouldBePresent) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
checkNotNull(vaultUri, "vaultUri cannot be null");
return retry(new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
boolean present = false;
DeletedKeyBundle key = api.getVaultApi(resourceGroup).getDeletedKey(vaultUri, name);
return shouldBePresent == (key != null);
}
}, operationTimeout, initialPeriod, maxPeriod);
}
}
public static class RecoverableKeyStatusPredicateFactory {
private final AzureComputeApi api;
private final long operationTimeout;
private final long initialPeriod;
private final long maxPeriod;
RecoverableKeyStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
this.api = checkNotNull(api, "api cannot be null");
this.operationTimeout = operationTimeout;
this.initialPeriod = initialPeriod;
this.maxPeriod = maxPeriod;
}
public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean isRecovered) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
checkNotNull(vaultUri, "vaultUri cannot be null");
return retry(new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
boolean result = false;
KeyBundle key = api.getVaultApi(resourceGroup).getKey(vaultUri, name);
return key != null ? (isRecovered ? true : key.attributes().recoveryLevel().contains("Recoverable")) : false;
}
}, operationTimeout, initialPeriod, maxPeriod);
}
}
}
@Provides
@Named(VAULT_SECRET_DELETE_STATUS)
protected VaultSecretPredicates.DeletedSecretStatusPredicateFactory provideDeletedSecretStatusPredicateFactory(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout,
final PollPeriod pollPeriod) {
return new VaultSecretPredicates.DeletedSecretStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
@Provides
@Named(VAULT_SECRET_RECOVERABLE_STATUS)
protected VaultSecretPredicates.RecoverableSecretStatusPredicateFactory provideRecoverableSecretStatusPredicateFactory(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout,
final PollPeriod pollPeriod) {
return new VaultSecretPredicates.RecoverableSecretStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
public static class VaultSecretPredicates {
public static class DeletedSecretStatusPredicateFactory {
private final AzureComputeApi api;
private final long operationTimeout;
private final long initialPeriod;
private final long maxPeriod;
DeletedSecretStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
this.api = checkNotNull(api, "api cannot be null");
this.operationTimeout = operationTimeout;
this.initialPeriod = initialPeriod;
this.maxPeriod = maxPeriod;
}
public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean shouldBePresent) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
checkNotNull(vaultUri, "vaultUri cannot be null");
return retry(new Predicate<String>() {
@Override
public boolean apply(final String name) {
boolean present = false;
checkNotNull(name, "name cannot be null");
DeletedSecretBundle secret = api.getVaultApi(resourceGroup).getDeletedSecret(vaultUri, name);
return shouldBePresent == (secret != null);
}
}, operationTimeout, initialPeriod, maxPeriod);
}
}
public static class RecoverableSecretStatusPredicateFactory {
private final AzureComputeApi api;
private final long operationTimeout;
private final long initialPeriod;
private final long maxPeriod;
RecoverableSecretStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
this.api = checkNotNull(api, "api cannot be null");
this.operationTimeout = operationTimeout;
this.initialPeriod = initialPeriod;
this.maxPeriod = maxPeriod;
}
public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean isRecovered) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
checkNotNull(vaultUri, "vaultUri cannot be null");
return retry(new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
SecretBundle secret = api.getVaultApi(resourceGroup).getSecret(vaultUri, name, null);
return secret != null ? (isRecovered ? true : secret.attributes().recoveryLevel().contains("Recoverable")) : false;
}
}, operationTimeout, initialPeriod, maxPeriod);
}
}
}
@Provides
@Named(VAULT_CERTIFICATE_DELETE_STATUS)
protected VaultCertificatePredicates.DeletedCertificateStatusPredicateFactory provideDeletedCertificateStatusPredicateFactory(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout,
final PollPeriod pollPeriod) {
return new VaultCertificatePredicates.DeletedCertificateStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
@Provides
@Named(VAULT_CERTIFICATE_RECOVERABLE_STATUS)
protected VaultCertificatePredicates.RecoverableCertificateStatusPredicateFactory provideRecoverableCertificateStatusPredicateFactory(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout,
final PollPeriod pollPeriod) {
return new VaultCertificatePredicates.RecoverableCertificateStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
@Provides
@Named(VAULT_CERTIFICATE_OPERATION_STATUS)
protected VaultCertificatePredicates.CertificateOperationStatusPredicateFactory provideCertificateOperationStatusPredicateFactory(final AzureComputeApi api,
@Named(OPERATION_TIMEOUT) Integer operationTimeout,
final PollPeriod pollPeriod) {
return new VaultCertificatePredicates.CertificateOperationStatusPredicateFactory(api, operationTimeout.longValue(), pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod);
}
public static class VaultCertificatePredicates {
public static class DeletedCertificateStatusPredicateFactory {
private final AzureComputeApi api;
private final long operationTimeout;
private final long initialPeriod;
private final long maxPeriod;
DeletedCertificateStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
this.api = checkNotNull(api, "api cannot be null");
this.operationTimeout = operationTimeout;
this.initialPeriod = initialPeriod;
this.maxPeriod = maxPeriod;
}
public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean shouldBePresent) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
checkNotNull(vaultUri, "vaultUri cannot be null");
return retry(new Predicate<String>() {
@Override
public boolean apply(final String name) {
boolean present = false;
checkNotNull(name, "name cannot be null");
DeletedCertificateBundle cert = api.getVaultApi(resourceGroup).getDeletedCertificate(vaultUri, name);
return shouldBePresent == (cert != null);
}
}, operationTimeout, initialPeriod, maxPeriod);
}
}
public static class RecoverableCertificateStatusPredicateFactory {
private final AzureComputeApi api;
private final long operationTimeout;
private final long initialPeriod;
private final long maxPeriod;
RecoverableCertificateStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
this.api = checkNotNull(api, "api cannot be null");
this.operationTimeout = operationTimeout;
this.initialPeriod = initialPeriod;
this.maxPeriod = maxPeriod;
}
public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean isImport) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
checkNotNull(vaultUri, "vaultUri cannot be null");
return retry(new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
CertificateBundle cert = api.getVaultApi(resourceGroup).getCertificate(vaultUri, name, null);
return cert != null ? (isImport ? true : cert.attributes().recoveryLevel().contains("Recoverable")) : false;
}
}, operationTimeout, initialPeriod, maxPeriod);
}
}
public static class CertificateOperationStatusPredicateFactory {
private final AzureComputeApi api;
private final long operationTimeout;
private final long initialPeriod;
private final long maxPeriod;
CertificateOperationStatusPredicateFactory(final AzureComputeApi api, final long operationTimeout, final long initialPeriod, final long maxPeriod) {
this.api = checkNotNull(api, "api cannot be null");
this.operationTimeout = operationTimeout;
this.initialPeriod = initialPeriod;
this.maxPeriod = maxPeriod;
}
public Predicate<String> create(final String resourceGroup, final URI vaultUri, final boolean isCreate) {
checkNotNull(resourceGroup, "resourceGroup cannot be null");
checkNotNull(vaultUri, "vaultUri cannot be null");
return retry(new Predicate<String>() {
@Override
public boolean apply(final String name) {
checkNotNull(name, "name cannot be null");
boolean result = false;
CertificateOperation certOp = api.getVaultApi(resourceGroup).getCertificateOperation(vaultUri, name);
return isCreate ? ((certOp != null) ? !certOp.status().equals("inProgress") : false) : (certOp == null);
}
}, operationTimeout, initialPeriod, maxPeriod);
}
}
}
}

View File

@ -18,6 +18,8 @@ package org.jclouds.azurecompute.arm.compute.domain;
import static org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName.fromResourceGroupAndName;
import java.util.Arrays;
import com.google.auto.value.AutoValue;
import com.google.common.base.Objects;
@ -28,6 +30,7 @@ public abstract class ResourceGroupAndNameAndIngressRules {
public abstract String location();
@SuppressWarnings("mutable")
public abstract int[] inboundPorts();
ResourceGroupAndNameAndIngressRules() {
@ -37,7 +40,7 @@ public abstract class ResourceGroupAndNameAndIngressRules {
public static ResourceGroupAndNameAndIngressRules create(String resourceGroup, String location, String name,
int[] inboundPorts) {
return new AutoValue_ResourceGroupAndNameAndIngressRules(fromResourceGroupAndName(resourceGroup, name), location,
inboundPorts);
Arrays.copyOf(inboundPorts, inboundPorts.length));
}
public String name() {

View File

@ -30,8 +30,8 @@ import javax.annotation.Resource;
import org.jclouds.Constants;
import org.jclouds.azurecompute.arm.AzureComputeApi;
import org.jclouds.azurecompute.arm.compute.config.AzureComputeServiceContextModule.ImageAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzureComputeServiceContextModule.VirtualMachineInStatePredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.ImageAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VirtualMachineInStatePredicateFactory;
import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
import org.jclouds.azurecompute.arm.compute.functions.CustomImageToVMImage;
import org.jclouds.azurecompute.arm.domain.IdReference;

View File

@ -36,7 +36,7 @@ import javax.inject.Inject;
import javax.inject.Named;
import org.jclouds.azurecompute.arm.AzureComputeApi;
import org.jclouds.azurecompute.arm.compute.config.AzureComputeServiceContextModule.SecurityGroupAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.SecurityGroupAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
import org.jclouds.azurecompute.arm.domain.NetworkInterfaceCard;
import org.jclouds.azurecompute.arm.domain.NetworkProfile.NetworkInterface;

View File

@ -29,7 +29,7 @@ import javax.inject.Named;
import javax.inject.Singleton;
import org.jclouds.azurecompute.arm.AzureComputeApi;
import org.jclouds.azurecompute.arm.compute.config.AzureComputeServiceContextModule.SecurityGroupAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.SecurityGroupAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndNameAndIngressRules;
import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroupProperties;

View File

@ -34,4 +34,13 @@ public class AzureComputeProperties {
public static final String API_VERSION_PREFIX = "jclouds.azurecompute.arm.apiversion.";
// Predicate constants
public static final String VAULT_DELETE_STATUS = "jclouds.azurecompute.arm.vault.delete_status";
public static final String VAULT_KEY_DELETED_STATUS = "jclouds.azurecompute.arm.vault.key.delete_status";
public static final String VAULT_KEY_RECOVERABLE_STATUS = "jclouds.azurecompute.arm.vault.key.recoverable_status";
public static final String VAULT_SECRET_DELETE_STATUS = "jclouds.azurecompute.arm.vault.secret.delete_status";
public static final String VAULT_SECRET_RECOVERABLE_STATUS = "jclouds.azurecompute.arm.vault.secret.recoverable_status";
public static final String VAULT_CERTIFICATE_DELETE_STATUS = "jclouds.azurecompute.arm.vault.certificate.delete_status";
public static final String VAULT_CERTIFICATE_RECOVERABLE_STATUS = "jclouds.azurecompute.arm.vault.certificate.recoverable_status";
public static final String VAULT_CERTIFICATE_OPERATION_STATUS = "jclouds.azurecompute.arm.vault.certificate.operation_status";
}

View File

@ -0,0 +1,638 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.jclouds.azurecompute.arm.domain;
import java.util.Map;
import java.util.List;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.json.SerializedNames;
import com.google.auto.value.AutoValue;
@AutoValue
public abstract class Certificate {
@AutoValue
public abstract static class CertificateAttributes {
@Nullable
public abstract Integer created();
public abstract boolean enabled();
@Nullable
public abstract Integer expiry();
@Nullable
public abstract Integer notBefore();
@Nullable
public abstract String recoveryLevel();
@Nullable
public abstract Integer updated();
@SerializedNames({"created", "enabled", "exp", "nbf", "recoveryLevel", "updated"})
public static CertificateAttributes create(final Integer created,
final boolean enabled,
final Integer expiry,
final Integer notBefore,
final String recoveryLevel,
final Integer updated) {
return new AutoValue_Certificate_CertificateAttributes(created, enabled, expiry, notBefore, recoveryLevel, updated);
}
}
@AutoValue
public abstract static class IssuerParameters {
@Nullable
public abstract String certType();
@Nullable
public abstract String name();
@SerializedNames({"cty", "name"})
public static IssuerParameters create(final String certType,
final String name) {
return new AutoValue_Certificate_IssuerParameters(certType, name);
}
}
@AutoValue
public abstract static class KeyProperties {
@Nullable
public abstract Boolean exportable();
@Nullable
public abstract Integer keySize();
@Nullable
public abstract String keyType();
@Nullable
public abstract Boolean reuseKey();
@SerializedNames({"exportable", "key_size", "kty", "reuse_key"})
public static KeyProperties create(final boolean exportable,
final Integer keySize,
final String keyType,
final boolean reuseKey) {
return new AutoValue_Certificate_KeyProperties(exportable, keySize, keyType, reuseKey);
}
}
@AutoValue
public abstract static class LifetimeActionTrigger {
@Nullable
public abstract Integer daysBeforeExpiry();
@Nullable
public abstract Integer lifetimePercentage();
@SerializedNames({"days_before_expiry", "lifetime_percentage"})
public static LifetimeActionTrigger create(final Integer daysBeforeExpiry,
final Integer lifetimePercentage) {
return new AutoValue_Certificate_LifetimeActionTrigger(daysBeforeExpiry, lifetimePercentage);
}
}
@AutoValue
public abstract static class LifetimeActionAction {
public abstract String actionType();
@SerializedNames({"action_type"})
public static LifetimeActionAction create(final String actionType) {
return new AutoValue_Certificate_LifetimeActionAction(actionType);
}
}
@AutoValue
public abstract static class LifetimeAction {
public abstract LifetimeActionAction action();
public abstract LifetimeActionTrigger trigger();
@SerializedNames({"action", "trigger"})
public static LifetimeAction create(final LifetimeActionAction action,
final LifetimeActionTrigger trigger) {
return new AutoValue_Certificate_LifetimeAction(action, trigger);
}
}
@AutoValue
public abstract static class SecretProperties {
public abstract String contentType();
@SerializedNames({"contentType"})
public static SecretProperties create(final String contentType) {
return new AutoValue_Certificate_SecretProperties(contentType);
}
}
@AutoValue
public abstract static class SubjectAlternativeNames {
public abstract List<String> dnsNames();
public abstract List<String> emails();
public abstract List<String> upns();
@SerializedNames({"dns_names", "emails", "upns"})
public static SubjectAlternativeNames create(final List<String> dnsNames,
final List<String> emails,
final List<String> upns) {
return new AutoValue_Certificate_SubjectAlternativeNames(
dnsNames != null ? ImmutableList.copyOf(dnsNames) : ImmutableList.<String> of(),
emails != null ? ImmutableList.copyOf(emails) : ImmutableList.<String> of(),
upns != null ? ImmutableList.copyOf(upns) : ImmutableList.<String> of()
);
}
}
@AutoValue
public abstract static class X509CertificateProperties {
public abstract List<String> enhancedKeyUsage();
public abstract List<String> keyUsage();
@Nullable
public abstract SubjectAlternativeNames subjectAltNames();
@Nullable
public abstract String subject();
@Nullable
public abstract Integer validityMonths();
@SerializedNames({"ekus", "key_usage", "sans", "subject", "validity_months"})
public static X509CertificateProperties create(final List<String> enhancedKeyUsage,
final List<String> keyUsage,
final SubjectAlternativeNames subjectAltNames,
final String subject,
final Integer validityMonths) {
return new AutoValue_Certificate_X509CertificateProperties(
enhancedKeyUsage != null ? ImmutableList.copyOf(enhancedKeyUsage) : ImmutableList.<String> of(),
keyUsage != null ? ImmutableList.copyOf(keyUsage) : ImmutableList.<String> of(),
subjectAltNames,
subject,
validityMonths
);
}
}
@AutoValue
public abstract static class CertificatePolicy {
@Nullable
public abstract CertificateAttributes attributes();
@Nullable
public abstract String id();
@Nullable
public abstract IssuerParameters issuer();
@Nullable
public abstract KeyProperties keyProps();
public abstract List<LifetimeAction> lifetimeActions();
@Nullable
public abstract SecretProperties secretProps();
@Nullable
public abstract X509CertificateProperties x509props();
@SerializedNames({"attributes", "id", "issuer", "key_props", "lifetime_actions", "secret_props", "x509_props"})
public static CertificatePolicy create(final CertificateAttributes attributes,
final String id,
final IssuerParameters issuer,
final KeyProperties keyProps,
final List<LifetimeAction> lifetimeActions,
final SecretProperties secretProperties,
final X509CertificateProperties x509Props) {
return new AutoValue_Certificate_CertificatePolicy(
attributes,
id,
issuer,
keyProps,
lifetimeActions != null ? ImmutableList.copyOf(lifetimeActions) : ImmutableList.<LifetimeAction>of(),
secretProperties,
x509Props
);
}
}
@AutoValue
public abstract static class CertificateError {
@Nullable
public abstract String code();
@Nullable
public abstract String message();
@SerializedNames({"code", "message"})
public static CertificateError create(final String code,
final String message) {
return new AutoValue_Certificate_CertificateError(code, message);
}
}
@AutoValue
public abstract static class CertificateOperation {
@Nullable
public abstract Boolean cancellationRequested();
@Nullable
public abstract String csr();
@Nullable
public abstract CertificateError error();
@Nullable
public abstract String id();
@Nullable
public abstract IssuerParameters issuer();
@Nullable
public abstract String requestId();
@Nullable
public abstract String status();
@Nullable
public abstract String statusDetails();
@Nullable
public abstract String target();
@SerializedNames({"cancellation_requested", "csr", "error", "id", "issuer", "request_id", "status", "status_details", "target"})
public static CertificateOperation create(final boolean cancellationRequested,
final String csr,
final CertificateError error,
final String id,
final IssuerParameters issuer,
final String requestId,
final String status,
final String statusDetails,
final String target) {
return new AutoValue_Certificate_CertificateOperation(
cancellationRequested,
csr,
error,
id,
issuer,
requestId,
status,
statusDetails,
target);
}
}
@AutoValue
public abstract static class CertificateBundle {
@Nullable
public abstract CertificateAttributes attributes();
@Nullable
public abstract String certificate();
@Nullable
public abstract String contentType();
@Nullable
public abstract String id();
@Nullable
public abstract String keyId();
@Nullable
public abstract CertificatePolicy policy();
@Nullable
public abstract String secretId();
@Nullable
public abstract Map<String, String> tags();
@Nullable
public abstract String thumbprint();
@SerializedNames({"attributes", "cer", "contentType", "id", "kid", "policy", "sid", "tags", "x5t"})
public static CertificateBundle create(final CertificateAttributes attributes,
final String certificate,
final String contentType,
final String id,
final String keyId,
final CertificatePolicy policy,
final String secretId,
final Map<String, String> tags,
final String thumbprint) {
return new AutoValue_Certificate_CertificateBundle(attributes,
certificate,
contentType,
id,
keyId,
policy,
secretId,
tags != null ? ImmutableMap.copyOf(tags) : null,
thumbprint
);
}
}
@AutoValue
public abstract static class CertificateIssuer {
public abstract String id();
public abstract String provider();
@SerializedNames({"id", "provider"})
public static CertificateIssuer create(final String id,
final String provider) {
return new AutoValue_Certificate_CertificateIssuer(id, provider);
}
}
@AutoValue
public abstract static class IssuerAttributes {
@Nullable
public abstract Integer created();
@Nullable
public abstract Boolean enabled();
@Nullable
public abstract Integer updated();
@SerializedNames({"created", "enabled", "updated"})
public static IssuerAttributes create(final Integer created,
final Boolean enabled,
final Integer updated) {
return new AutoValue_Certificate_IssuerAttributes(created, enabled, updated);
}
}
@AutoValue
public abstract static class IssuerCredentials {
@Nullable
public abstract String accountId();
@Nullable
public abstract String password();
@SerializedNames({"account_id", "pwd"})
public static IssuerCredentials create(final String accountId,
final String password) {
return new AutoValue_Certificate_IssuerCredentials(accountId, password);
}
}
@AutoValue
public abstract static class OrganizationDetails {
public abstract List<AdministrationDetails> adminDetails();
@Nullable
public abstract String id();
@SerializedNames({"admin_details", "id"})
public static OrganizationDetails create(final List<AdministrationDetails> adminDetails,
final String id) {
return new AutoValue_Certificate_OrganizationDetails(
adminDetails != null ? ImmutableList.copyOf(adminDetails) : ImmutableList.<AdministrationDetails> of(),
id
);
}
}
@AutoValue
public abstract static class AdministrationDetails {
@Nullable
public abstract String email();
@Nullable
public abstract String firstName();
@Nullable
public abstract String lastName();
@Nullable
public abstract String phoneNumber();
@SerializedNames({"email", "first_name", "last_name", "phone"})
public static AdministrationDetails create(final String email,
final String firstName,
final String lastName,
final String phoneNumber) {
return new AutoValue_Certificate_AdministrationDetails(email, firstName, lastName, phoneNumber);
}
}
@AutoValue
public abstract static class IssuerBundle {
@Nullable
public abstract IssuerAttributes attributes();
@Nullable
public abstract IssuerCredentials credentials();
@Nullable
public abstract String id();
@Nullable
public abstract OrganizationDetails organizationDetails();
@Nullable
public abstract String provider();
@SerializedNames({"attributes", "credentials", "id", "org_details", "provider"})
public static IssuerBundle create(final IssuerAttributes attributes,
final IssuerCredentials credentials,
final String id,
final OrganizationDetails orgDetails,
final String provider) {
return new AutoValue_Certificate_IssuerBundle(attributes, credentials, id, orgDetails, provider);
}
}
@AutoValue
public abstract static class Contact {
@Nullable
public abstract String email();
@Nullable
public abstract String name();
@Nullable
public abstract String phone();
@SerializedNames({"email", "name", "phone"})
public static Contact create(final String email,
final String name,
final String phone) {
return new AutoValue_Certificate_Contact(email, name, phone);
}
}
@AutoValue
public abstract static class Contacts {
public abstract List<Contact> contacts();
@Nullable
public abstract String id();
@SerializedNames({"contacts", "id"})
public static Contacts create(final List<Contact> contacts,
final String id) {
return new AutoValue_Certificate_Contacts(
contacts != null ? ImmutableList.copyOf(contacts) : ImmutableList.<Contact> of(),
id
);
}
}
@AutoValue
public abstract static class DeletedCertificateBundle {
@Nullable
public abstract CertificateAttributes attributes();
@Nullable
public abstract String bytes();
@Nullable
public abstract Integer deletedDate();
@Nullable
public abstract String id();
@Nullable
public abstract String keyId();
@Nullable
public abstract String recoveryId();
@Nullable
public abstract Integer scheduledPurgeDate();
@Nullable
public abstract String secredId();
@Nullable
public abstract Map<String, String> tags();
@Nullable
public abstract String thumbprint();
@SerializedNames({"attributes", "cer", "deletedDate", "id", "kid", "recoveryId", "scheduledPurgeDate", "sid", "tags", "x5t"})
public static DeletedCertificateBundle create(final CertificateAttributes attributes,
final String bytes,
final Integer deletedDate,
final String id,
final String keyId,
final String recoveryId,
final Integer scheduledPurgeDate,
final String secretId,
final Map<String, String> tags,
final String thumbprint) {
return new AutoValue_Certificate_DeletedCertificateBundle(
attributes,
bytes,
deletedDate,
id,
keyId,
recoveryId,
scheduledPurgeDate,
secretId,
tags != null ? ImmutableMap.copyOf(tags) : null,
thumbprint
);
}
}
@AutoValue
public abstract static class DeletedCertificate {
@Nullable
public abstract CertificateAttributes attributes();
@Nullable
public abstract Integer deletedDate();
@Nullable
public abstract String id();
@Nullable
public abstract String recoveryId();
@Nullable
public abstract Integer scheduledPurgeDate();
@Nullable
public abstract Map<String, String> tags();
@Nullable
public abstract String thumbprint();
@SerializedNames({"attributes", "deletedDate", "id", "recoveryId", "scheduledPurgeDate", "tags", "x5t"})
public static DeletedCertificate create(final CertificateAttributes attributes,
final Integer deletedDate,
final String id,
final String recoveryId,
final Integer scheduledPurgeDate,
final Map<String, String> tags,
final String thumbprint) {
return new AutoValue_Certificate_DeletedCertificate(
attributes,
deletedDate,
id,
recoveryId,
scheduledPurgeDate,
tags != null ? ImmutableMap.copyOf(tags) : null,
thumbprint
);
}
}
@Nullable
public abstract CertificateAttributes attributes();
@Nullable
public abstract String id();
@Nullable
public abstract Map<String, String> tags();
@Nullable
public abstract String thumbprint();
@SerializedNames({"attributes", "id", "tags", "x5t"})
public static Certificate create(final CertificateAttributes attributes,
final String id,
final Map<String, String> tags,
final String thumbprint) {
return new AutoValue_Certificate(
attributes,
id,
tags != null ? ImmutableMap.copyOf(tags) : null,
thumbprint
);
}
Certificate() {
}
}

View File

@ -0,0 +1,229 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.jclouds.azurecompute.arm.domain;
import java.util.Map;
import java.util.List;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.json.SerializedNames;
import com.google.auto.value.AutoValue;
@AutoValue
public abstract class Key {
@AutoValue
public abstract static class JsonWebKey {
@Nullable
public abstract String crv();
@Nullable
public abstract String d();
@Nullable
public abstract String dp();
@Nullable
public abstract String dq();
@Nullable
public abstract String e();
@Nullable
public abstract String k();
@Nullable
public abstract String keyHsm();
public abstract List<String> keyOps();
@Nullable
public abstract String kid();
@Nullable
public abstract String kty();
@Nullable
public abstract String n();
@Nullable
public abstract String p();
@Nullable
public abstract String q();
@Nullable
public abstract String qi();
@Nullable
public abstract String x();
@Nullable
public abstract String y();
@SerializedNames({"crv", "d", "dp", "dq", "e", "k", "key_hsm", "key_ops", "kid", "kty", "n", "p", "q", "qi", "x", "y"})
public static JsonWebKey create(final String crv, final String d, final String dp, final String dq,
final String e, final String k, final String keyHsm, final List<String> keyOps,
final String kid, final String kty, final String n, final String p,
final String q, final String qi, final String x, final String y) {
return new AutoValue_Key_JsonWebKey(
crv, d, dp, dq, e, k, keyHsm,
keyOps != null ? ImmutableList.copyOf(keyOps) : ImmutableList.<String> of(),
kid, kty, n, p, q, qi, x, y);
}
}
@AutoValue
public abstract static class KeyAttributes {
@Nullable
public abstract Boolean enabled();
@Nullable
public abstract Integer created();
@Nullable
public abstract Integer expires();
@Nullable
public abstract Integer notBefore();
@Nullable
public abstract String recoveryLevel();
@Nullable
public abstract Integer updated();
@SerializedNames({"enabled", "created", "expires", "notBefore", "recoveryLevel", "updated"})
public static KeyAttributes create(final Boolean enabled,
final Integer created,
final Integer expires,
final Integer notBefore,
final String recoveryLevel,
final Integer updated) {
return new AutoValue_Key_KeyAttributes(enabled, created, expires, notBefore, recoveryLevel, updated);
}
KeyAttributes() {
}
}
@AutoValue
public abstract static class KeyBundle {
@Nullable
public abstract KeyAttributes attributes();
@Nullable
public abstract JsonWebKey key();
@Nullable
public abstract Boolean managed();
@Nullable
public abstract Map<String, String> tags();
@SerializedNames({"attributes", "key", "managed", "tags"})
public static KeyBundle create(final KeyAttributes attributes, final JsonWebKey key, final boolean managed, final Map<String, String> tags) {
return new AutoValue_Key_KeyBundle(
attributes,
key,
managed,
tags != null ? ImmutableMap.copyOf(tags) : null
);
}
}
@AutoValue
public abstract static class DeletedKeyBundle {
@Nullable
public abstract KeyAttributes attributes();
@Nullable
public abstract String deletedDate();
@Nullable
public abstract JsonWebKey key();
@Nullable
public abstract Boolean managed();
@Nullable
public abstract String recoveryId();
@Nullable
public abstract String scheduledPurgeDate();
@Nullable
public abstract Map<String, String> tags();
@SerializedNames({"attributes", "deletedDate", "key", "managed", "recoveryId", "scheduledPurgeDate", "tags"})
public static DeletedKeyBundle create(final KeyAttributes attributes, final String deletedDate, final JsonWebKey key, final boolean managed, final String recoveryId, final String scheduledPurgeDate, final Map<String, String> tags) {
return new AutoValue_Key_DeletedKeyBundle(
attributes,
deletedDate,
key,
managed,
recoveryId,
scheduledPurgeDate,
tags != null ? ImmutableMap.copyOf(tags) : null
);
}
}
@AutoValue
public abstract static class KeyOperationResult {
@Nullable
public abstract String keyId();
@Nullable
public abstract String value();
@SerializedNames({"kid", "value"})
public static KeyOperationResult create(final String keyId, final String value) {
return new AutoValue_Key_KeyOperationResult(
keyId,
value
);
}
}
@Nullable
public abstract String kid();
public abstract KeyAttributes attributes();
@Nullable
public abstract Boolean managed();
@Nullable
public abstract Map<String, String> tags();
@SerializedNames({"kid", "attributes", "managed", "tags"})
public static Key create(final String kid, final KeyAttributes attributes, final boolean managed, final Map<String, String> tags) {
return new AutoValue_Key(
kid,
attributes,
managed,
tags != null ? ImmutableMap.copyOf(tags) : null
);
}
Key() {
}
}

View File

@ -16,36 +16,25 @@
*/
package org.jclouds.azurecompute.arm.domain;
import com.google.auto.value.AutoValue;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.json.SerializedNames;
/**
* SKU
*/
import com.google.auto.value.AutoValue;
@AutoValue
public abstract class SKU {
/**
* The location of the SKU
*/
@Nullable
public abstract String location();
/**
* The name of the SKU
*/
@Nullable
public abstract String name();
/**
* The id of the SKU
*/
@Nullable
public abstract String id();
@Nullable
public abstract String family();
@SerializedNames({"location", "name", "id", "family"})
public static SKU create(final String location, final String name, final String id, final String family) {
@SerializedNames({"location", "name", "id"})
public static SKU create(final String location, final String name, final String id) {
return new AutoValue_SKU(location, name, id);
return new AutoValue_SKU(location, name, id, family);
}
}

View File

@ -0,0 +1,186 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.jclouds.azurecompute.arm.domain;
import com.google.common.collect.ImmutableMap;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.json.SerializedNames;
import java.util.Map;
import com.google.auto.value.AutoValue;
@AutoValue
public abstract class Secret {
@AutoValue
public abstract static class SecretAttributes {
@Nullable
public abstract Boolean enabled();
@Nullable
public abstract Integer created();
@Nullable
public abstract Integer expires();
@Nullable
public abstract Integer notBefore();
@Nullable
public abstract String recoveryLevel();
@Nullable
public abstract Integer updated();
@SerializedNames({"enabled", "created", "expires", "notBefore", "recoveryLevel", "updated"})
public static SecretAttributes create(final Boolean enabled,
final Integer created,
final Integer expires,
final Integer notBefore,
final String recoveryLevel,
final Integer updated) {
return new AutoValue_Secret_SecretAttributes(enabled, created, expires, notBefore, recoveryLevel, updated);
}
SecretAttributes() {
}
}
@AutoValue
public abstract static class DeletedSecretBundle {
@Nullable
public abstract SecretAttributes attributes();
@Nullable
public abstract String contentType();
@Nullable
public abstract String deletedDate();
@Nullable
public abstract String id();
@Nullable
public abstract String kid();
@Nullable
public abstract Boolean managed();
@Nullable
public abstract String recoveryId();
@Nullable
public abstract String scheduledPurgeDate();
@Nullable
public abstract Map<String, String> tags();
@Nullable
public abstract String value();
@SerializedNames({"attributes", "contentType", "deletedDate", "id", "kid", "managed", "recoveryId", "scheduledPurgeDate", "tags", "value"})
public static DeletedSecretBundle create(final SecretAttributes attributes,
final String contentType,
final String deletedDate,
final String id,
final String kid,
final Boolean managed,
final String recoveryId,
final String scheduledPurgeDate,
final Map<String, String> tags,
String value) {
return new AutoValue_Secret_DeletedSecretBundle(
attributes, contentType, deletedDate,
id, kid, managed, recoveryId, scheduledPurgeDate,
tags != null ? ImmutableMap.copyOf(tags) : null,
value);
}
}
@AutoValue
public abstract static class SecretBundle {
@Nullable
public abstract SecretAttributes attributes();
@Nullable
public abstract String contentType();
@Nullable
public abstract String id();
@Nullable
public abstract String kid();
@Nullable
public abstract Boolean managed();
@Nullable
public abstract Map<String, String> tags();
@Nullable
public abstract String value();
@SerializedNames({"attributes", "contentType", "id", "kid", "managed", "tags", "value"})
public static SecretBundle create(final SecretAttributes attributes,
final String contentType,
final String id,
final String kid,
final Boolean managed,
final Map<String, String> tags,
String value) {
return new AutoValue_Secret_SecretBundle(
attributes, contentType, id,
kid, managed,
tags != null ? ImmutableMap.copyOf(tags) : null,
value);
}
}
@Nullable
public abstract SecretAttributes attributes();
@Nullable
public abstract String contentType();
@Nullable
public abstract String id();
@Nullable
public abstract Boolean managed();
@Nullable
public abstract Map<String, String> tags();
@SerializedNames({"attributes", "contentType", "id", "managed", "tags"})
public static Secret create(final SecretAttributes attributes,
final String contentType,
final String id,
final Boolean managed,
final Map<String, String> tags) {
return new AutoValue_Secret(
attributes,
contentType,
id,
managed,
tags != null ? ImmutableMap.copyOf(tags) : null
);
}
Secret() {
}
}

View File

@ -0,0 +1,112 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.jclouds.azurecompute.arm.domain;
import java.util.Date;
import java.util.Map;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.json.SerializedNames;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableMap;
@AutoValue
public abstract class Vault {
@AutoValue
public abstract static class DeletedVault {
@Nullable public abstract String id();
@Nullable public abstract String name();
@Nullable public abstract String type();
@Nullable public abstract DeletedVaultProperties properties();
@SerializedNames({"id", "name", "type", "properties"})
public static DeletedVault create(final String id, final String name,
final String type, final DeletedVaultProperties properties) {
return new AutoValue_Vault_DeletedVault(id, name, type, properties);
}
}
@AutoValue
public abstract static class DeletedVaultProperties {
@Nullable public abstract Date deletionDate();
@Nullable public abstract String location();
@Nullable public abstract Date scheduledPurgeDate();
@Nullable public abstract Map<String, String> tags();
@Nullable public abstract String vaultId();
@SerializedNames({"deletionDate", "location", "scheduledPurgeDate", "tags", "vaultId"})
public static DeletedVaultProperties create (final Date deletionDate, final String location,
final Date scheduledPurgeDate, final Map<String, String> tags,
final String vaultId) {
return new AutoValue_Vault_DeletedVaultProperties(
deletionDate,
location,
scheduledPurgeDate,
tags != null ? ImmutableMap.copyOf(tags) : null,
vaultId
);
}
}
@Nullable public abstract String id();
@Nullable public abstract String type();
public abstract String location();
@Nullable public abstract Map<String, String> tags();
@Nullable public abstract String name();
public abstract VaultProperties properties();
@SerializedNames({"id", "name", "type", "location", "properties", "tags"})
public static Vault create(final String id, final String name, final String type,
final String location,
final VaultProperties properties, final Map<String, String> tags) {
return builder()
.id(id)
.name(name)
.type(type)
.location(location)
.properties(properties)
.tags(tags != null ? ImmutableMap.copyOf(tags) : null)
.build();
}
public abstract Builder toBuilder();
public static Builder builder() {
return new AutoValue_Vault.Builder();
}
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder id(String id);
public abstract Builder name(String name);
public abstract Builder type(String type);
public abstract Builder location(String location);
public abstract Builder properties(VaultProperties properties);
public abstract Builder tags(Map<String, String> tags);
abstract Map<String, String> tags();
abstract Vault autoBuild();
public Vault build() {
tags(tags() != null ? ImmutableMap.copyOf(tags()) : null);
return autoBuild();
}
}
}

View File

@ -0,0 +1,131 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.jclouds.azurecompute.arm.domain;
import java.net.URI;
import java.util.List;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.json.SerializedNames;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
@AutoValue
public abstract class VaultProperties {
@AutoValue
public abstract static class Permissions {
public abstract List<String> certificates();
public abstract List<String> keys();
public abstract List<String> secrets();
public abstract List<String> storage();
@SerializedNames({ "certificates", "keys", "secrets", "storage"})
public static Permissions create(final List<String> certificates, final List<String> keys, final List<String> secrets, final List<String> storage) {
return new AutoValue_VaultProperties_Permissions(
certificates != null ? ImmutableList.copyOf(certificates) : ImmutableList.<String> of(),
keys != null ? ImmutableList.copyOf(keys) : ImmutableList.<String> of(),
secrets != null ? ImmutableList.copyOf(secrets) : ImmutableList.<String> of(),
storage != null ? ImmutableList.copyOf(storage) : ImmutableList.<String> of()
);
}
Permissions() {
}
}
@AutoValue
public abstract static class AccessPolicyEntry {
@Nullable public abstract String applicationId();
public abstract String objectId();
public abstract String tenantId();
@Nullable public abstract Permissions permissions();
@SerializedNames({"applicationId", "objectId", "tenantId", "permissions"})
public static AccessPolicyEntry create(final String applicationId, final String objectId, final String tenantId, final Permissions permissions) {
return new AutoValue_VaultProperties_AccessPolicyEntry(applicationId, objectId, tenantId, permissions);
}
AccessPolicyEntry() {
}
}
@Nullable
public abstract String tenantId();
@Nullable
public abstract URI vaultUri();
@Nullable
public abstract Boolean enabledForDeployment();
@Nullable
public abstract Boolean enabledForTemplateDeployment();
@Nullable
public abstract Boolean enableSoftDelete();
@Nullable
public abstract String createMode();
@Nullable
public abstract SKU sku();
@Nullable
public abstract List<AccessPolicyEntry> accessPolicies();
@SerializedNames({"tenantId", "vaultUri", "enabledForDeployment", "enabledForTemplateDeployment", "enableSoftDelete", "createMode", "sku", "accessPolicies" })
public static VaultProperties create(final String tenantId, final URI vaultUri, final Boolean enabledForDeployment, final Boolean enabledForTemplateDeployment, final Boolean enableSoftDelete, final String createMode,
final SKU sku, final List<AccessPolicyEntry> accessPolicies) {
return builder()
.tenantId(tenantId)
.vaultUri(vaultUri)
.enabledForDeployment(enabledForDeployment)
.enabledForTemplateDeployment(enabledForTemplateDeployment)
.enableSoftDelete(enableSoftDelete)
.createMode(createMode)
.sku(sku)
.accessPolicies(accessPolicies)
.build();
}
public abstract Builder toBuilder();
public static Builder builder() {
return new AutoValue_VaultProperties.Builder();
}
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder tenantId(String tenantId);
public abstract Builder vaultUri(URI vaultUri);
public abstract Builder enabledForDeployment(Boolean enabledForDeployment);
public abstract Builder enabledForTemplateDeployment(Boolean enabledForTemplateDeployment);
public abstract Builder enableSoftDelete(Boolean enableSoftDelete);
public abstract Builder createMode(String createMode);
public abstract Builder sku(SKU sku);
public abstract Builder accessPolicies(List<AccessPolicyEntry> accessPolicies);
abstract List<AccessPolicyEntry> accessPolicies();
abstract VaultProperties autoBuild();
public VaultProperties build() {
return accessPolicies(accessPolicies() != null ? ImmutableList.copyOf(accessPolicies()) : ImmutableList.<AccessPolicyEntry>of())
.autoBuild();
}
}
}

View File

@ -0,0 +1,635 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.jclouds.azurecompute.arm.features;
import java.net.URI;
import java.util.List;
import java.util.Map;
import javax.inject.Named;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.MediaType;
import com.google.common.base.Function;
import org.jclouds.Fallbacks.EmptyListOnNotFoundOr404;
import org.jclouds.Fallbacks.FalseOnNotFoundOr404;
import org.jclouds.Fallbacks.NullOnNotFoundOr404;
import org.jclouds.azurecompute.arm.config.OAuthResource;
import org.jclouds.azurecompute.arm.domain.Certificate;
import org.jclouds.azurecompute.arm.domain.Certificate.CertificateAttributes;
import org.jclouds.azurecompute.arm.domain.Certificate.CertificateBundle;
import org.jclouds.azurecompute.arm.domain.Certificate.CertificateIssuer;
import org.jclouds.azurecompute.arm.domain.Certificate.CertificateOperation;
import org.jclouds.azurecompute.arm.domain.Certificate.CertificatePolicy;
import org.jclouds.azurecompute.arm.domain.Certificate.Contact;
import org.jclouds.azurecompute.arm.domain.Certificate.Contacts;
import org.jclouds.azurecompute.arm.domain.Certificate.DeletedCertificate;
import org.jclouds.azurecompute.arm.domain.Certificate.DeletedCertificateBundle;
import org.jclouds.azurecompute.arm.domain.Certificate.IssuerAttributes;
import org.jclouds.azurecompute.arm.domain.Certificate.IssuerBundle;
import org.jclouds.azurecompute.arm.domain.Certificate.IssuerCredentials;
import org.jclouds.azurecompute.arm.domain.Certificate.IssuerParameters;
import org.jclouds.azurecompute.arm.domain.Certificate.KeyProperties;
import org.jclouds.azurecompute.arm.domain.Certificate.LifetimeAction;
import org.jclouds.azurecompute.arm.domain.Certificate.OrganizationDetails;
import org.jclouds.azurecompute.arm.domain.Certificate.SecretProperties;
import org.jclouds.azurecompute.arm.domain.Certificate.X509CertificateProperties;
import org.jclouds.azurecompute.arm.domain.Key;
import org.jclouds.azurecompute.arm.domain.Key.DeletedKeyBundle;
import org.jclouds.azurecompute.arm.domain.Key.JsonWebKey;
import org.jclouds.azurecompute.arm.domain.Key.KeyAttributes;
import org.jclouds.azurecompute.arm.domain.Key.KeyBundle;
import org.jclouds.azurecompute.arm.domain.Key.KeyOperationResult;
import org.jclouds.azurecompute.arm.domain.Secret;
import org.jclouds.azurecompute.arm.domain.Secret.DeletedSecretBundle;
import org.jclouds.azurecompute.arm.domain.Secret.SecretAttributes;
import org.jclouds.azurecompute.arm.domain.Secret.SecretBundle;
import org.jclouds.azurecompute.arm.domain.Vault;
import org.jclouds.azurecompute.arm.domain.Vault.DeletedVault;
import org.jclouds.azurecompute.arm.domain.VaultProperties;
import org.jclouds.azurecompute.arm.filters.ApiVersionFilter;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.oauth.v2.filters.OAuthFilter;
import org.jclouds.rest.annotations.EndpointParam;
import org.jclouds.rest.annotations.Fallback;
import org.jclouds.rest.annotations.MapBinder;
import org.jclouds.rest.annotations.PATCH;
import org.jclouds.rest.annotations.PayloadParam;
import org.jclouds.rest.annotations.RequestFilters;
import org.jclouds.rest.annotations.SelectJson;
import org.jclouds.rest.binders.BindToJsonPayload;
import org.jclouds.rest.annotations.ParamParser;
@RequestFilters({ OAuthFilter.class, ApiVersionFilter.class })
@Consumes(MediaType.APPLICATION_JSON)
public interface VaultApi {
static class PrependSlashOrEmptyString implements Function<Object, String> {
public String apply(Object from) {
if ((from == null) || (from.toString().length() == 0)) {
return "";
} else {
return "/" + from.toString();
}
}
}
// Vault operations
@Named("vault:list")
@SelectJson("value")
@GET
@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.KeyVault/vaults")
@Fallback(EmptyListOnNotFoundOr404.class)
List<Vault> listVaults();
@Named("vault:create_or_update")
@PUT
@MapBinder(BindToJsonPayload.class)
@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.KeyVault/vaults/{vaultName}")
Vault createOrUpdateVault(@PathParam("vaultName") String vaultName, @PayloadParam("location") String location,
@PayloadParam("properties") VaultProperties properties, @Nullable @PayloadParam("tags") Map<String, String> tags);
@Named("vault:get")
@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.KeyVault/vaults/{vaultName}")
@GET
@Fallback(NullOnNotFoundOr404.class)
Vault getVault(@PathParam("vaultName") String vaultName);
@Named("vault:delete")
@Path("/resourcegroups/{resourcegroup}/providers/Microsoft.KeyVault/vaults/{vaultName}")
@DELETE
@Fallback(FalseOnNotFoundOr404.class)
boolean deleteVault(@PathParam("vaultName") String vaultName);
@Named("vault:list_deleted_vaults")
@Path("/providers/Microsoft.KeyVault/deletedVaults")
@GET
@SelectJson("value")
@Fallback(EmptyListOnNotFoundOr404.class)
List<DeletedVault> listDeletedVaults();
@Named("vault:get_deleted")
@GET
@Path("/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}")
@Fallback(NullOnNotFoundOr404.class)
DeletedVault getDeletedVault(@PathParam("location") String location, @PathParam("vaultName") String vaultName);
@Named("vault:purge")
@POST
@Fallback(FalseOnNotFoundOr404.class)
@Path("/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge")
boolean purgeVault(@PathParam("location") String location, @PathParam("vaultName") String vaultName);
// Key operations
@Named("key:list")
@SelectJson("value")
@GET
@Fallback(EmptyListOnNotFoundOr404.class)
@Path("/keys")
@OAuthResource("https://vault.azure.net")
List<Key> listKeys(@EndpointParam URI keyVaultUri);
@Named("key:create")
@POST
@MapBinder(BindToJsonPayload.class)
@Path("/keys/{keyName}/create")
@OAuthResource("https://vault.azure.net")
KeyBundle createKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName,
@Nullable @PayloadParam("attributes") KeyAttributes attributes,
@Nullable @PayloadParam("crv") String curveName, @Nullable @PayloadParam("key_ops") List<String> keyOps,
@PayloadParam("key_size") int keySize, @PayloadParam("kty") String keyType,
@Nullable @PayloadParam("tags") Map<String, String> tags);
@Named("key:import")
@PUT
@MapBinder(BindToJsonPayload.class)
@Path("/keys/{keyName}")
@OAuthResource("https://vault.azure.net")
KeyBundle importKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName,
@PayloadParam("Hsm") boolean hsm, @Nullable @PayloadParam("attributes") KeyAttributes attributes,
@Nullable @PayloadParam("key") JsonWebKey key, @Nullable @PayloadParam("tags") Map<String, String> tags);
@Named("key:get")
@GET
@Path("/keys/{keyName}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
KeyBundle getKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
@Named("key:delete")
@DELETE
@Path("/keys/{keyName}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
DeletedKeyBundle deleteKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
@Named("key:get_versions")
@GET
@SelectJson("value")
@Path("/keys/{keyName}/versions")
@Fallback(EmptyListOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
List<Key> getKeyVersions(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
@Named("key:update")
@PATCH
@MapBinder(BindToJsonPayload.class)
@Path("/keys/{keyName}{keyVersion}")
@OAuthResource("https://vault.azure.net")
KeyBundle updateKey(@EndpointParam URI vaultBaseUrl,
@PathParam("keyName") String keyName,
@Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
@Nullable @PayloadParam("attributes") KeyAttributes attributes,
@Nullable @PayloadParam("key_ops") List<String> keyOps,
@Nullable @PayloadParam("tags") Map<String, String> tags);
@Named("key:backup")
@POST
@SelectJson("value")
@Path("/keys/{keyName}/backup")
@OAuthResource("https://vault.azure.net")
String backupKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
@Named("key:restore")
@POST
@MapBinder(BindToJsonPayload.class)
@Path("/keys/restore")
@OAuthResource("https://vault.azure.net")
KeyBundle restoreKey(@EndpointParam URI vaultBaseUrl, @PayloadParam("value") String keyInfo);
// Soft-delete key operations
@Named("key:list_deleted")
@GET
@SelectJson("value")
@Path("/deletedkeys")
@Fallback(EmptyListOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
List<DeletedKeyBundle> listDeletedKeys(@EndpointParam URI vaultBaseUrl);
@Named("key:get_deleted")
@GET
@Path("/deletedkeys/{keyName}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
DeletedKeyBundle getDeletedKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
@Named("key:recover_deleted")
@POST
@Path("/deletedkeys/{keyName}/recover")
@OAuthResource("https://vault.azure.net")
KeyBundle recoverDeletedKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
@Named("key:purge_deleted")
@DELETE
@Path("/deletedkeys/{keyName}")
@Fallback(FalseOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
boolean purgeDeletedKey(@EndpointParam URI vaultBaseUrl, @PathParam("keyName") String keyName);
// Key cryptographic operations
@Named("key:crypto_encrypt")
@POST
@Path("/keys/{keyName}{keyVersion}/encrypt")
@MapBinder(BindToJsonPayload.class)
@OAuthResource("https://vault.azure.net")
KeyOperationResult encrypt(@EndpointParam URI vaultBaseUrl,
@PathParam("keyName") String keyName,
@Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
@PayloadParam("alg") String algorithm,
@PayloadParam("value") String value);
@Named("key:crypto_decrypt")
@POST
@Path("/keys/{keyName}{keyVersion}/decrypt")
@MapBinder(BindToJsonPayload.class)
@OAuthResource("https://vault.azure.net")
KeyOperationResult decrypt(@EndpointParam URI vaultBaseUrl,
@PathParam("keyName") String keyName,
@Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
@PayloadParam("alg") String algorithm,
@PayloadParam("value") String value);
@Named("key:crypto_sign")
@POST
@Path("/keys/{keyName}{keyVersion}/sign")
@MapBinder(BindToJsonPayload.class)
@OAuthResource("https://vault.azure.net")
KeyOperationResult sign(@EndpointParam URI vaultBaseUrl,
@PathParam("keyName") String keyName,
@Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
@PayloadParam("alg") String algorithm,
@PayloadParam("value") String value);
@Named("key:crypto_verify")
@POST
@Path("/keys/{keyName}{keyVersion}/verify")
@MapBinder(BindToJsonPayload.class)
@OAuthResource("https://vault.azure.net")
boolean verify(@EndpointParam URI vaultBaseUrl,
@PathParam("keyName") String keyName,
@Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
@PayloadParam("alg") String algorithm,
@PayloadParam("digest") String digest,
@PayloadParam("value") String value);
@Named("key:crypto_wrap")
@POST
@Path("/keys/{keyName}{keyVersion}/wrapkey")
@MapBinder(BindToJsonPayload.class)
@OAuthResource("https://vault.azure.net")
KeyOperationResult wrap(@EndpointParam URI vaultBaseUrl,
@PathParam("keyName") String keyName,
@Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
@PayloadParam("alg") String algorithm,
@PayloadParam("value") String value);
@Named("key:crypto_unwrap")
@POST
@Path("/keys/{keyName}{keyVersion}/unwrapkey")
@MapBinder(BindToJsonPayload.class)
@OAuthResource("https://vault.azure.net")
KeyOperationResult unwrap(@EndpointParam URI vaultBaseUrl,
@PathParam("keyName") String keyName,
@Nullable @PathParam("keyVersion") @ParamParser(PrependSlashOrEmptyString.class) String keyVersion,
@PayloadParam("alg") String algorithm,
@PayloadParam("value") String value);
// Secret operations
@Named("secret:list")
@SelectJson("value")
@GET
@Fallback(EmptyListOnNotFoundOr404.class)
@Path("/secrets")
@OAuthResource("https://vault.azure.net")
List<Secret> listSecrets(@EndpointParam URI keyVaultUri);
@Named("secret:set")
@PUT
@MapBinder(BindToJsonPayload.class)
@Path("/secrets/{secretName}")
@OAuthResource("https://vault.azure.net")
SecretBundle setSecret(@EndpointParam URI keyVaultUri, @PathParam("secretName") String secretName,
@Nullable @PayloadParam("attributes") SecretAttributes attributes,
@Nullable @PayloadParam("contentType") String contentType,
@Nullable @PayloadParam("tags") Map<String, String> tags, @PayloadParam("value") String value);
@Named("secret:get")
@GET
@Path("/secrets/{secretName}{secretVersion}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
SecretBundle getSecret(@EndpointParam URI vaultBaseUrl,
@PathParam("secretName") String secretName,
@Nullable @PathParam("secretVersion") @ParamParser(PrependSlashOrEmptyString.class) String secretVersion);
@Named("secret:delete")
@DELETE
@Path("/secrets/{secretName}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
DeletedSecretBundle deleteSecret(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
@Named("secret:get_versions")
@GET
@SelectJson("value")
@Path("/secrets/{secretName}/versions")
@Fallback(EmptyListOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
List<Secret> getSecretVersions(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
@Named("secret:update")
@PATCH
@MapBinder(BindToJsonPayload.class)
@Path("/secrets/{secretName}{secretVersion}")
@OAuthResource("https://vault.azure.net")
SecretBundle updateSecret(@EndpointParam URI vaultBaseUrl,
@PathParam("secretName") String secretName,
@Nullable @PathParam("secretVersion") @ParamParser(PrependSlashOrEmptyString.class) String secretVersion,
@Nullable @PayloadParam("attributes") SecretAttributes attributes,
@Nullable @PayloadParam("contentType") String contentType,
@Nullable @PayloadParam("tags") Map<String, String> tags);
@Named("secret:backup")
@POST
@SelectJson("value")
@Path("/secrets/{secretName}/backup")
@OAuthResource("https://vault.azure.net")
String backupSecret(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
@Named("secret:restore")
@POST
@MapBinder(BindToJsonPayload.class)
@Path("/secrets/restore")
@OAuthResource("https://vault.azure.net")
SecretBundle restoreSecret(@EndpointParam URI vaultBaseUrl, @PayloadParam("value") String secretInfo);
// Soft-delete secret operations
@Named("secret:list_deleted")
@GET
@SelectJson("value")
@Path("/deletedsecrets")
@Fallback(EmptyListOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
List<DeletedSecretBundle> listDeletedSecrets(@EndpointParam URI vaultBaseUrl);
@Named("secret:get_deleted")
@GET
@Path("/deletedsecrets/{secretName}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
DeletedSecretBundle getDeletedSecret(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
@Named("secret:recover_deleted")
@POST
@Path("/deletedsecrets/{secretName}/recover")
@OAuthResource("https://vault.azure.net")
SecretBundle recoverDeletedSecret(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
@Named("secret:purge_deleted")
@DELETE
@Path("/deletedsecrets/{secretName}")
@Fallback(FalseOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
boolean purgeDeletedSecret(@EndpointParam URI vaultBaseUrl, @PathParam("secretName") String secretName);
// Certificate operations
@Named("certificate:create")
@POST
@MapBinder(BindToJsonPayload.class)
@Path("/certificates/{certificateName}/create")
@OAuthResource("https://vault.azure.net")
CertificateOperation createCertificate(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName,
@Nullable @PayloadParam("attributes") CertificateAttributes attributes,
@Nullable @PayloadParam("policy") CertificatePolicy policy,
@Nullable @PayloadParam("tags") Map<String, String> tags);
@Named("certificate:get")
@GET
@Path("/certificates/{certificateName}{certificateVersion}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
CertificateBundle getCertificate(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName,
@Nullable @PathParam("certificateVersion") @ParamParser(PrependSlashOrEmptyString.class) String certificateVersion);
@Named("certificate:delete")
@DELETE
@Path("/certificates/{certificateName}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
DeletedCertificateBundle deleteCertificate(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName);
@Named("certificate:list")
@GET
@SelectJson("value")
@Path("/certificates")
@Fallback(EmptyListOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
List<Certificate> getCertificates(@EndpointParam URI vaultBaseUrl);
@Named("certificate:list_deleted")
@GET
@SelectJson("value")
@Path("/deletedcertificates")
@Fallback(EmptyListOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
List<DeletedCertificate> getDeletedCertificates(@EndpointParam URI vaultBaseUrl);
@Named("certificate:get_deleted")
@GET
@Path("/deletedcertificates/{certificateName}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
DeletedCertificateBundle getDeletedCertificate(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName);
@Named("certificate:recover_deleted")
@POST
@Path("/deletedcertificates/{certificateName}/recover")
@OAuthResource("https://vault.azure.net")
CertificateBundle recoverDeletedCertificate(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName);
@Named("certificate:purge_deleted")
@DELETE
@Path("/deletedcertificates/{certificateName}")
@Fallback(FalseOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
boolean purgeDeletedCertificate(@EndpointParam URI vaultBaseUrl, @PathParam("certificateName") String certificateName);
@Named("certificate:get_versions")
@GET
@SelectJson("value")
@Path("/certificates/{certificateName}/versions")
@Fallback(EmptyListOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
List<Certificate> getCertificateVersions(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName);
@Named("certificate:update")
@PATCH
@MapBinder(BindToJsonPayload.class)
@Path("/certificates/{certificateName}{certificateVersion}")
@OAuthResource("https://vault.azure.net")
CertificateBundle updateCertificate(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName,
@Nullable @PathParam("certificateVersion") @ParamParser(PrependSlashOrEmptyString.class) String certificateVersion,
@Nullable @PayloadParam("attributes") CertificateAttributes attributes,
@Nullable @PayloadParam("policy") CertificatePolicy policy,
@Nullable @PayloadParam("tags") Map<String, String> tags);
@Named("certificate:import")
@POST
@MapBinder(BindToJsonPayload.class)
@Path("/certificates/{certificateName}/import")
@OAuthResource("https://vault.azure.net")
CertificateBundle importCertificate(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName,
@Nullable @PayloadParam("attributes") CertificateAttributes attributes,
@Nullable @PayloadParam("policy") CertificatePolicy policy, @Nullable @PayloadParam("pwd") String password,
@Nullable @PayloadParam("tags") Map<String, String> tags, @PayloadParam("value") String value);
@Named("certificate:merge")
@POST
@MapBinder(BindToJsonPayload.class)
@Path("/certificates/{certificateName}/pending/merge")
@OAuthResource("https://vault.azure.net")
CertificateBundle mergeCertificate(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName,
@Nullable @PayloadParam("attributes") CertificateAttributes attributes,
@Nullable @PayloadParam("tags") Map<String, String> tags, @PayloadParam("x5c") List<String> value);
@Named("certificate:get_operation")
@GET
@Path("/certificates/{certificateName}/pending")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
CertificateOperation getCertificateOperation(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName);
@Named("certificate:update_operation")
@PATCH
@Path("/certificates/{certificateName}/pending")
@MapBinder(BindToJsonPayload.class)
@OAuthResource("https://vault.azure.net")
CertificateOperation updateCertificateOperation(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName,
@PayloadParam("cancellation_requested") boolean cancellationRequested);
@Named("certificate:delete_operation")
@DELETE
@Path("/certificates/{certificateName}/pending")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
CertificateOperation deleteCertificateOperation(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName);
@Named("certificate:set_issuer")
@PUT
@Path("/certificates/issuers/{issuerName}")
@MapBinder(BindToJsonPayload.class)
@OAuthResource("https://vault.azure.net")
IssuerBundle setCertificateIssuer(@EndpointParam URI vaultBaseUrl, @PathParam("issuerName") String issuerName,
@Nullable @PayloadParam("attributes") IssuerAttributes attributes,
@Nullable @PayloadParam("credentials") IssuerCredentials credentials,
@Nullable @PayloadParam("org_details") OrganizationDetails orgDetails,
@PayloadParam("provider") String provider);
@Named("certificate:get_issuers")
@GET
@SelectJson("value")
@Path("/certificates/issuers")
@Fallback(EmptyListOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
List<CertificateIssuer> getCertificateIssuers(@EndpointParam URI vaultBaseUrl);
@Named("certificate:get_issuer")
@GET
@Path("/certificates/issuers/{issuerName}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
IssuerBundle getCertificateIssuer(@EndpointParam URI vaultBaseUrl, @PathParam("issuerName") String issuerName);
@Named("certificate:update_issuer")
@PATCH
@Path("/certificates/issuers/{issuerName}")
@MapBinder(BindToJsonPayload.class)
@OAuthResource("https://vault.azure.net")
IssuerBundle updateCertificateIssuer(@EndpointParam URI vaultBaseUrl, @PathParam("issuerName") String issuerName,
@Nullable @PayloadParam("attributes") IssuerAttributes attributes,
@Nullable @PayloadParam("credentials") IssuerCredentials credentials,
@Nullable @PayloadParam("org_details") OrganizationDetails orgDetails,
@PayloadParam("provider") String provider);
@Named("certificate:delete_issuer")
@DELETE
@Path("/certificates/issuers/{issuerName}")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
IssuerBundle deleteCertificateIssuer(@EndpointParam URI vaultBaseUrl, @PathParam("issuerName") String issuerName);
@Named("certificate:get_contacts")
@GET
@Path("/certificates/contacts")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
Contacts getCertificateContacts(@EndpointParam URI vaultBaseUrl);
@Named("certificate:set_contacts")
@PUT
@Path("/certificates/contacts")
@MapBinder(BindToJsonPayload.class)
@OAuthResource("https://vault.azure.net")
Contacts setCertificateContacts(@EndpointParam URI vaultBaseUrl, @PayloadParam("contacts") List<Contact> contacts);
@Named("certificate:delete_contacts")
@DELETE
@Path("/certificates/contacts")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
Contacts deleteCertificateContacts(@EndpointParam URI vaultBaseUrl);
@Named("certificate:get_policy")
@GET
@Path("/certificates/{certificateName}/policy")
@Fallback(NullOnNotFoundOr404.class)
@OAuthResource("https://vault.azure.net")
CertificatePolicy getCertificatePolicy(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName);
@Named("certificate:update_policy")
@PATCH
@MapBinder(BindToJsonPayload.class)
@Path("/certificates/{certificateName}/policy")
@OAuthResource("https://vault.azure.net")
CertificatePolicy updateCertificatePolicy(@EndpointParam URI vaultBaseUrl,
@PathParam("certificateName") String certificateName,
@Nullable @PayloadParam("attributes") CertificateAttributes attributes,
@Nullable @PayloadParam("issuer") IssuerParameters issuer,
@Nullable @PayloadParam("key_props") KeyProperties keyProps,
@Nullable @PayloadParam("lifetime_actions") List<LifetimeAction> lifetimeActions,
@Nullable @PayloadParam("secret_props") SecretProperties secretProps,
@Nullable @PayloadParam("x509_props") X509CertificateProperties x509Props);
}

View File

@ -39,7 +39,7 @@ import java.util.Properties;
import java.util.Set;
import org.jclouds.azurecompute.arm.AzureComputeApi;
import org.jclouds.azurecompute.arm.compute.config.AzureComputeServiceContextModule.PublicIpAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.PublicIpAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.compute.domain.ResourceGroupAndName;
import org.jclouds.azurecompute.arm.domain.AvailabilitySet;
import org.jclouds.azurecompute.arm.domain.AvailabilitySet.AvailabilitySetProperties;

View File

@ -17,21 +17,42 @@
package org.jclouds.azurecompute.arm.internal;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
import static org.jclouds.compute.config.ComputeServiceProperties.TIMEOUT_IMAGE_AVAILABLE;
import static org.jclouds.util.Predicates2.retry;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.TIMEOUT_RESOURCE_DELETED;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_DELETE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_SECRET_DELETE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_SECRET_RECOVERABLE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_KEY_DELETED_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_KEY_RECOVERABLE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_DELETE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_RECOVERABLE_STATUS;
import static org.jclouds.azurecompute.arm.config.AzureComputeProperties.VAULT_CERTIFICATE_OPERATION_STATUS;
import java.io.IOException;
import java.net.URI;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;
import java.util.Random;
import com.google.common.base.Charsets;
import com.google.common.base.Throwables;
import com.google.common.io.Resources;
import org.jclouds.apis.BaseApiLiveTest;
import org.jclouds.azurecompute.arm.AzureComputeApi;
import org.jclouds.azurecompute.arm.compute.config.AzureComputeServiceContextModule.PublicIpAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.config.Tenant;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultPredicates.DeletedVaultStatusPredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultKeyPredicates.DeletedKeyStatusPredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultKeyPredicates.RecoverableKeyStatusPredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultSecretPredicates.DeletedSecretStatusPredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultSecretPredicates.RecoverableSecretStatusPredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultCertificatePredicates.CertificateOperationStatusPredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultCertificatePredicates.DeletedCertificateStatusPredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.VaultCertificatePredicates.RecoverableCertificateStatusPredicateFactory;
import org.jclouds.azurecompute.arm.compute.config.AzurePredicatesModule.PublicIpAvailablePredicateFactory;
import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroup;
import org.jclouds.azurecompute.arm.domain.NetworkSecurityGroupProperties;
import org.jclouds.azurecompute.arm.domain.NetworkSecurityRule;
@ -47,11 +68,11 @@ import com.google.common.base.Predicate;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.Module;
import com.google.inject.TypeLiteral;
import com.google.inject.name.Names;
import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.Key;
import com.google.inject.TypeLiteral;
public class BaseAzureComputeApiLiveTest extends BaseApiLiveTest<AzureComputeApi> {
@ -64,12 +85,22 @@ public class BaseAzureComputeApiLiveTest extends BaseApiLiveTest<AzureComputeApi
protected Predicate<URI> resourceDeleted;
protected PublicIpAvailablePredicateFactory publicIpAvailable;
protected Predicate<Supplier<Provisionable>> resourceAvailable;
protected DeletedVaultStatusPredicateFactory deletedVaultStatus;
protected DeletedKeyStatusPredicateFactory deletedKeyStatus;
protected RecoverableKeyStatusPredicateFactory recoverableKeyStatus;
protected DeletedSecretStatusPredicateFactory deletedSecretStatus;
protected RecoverableSecretStatusPredicateFactory recoverableSecretStatus;
protected DeletedCertificateStatusPredicateFactory deletedCertificateStatus;
protected RecoverableCertificateStatusPredicateFactory recoverableCertificateStatus;
protected CertificateOperationStatusPredicateFactory certificateOperationStatus;
protected String resourceGroupName;
protected String vaultResourceGroup;
protected String vaultName;
protected String vaultCertificateUrl;
protected String tenantId;
public BaseAzureComputeApiLiveTest() {
provider = "azurecompute-arm";
@ -110,6 +141,16 @@ public class BaseAzureComputeApiLiveTest extends BaseApiLiveTest<AzureComputeApi
publicIpAvailable = injector.getInstance(PublicIpAvailablePredicateFactory.class);
resourceAvailable = injector.getInstance(Key.get(new TypeLiteral<Predicate<Supplier<Provisionable>>>() {
}));
deletedVaultStatus = injector.getInstance(Key.get(DeletedVaultStatusPredicateFactory.class, Names.named(VAULT_DELETE_STATUS)));
deletedKeyStatus = injector.getInstance(Key.get(DeletedKeyStatusPredicateFactory.class, Names.named(VAULT_KEY_DELETED_STATUS)));
recoverableKeyStatus = injector.getInstance(Key.get(RecoverableKeyStatusPredicateFactory.class, Names.named(VAULT_KEY_RECOVERABLE_STATUS)));
deletedSecretStatus = injector.getInstance(Key.get(DeletedSecretStatusPredicateFactory.class, Names.named(VAULT_SECRET_DELETE_STATUS)));
recoverableSecretStatus = injector.getInstance(Key.get(RecoverableSecretStatusPredicateFactory.class, Names.named(VAULT_SECRET_RECOVERABLE_STATUS)));
deletedCertificateStatus = injector.getInstance(Key.get(DeletedCertificateStatusPredicateFactory.class, Names.named(VAULT_CERTIFICATE_DELETE_STATUS)));
recoverableCertificateStatus = injector.getInstance(Key.get(RecoverableCertificateStatusPredicateFactory.class, Names.named(VAULT_CERTIFICATE_RECOVERABLE_STATUS)));
certificateOperationStatus = injector.getInstance(Key.get(CertificateOperationStatusPredicateFactory.class, Names.named(VAULT_CERTIFICATE_OPERATION_STATUS)));
tenantId = injector.getInstance(Key.get(String.class, Tenant.class));
return injector.getInstance(AzureComputeApi.class);
}
@ -198,4 +239,11 @@ public class BaseAzureComputeApiLiveTest extends BaseApiLiveTest<AzureComputeApi
return subscriptionId;
}
protected String stringFromResource(String resourceName) {
try {
return Resources.toString(getClass().getResource(resourceName), Charsets.UTF_8);
} catch (IOException e) {
throw Throwables.propagate(e);
}
}
}

View File

@ -26,6 +26,7 @@ import static org.testng.Assert.assertEquals;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Properties;
import java.util.Set;
@ -71,7 +72,7 @@ public class BaseAzureComputeApiMockTest {
private final JsonParser parser = new JsonParser();
@BeforeMethod
public void start() throws IOException {
public void start() throws IOException, URISyntaxException {
server = new MockWebServer();
server.play();
@ -148,10 +149,19 @@ public class BaseAzureComputeApiMockTest {
"https://management.azure.com/subscriptions/SUBSCRIPTIONID/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SVEVTVC1DRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6ImNlbnRyYWx1cyJ9?api-version=2014-04-01");
}
protected MockResponse response200WithHeader() {
return new MockResponse()
.setStatus("HTTP/1.1 200 O")
.addHeader("Location", "https://management.azure.com/subscriptions/SUBSCRIPTIONID/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1SVEVTVC1DRU5UUkFMVVMiLCJqb2JMb2NhdGlvbiI6ImNlbnRyYWx1cyJ9?api-version=2014-04-01");
}
protected String stringFromResource(String resourceName) {
try {
return Resources.toString(getClass().getResource(resourceName), Charsets.UTF_8).replace(DEFAULT_ENDPOINT,
url(""));
String rsrc = Resources.toString(getClass().getResource(resourceName), Charsets.UTF_8);
if (rsrc.contains(DEFAULT_ENDPOINT)) {
rsrc = rsrc.replace(DEFAULT_ENDPOINT, url(""));
}
return rsrc;
} catch (IOException e) {
throw Throwables.propagate(e);
}

View File

@ -0,0 +1,60 @@
{
"id": "/subscriptions/012e832d-7b27-4c30-9f21-22cdd9159d12/resourceGroups/rg-vaultapilivetest-andrea/providers/Microsoft.KeyVault/vaults/vaultapilivetest-andrea",
"name": "vaultapilivetest-andrea",
"type": "Microsoft.KeyVault/vaults",
"location": "westeurope",
"tags": {},
"properties": {
"sku": {
"family": "A",
"name": "Standard"
},
"tenantId": "ba85e8cd-8c83-486e-a7e3-0d7666169d34",
"accessPolicies": [
{
"tenantId": "ba85e8cd-8c83-486e-a7e3-0d7666169d34",
"objectId": "b025a8c0-d7fa-42fd-8e62-d988a3f12791",
"permissions": {
"keys": [
"Get",
"List",
"Update",
"Create",
"Import",
"Delete",
"Recover",
"Backup",
"Restore"
],
"secrets": [
"Get",
"List",
"Set",
"Delete",
"Recover",
"Backup",
"Restore"
],
"certificates": [
"Get",
"List",
"Update",
"Create",
"Import",
"Delete",
"ManageContacts",
"ManageIssuers",
"GetIssuers",
"ListIssuers",
"SetIssuers",
"DeleteIssuers"
]
}
}
],
"enabledForDeployment": false,
"enabledForDiskEncryption": false,
"enabledForTemplateDeployment": false,
"vaultUri": "https://vaultapilivetest-andrea.vault.azure.net/"
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,26 @@
{
"id": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourceGroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults/kvvaultapilivetest",
"name": "kvvaultapilivetest",
"type": "Microsoft.KeyVault/vaults",
"location": "westeurope",
"tags": {},
"properties": {
"sku": {
"family": "A",
"name": "standard"
},
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"accessPolicies": [{
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"objectId": "5a7f4cb9-ce9d-4b31-87ce-f61083c4b0ea",
"permissions": {
"certificates": ["Get", "List", "Update", "Create", "Import", "Delete", "ManageContacts", "ManageIssuers", "GetIssuers", "ListIssuers", "SetIssuers", "DeleteIssuers", "Purge", "Recover"],
"keys": ["Get", "List", "Update", "Create", "Import", "Delete", "Recover", "Backup", "Restore", "Purge"],
"secrets": ["Get", "List", "Set", "Delete", "Recover", "Backup", "Restore", "Purge"],
"storage": []
}
}],
"enabledForDeployment": false,
"vaultUri": "https://kvvaultapilivetest.vault.azure.net"
}
}

View File

@ -0,0 +1,11 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/pending",
"issuer": {
"name": "Self"
},
"csr": "MIICszCCAZsCAQAwIzEhMB8GA1UEAxMYbXljZXJ0aWZpY2F0ZS5mb29iYXIuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArrIwtQO60BI1vUkS/Vx0TQ5dBLjWBFfQFUHABJoKXCeloLrHWrWnhaxyj5jvEVGYF5OLBNeHd6PR43bmHKnzq3vhQXUA1sKBRxAJavSM9a+MKBpN39aKvSnqRNdnETE8kwNteIpbmDVMe18UnGtyhRbMKqJ73HpGyyRdiD8nTS9F65SCRQlKALNz0Vi3z52Loo6kRoZPAfcRkDAbbg7JxIuMEEcbrBR0dScR0m2OucYtR3PQ7PUQMXSsLwZmGAu1e/KuqjTNC6XpxRpWSTHf3kS1Q4LjNXde8sk1/5Xovzo/MlVQ7L2tt4pVK79ZkeePbL9ZSKsTc3Thi7G+o8pCewIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABoDgWVU0DqfhKsujIa4gUHyZKvRWhms0reqb4Ld9GkF4O6TV+TxibBUZRW3SSVvA+po8G7aX+E+si0BfQiwM1PutcK0f5WuYMiEkQ6xaiDhIblrouCYRCTiYmmt2+8iuKAtDNqgqMJjViGXUKcGQgz7UTEJY/LLlgxW2kDyfEJOhGls40AT7tuXAjZ6QPLT9vAdQ8B0L0JNzJ6lJcDe7KattWonjQ4cLZ7xvY0SwUyvabui1UkOFze/EEkLwnJjigvfWkzhoJS7j0Cp3nI08c5zd/rQGq1XNVb9plnjtQP0kwNVQdHVeTug9rqZCyuS3jqwa1prrXkZJyufMmuNSV0=",
"cancellation_requested": false,
"status": "inProgress",
"status_details": "Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.",
"request_id": "550fcfd2c33440aea6cd354658f91ddb"
}

View File

@ -0,0 +1,21 @@
{
"policy": {
"id": "myCertificate",
"issuer": {
"name": "Self"
},
"key_props": {
"exportable": false,
"key_size": 2048,
"kty": "RSA",
"reuse_key": false
},
"lifetime_actions": [],
"x509_props": {
"ekus": [],
"key_usage": [],
"subject": "CN\u003dmycertificate.foobar.com",
"validity_months": 12
}
}
}

View File

@ -0,0 +1,15 @@
{
"key": {
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/f5cfaa4b90a34710a646af83636a5c1b",
"kty": "RSA",
"key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
"n": "zattdXaoaTAnEDPv38dpgkLSuVp56_7TNczuyBGy3GOF62LgLEId1i7You5R4SGAXJDVDWBVAFIcbw3ppgbn-DgCf4QbAWWREQUOvPNhFvm78Ey6tewofP5jyrCDeSBkjlXC5lRgd8XtVXv0JvNtOU_GbTLMVAGOwPE-0nZWXaD__nkO90AS_2D1tDywcZ7vKix9WjkjYTmY1CEw06-vsQJSYSaaL2M5MmE-S21sgoGZUv7a0jHxDR2rEX3okFoW0sjynz6yxCZtYUmUyDMpWdTIaqKu9ZhfxZPtb6T9E8yAStvma0M5xc70gfOj1LJRK8mMhLmB4lh0POj-2a4fBw",
"e": "AQAB"
},
"attributes": {
"enabled": true,
"created": 1509314506,
"updated": 1509314506,
"recoveryLevel": "Purgeable"
}
}

View File

@ -0,0 +1,7 @@
{
"attributes": {
"enabled": true
},
"key_size": 2048,
"kty": "RSA"
}

View File

@ -0,0 +1,21 @@
{
"location": "westeurope",
"properties": {
"tenantId": "myTenantId",
"sku": {
"location": "westeurope",
"name": "standard",
"family": "A"
},
"accessPolicies": [{
"objectId": "myIdentityObjectId",
"tenantId": "myTenantId",
"permissions": {
"certificates": ["Get", "List", "Update", "Create", "Import", "Delete", "ManageContacts", "ManageIssuers", "GetIssuers", "ListIssuers", "SetIssuers", "DeleteIssuers", "Purge", "Recover"],
"keys": ["Get", "List", "Update", "Create", "Import", "Delete", "Recover", "Backup", "Restore", "Purge", "Encrypt", "Decrypt", "Sign", "Verify", "WrapKey", "UnwrapKey"],
"secrets": ["Get", "List", "Set", "Delete", "Recover", "Backup", "Restore", "Purge"],
"storage": []
}
}]
}
}

View File

@ -0,0 +1,58 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/b73ba4610dc24dca946f76933f6590dd",
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myCertificate/b73ba4610dc24dca946f76933f6590dd",
"sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myCertificate/b73ba4610dc24dca946f76933f6590dd",
"x5t": "K7HXO6YIK6xwCX8W1InUKsJV9Rk",
"cer": "MIIDTDCCAjSgAwIBAgIQVA+XomvgS56ybBWv2MnacjANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDExhteWNlcnRpZmljYXRlLmZvb2Jhci5jb20wHhcNMTcxMDMwMDY0NDI3WhcNMTgxMDMwMDY1NDI3WjAjMSEwHwYDVQQDExhteWNlcnRpZmljYXRlLmZvb2Jhci5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCusjC1A7rQEjW9SRL9XHRNDl0EuNYEV9AVQcAEmgpcJ6WgusdataeFrHKPmO8RUZgXk4sE14d3o9HjduYcqfOre+FBdQDWwoFHEAlq9Iz1r4woGk3f1oq9KepE12cRMTyTA214iluYNUx7XxSca3KFFswqonvcekbLJF2IPydNL0XrlIJFCUoAs3PRWLfPnYuijqRGhk8B9xGQMBtuDsnEi4wQRxusFHR1JxHSbY65xi1Hc9Ds9RAxdKwvBmYYC7V78q6qNM0LpenFGlZJMd/eRLVDguM1d17yyTX/lei/Oj8yVVDsva23ilUrv1mR549sv1lIqxNzdOGLsb6jykJ7AgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBRnlX51KtyJ/m/V8I/3il4cAW/HOzAdBgNVHQ4EFgQUZ5V+dSrcif5v1fCP94peHAFvxzswDQYJKoZIhvcNAQELBQADggEBAAbSFuMRMbXyH80iA/jU7vuUCYe0Ra/wTTB1qVHTBuqQ/W8RI01mdqI9+GAPOTyN94XPPYVpSz9ZQ3P0/dhgcsahW5bZQkC0CcUSE5R7JUOKI5Up6n8zZM/unHlC6ZcEpNA/scObPKhQXdZayxgf2/p30bii4CiyS7ADEH92xMnzo1Eu9Dckxh1MRDypfxMY9YIzggksiY78BxoNsRDyxNjeRHVUxAIJ3n9TUv+WG31r7rMOIs6ZPsWc96AzUHHAZREVTEh2kiKKIenbMXn1tCpF6/GJKGfp7rt5ObUoQAlnn7kgAceteKZHEMgRZ4c4EQq+yqBw3hJrz4dOabJcmcU=",
"attributes": {
"enabled": true,
"nbf": 1509345867,
"exp": 1540882467,
"created": 1509346467,
"updated": 1509346472,
"recoveryLevel": "Purgeable"
},
"tags": {
"selfsigned": "true"
},
"policy": {
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/policy",
"key_props": {
"exportable": true,
"kty": "RSA",
"key_size": 3072,
"reuse_key": false
},
"secret_props": {
"contentType": "application/x-pkcs12"
},
"x509_props": {
"subject": "CN=mycertificate.foobar.com",
"ekus": ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"],
"key_usage": ["digitalSignature", "keyEncipherment"],
"validity_months": 12,
"basic_constraints": {
"ca": false
}
},
"lifetime_actions": [{
"trigger": {
"lifetime_percentage": 80
},
"action": {
"action_type": "AutoRenew"
}
}],
"issuer": {
"name": "Self"
},
"attributes": {
"enabled": true,
"created": 1509346452,
"updated": 1509346474
}
},
"pending": {
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/pending"
}
}

View File

@ -0,0 +1,8 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/contacts",
"contacts": [{
"email": "foo@bar.com",
"name": "Foo bar",
"phone": "867-5309"
}]
}

View File

@ -0,0 +1,21 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/issuers/globalsign01",
"provider": "GlobalSign",
"credentials": {
"account_id": "imauser"
},
"org_details": {
"zip": 0,
"admin_details": [{
"first_name": "Admin",
"last_name": "Guy",
"email": "adminguy@certsforme.com",
"phone": "867-5309"
}]
},
"attributes": {
"enabled": true,
"created": 1509346474,
"updated": 1509346479
}
}

View File

@ -0,0 +1,11 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myTempCertificate/pending",
"issuer": {
"name": "Self"
},
"csr": "MIIEtzCCAp8CAQAwJzElMCMGA1UEAxMcbXl0ZW1wY2VydGlmaWNhdGUuZm9vYmFyLmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMmt2TbL1ndbSggTwx2l3k/ZUzt0IGO/FMB/oqpmc5izy2KGi0/uSoEdFA9cSqfctL3FGx2J1cFVTz287cvLB8HB3A4svAoPnKsZmKpXuYbF4fK2wQGXm/iNk+JVq1KL0lfoqW2g52lHDM85XURMn8YCkAGIKeTlOVyEn7EMBuBumcJbszj0g56Ij+VKmxoua/Ja4ONmIGsKdyZRBEuvFQ1GTnJUvCWHwyo1pT0M5EY/VL9ikc283DSvpQcfvNelQgQfWCpTRX1Q7nTUHk14DD4d/Y6OdbjcVuqE0Jdqdw6MXfU2zrkPo/nZBf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qWKdl3/oC7Gx+WbVzXxs37NEwt/tx8E+r1Nq/jRFxP0QlyyUdjpiPXjUpuCdn4y6erpCuahbMP+CZNCNgeEh1v2pNljuaGCIB+VA2Fz/oU=",
"cancellation_requested": true,
"status": "inProgress",
"status_details": "Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.",
"request_id": "32051e4e4ac947c5b9ad1b6737bee7c0"
}

View File

@ -0,0 +1,15 @@
{
"key": {
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/1374543b3de34500a97d075991ee3893",
"kty": "RSA",
"key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
"n": "tY2pzXPfU7NFYCWvZB1gJNAetkgJ7Qi75lTVOzVns9KjFFo6e_F9GSETZbAYl5oMwfLtdqQqT5fxzWDk0sYlz09HXvCCoYmbzobd3gJ6-WLAqhtCbBikr5HAIlCzy_UqKT--WhEw8AT_EJFBPIY9xNktqnaNZuRBmjmXinzT02qUmBZRsAdJmaYfG9IZSmToOkb54OytI5TreWN0JvceoQ3GSeFLMC5PUmXP6HmZliOzBBHWnXNq3H7a3qfWV3rxT2QpbrIuz18ZqOVp7o5868kN8knKytVcqEzmdiQUdabkqbrwuh-z_IEre9AqTfw6OjUUmLjs4lyKcpWLYFh8KJuML1ub-8u0VgNGwczUZ7aAld1iwGMsoMmQfMRDOnv-9pqtY-y40ZWpBGXpzFV-IvtKHnqQk_vWqowpE8xwx7yZ74z9XNgS9TmkVpcC-ONbEfNE1sez0Zf-RZ9eOm_7WSxxH6OJYtJI7wotBXYoy1bJaqo7mgHs1IUOFhSE-Evj",
"e": "AQAB"
},
"attributes": {
"enabled": true,
"created": 1509335925,
"updated": 1509335925,
"recoveryLevel": "Purgeable"
}
}

View File

@ -0,0 +1,10 @@
{
"contentType": "aNewSecretKey",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/8c418537cbc948539ea2ac12c0bfcfb4",
"attributes": {
"enabled": true,
"created": 1509335944,
"updated": 1509335944,
"recoveryLevel": "Purgeable"
}
}

View File

@ -0,0 +1,26 @@
{
"id": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourceGroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults/kvvaultapilivetest",
"name": "kvvaultapilivetest",
"type": "Microsoft.KeyVault/vaults",
"location": "westeurope",
"tags": {},
"properties": {
"sku": {
"family": "A",
"name": "standard"
},
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"accessPolicies": [{
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"objectId": "5a7f4cb9-ce9d-4b31-87ce-f61083c4b0ea",
"permissions": {
"certificates": ["Get", "List", "Update", "Create", "Import", "Delete", "ManageContacts", "ManageIssuers", "GetIssuers", "ListIssuers", "SetIssuers", "DeleteIssuers", "Purge", "Recover"],
"keys": ["Get", "List", "Update", "Create", "Import", "Delete", "Recover", "Backup", "Restore", "Purge"],
"secrets": ["Get", "List", "Set", "Delete", "Recover", "Backup", "Restore", "Purge"],
"storage": []
}
}],
"enabledForDeployment": false,
"vaultUri": "https://kvvaultapilivetest.vault.azure.net/"
}
}

View File

@ -0,0 +1,55 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/b73ba4610dc24dca946f76933f6590dd",
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myCertificate/b73ba4610dc24dca946f76933f6590dd",
"sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myCertificate/b73ba4610dc24dca946f76933f6590dd",
"x5t": "K7HXO6YIK6xwCX8W1InUKsJV9Rk",
"cer": "MIIDTDCCAjSgAwIBAgIQVA+XomvgS56ybBWv2MnacjANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDExhteWNlcnRpZmljYXRlLmZvb2Jhci5jb20wHhcNMTcxMDMwMDY0NDI3WhcNMTgxMDMwMDY1NDI3WjAjMSEwHwYDVQQDExhteWNlcnRpZmljYXRlLmZvb2Jhci5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCusjC1A7rQEjW9SRL9XHRNDl0EuNYEV9AVQcAEmgpcJ6WgusdataeFrHKPmO8RUZgXk4sE14d3o9HjduYcqfOre+FBdQDWwoFHEAlq9Iz1r4woGk3f1oq9KepE12cRMTyTA214iluYNUx7XxSca3KFFswqonvcekbLJF2IPydNL0XrlIJFCUoAs3PRWLfPnYuijqRGhk8B9xGQMBtuDsnEi4wQRxusFHR1JxHSbY65xi1Hc9Ds9RAxdKwvBmYYC7V78q6qNM0LpenFGlZJMd/eRLVDguM1d17yyTX/lei/Oj8yVVDsva23ilUrv1mR549sv1lIqxNzdOGLsb6jykJ7AgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBRnlX51KtyJ/m/V8I/3il4cAW/HOzAdBgNVHQ4EFgQUZ5V+dSrcif5v1fCP94peHAFvxzswDQYJKoZIhvcNAQELBQADggEBAAbSFuMRMbXyH80iA/jU7vuUCYe0Ra/wTTB1qVHTBuqQ/W8RI01mdqI9+GAPOTyN94XPPYVpSz9ZQ3P0/dhgcsahW5bZQkC0CcUSE5R7JUOKI5Up6n8zZM/unHlC6ZcEpNA/scObPKhQXdZayxgf2/p30bii4CiyS7ADEH92xMnzo1Eu9Dckxh1MRDypfxMY9YIzggksiY78BxoNsRDyxNjeRHVUxAIJ3n9TUv+WG31r7rMOIs6ZPsWc96AzUHHAZREVTEh2kiKKIenbMXn1tCpF6/GJKGfp7rt5ObUoQAlnn7kgAceteKZHEMgRZ4c4EQq+yqBw3hJrz4dOabJcmcU=",
"attributes": {
"enabled": true,
"nbf": 1509345867,
"exp": 1540882467,
"created": 1509346467,
"updated": 1509346467,
"recoveryLevel": "Purgeable"
},
"policy": {
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/policy",
"key_props": {
"exportable": false,
"kty": "RSA",
"key_size": 2048,
"reuse_key": false
},
"secret_props": {
"contentType": "application/x-pkcs12"
},
"x509_props": {
"subject": "CN=mycertificate.foobar.com",
"ekus": ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"],
"key_usage": ["digitalSignature", "keyEncipherment"],
"validity_months": 12,
"basic_constraints": {
"ca": false
}
},
"lifetime_actions": [{
"trigger": {
"lifetime_percentage": 80
},
"action": {
"action_type": "AutoRenew"
}
}],
"issuer": {
"name": "Self"
},
"attributes": {
"enabled": true,
"created": 1509346452,
"updated": 1509346452
}
},
"pending": {
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/pending"
}
}

View File

@ -0,0 +1,8 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/contacts",
"contacts": [{
"email": "foo@bar.com",
"name": "Foo bar",
"phone": "867-5309"
}]
}

View File

@ -0,0 +1,21 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/issuers/globalsign01",
"provider": "GlobalSign",
"credentials": {
"account_id": "imauser"
},
"org_details": {
"zip": 0,
"admin_details": [{
"first_name": "Admin",
"last_name": "Guy",
"email": "adminguy@certsforme.com",
"phone": "867-5309"
}]
},
"attributes": {
"enabled": true,
"created": 1509346474,
"updated": 1509346474
}
}

View File

@ -0,0 +1,11 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/pending",
"issuer": {
"name": "Self"
},
"csr": "MIICszCCAZsCAQAwIzEhMB8GA1UEAxMYbXljZXJ0aWZpY2F0ZS5mb29iYXIuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArrIwtQO60BI1vUkS/Vx0TQ5dBLjWBFfQFUHABJoKXCeloLrHWrWnhaxyj5jvEVGYF5OLBNeHd6PR43bmHKnzq3vhQXUA1sKBRxAJavSM9a+MKBpN39aKvSnqRNdnETE8kwNteIpbmDVMe18UnGtyhRbMKqJ73HpGyyRdiD8nTS9F65SCRQlKALNz0Vi3z52Loo6kRoZPAfcRkDAbbg7JxIuMEEcbrBR0dScR0m2OucYtR3PQ7PUQMXSsLwZmGAu1e/KuqjTNC6XpxRpWSTHf3kS1Q4LjNXde8sk1/5Xovzo/MlVQ7L2tt4pVK79ZkeePbL9ZSKsTc3Thi7G+o8pCewIDAQABoEswSQYJKoZIhvcNAQkOMTwwOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAkGA1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBABoDgWVU0DqfhKsujIa4gUHyZKvRWhms0reqb4Ld9GkF4O6TV+TxibBUZRW3SSVvA+po8G7aX+E+si0BfQiwM1PutcK0f5WuYMiEkQ6xaiDhIblrouCYRCTiYmmt2+8iuKAtDNqgqMJjViGXUKcGQgz7UTEJY/LLlgxW2kDyfEJOhGls40AT7tuXAjZ6QPLT9vAdQ8B0L0JNzJ6lJcDe7KattWonjQ4cLZ7xvY0SwUyvabui1UkOFze/EEkLwnJjigvfWkzhoJS7j0Cp3nI08c5zd/rQGq1XNVb9plnjtQP0kwNVQdHVeTug9rqZCyuS3jqwa1prrXkZJyufMmuNSV0=",
"cancellation_requested": false,
"status": "inProgress",
"status_details": "Pending certificate created. Certificate request is in progress. This may take some time based on the issuer provider. Please check again later.",
"request_id": "550fcfd2c33440aea6cd354658f91ddb"
}

View File

@ -0,0 +1,37 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/policy",
"key_props": {
"exportable": false,
"kty": "RSA",
"key_size": 2048,
"reuse_key": false
},
"secret_props": {
"contentType": "application/x-pkcs12"
},
"x509_props": {
"subject": "CN=mycertificate.foobar.com",
"ekus": ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"],
"key_usage": ["digitalSignature", "keyEncipherment"],
"validity_months": 12,
"basic_constraints": {
"ca": false
}
},
"lifetime_actions": [{
"trigger": {
"lifetime_percentage": 80
},
"action": {
"action_type": "AutoRenew"
}
}],
"issuer": {
"name": "Self"
},
"attributes": {
"enabled": true,
"created": 1509346452,
"updated": 1509346452
}
}

View File

@ -0,0 +1,12 @@
{
"id": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/providers/Microsoft.KeyVault/locations/westeurope/deletedVaults/kvvaultapilivetest",
"name": "kvvaultapilivetest",
"type": "Microsoft.KeyVault/deletedVaults",
"properties": {
"vaultId": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourceGroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults/kvvaultapilivetest",
"location": "westeurope",
"tags": {},
"deletionDate": "2017-10-29T22:06:02Z",
"scheduledPurgeDate": "2018-01-27T22:06:02Z"
}
}

View File

@ -0,0 +1,55 @@
{
"recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedcertificates/myRecoverableCertificate",
"deletedDate": 1509346545,
"scheduledPurgeDate": 1517122545,
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
"sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
"x5t": "-qEnW6P9TdfOOXzbNQNS5ZKveRo",
"cer": "MIIFNDCCAxygAwIBAgICQ0MwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExDzANBgNVBAoMBkZvb2JhcjEhMB8GA1UEAwwYRm9vYmFyIEludGVybWVkaWF0ZSBDQSAxMB4XDTE3MTAyODIyNTIxNFoXDTE4MTEwNzIyNTIxNFowUTELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExDzANBgNVBAoMBkZvb2JhcjEcMBoGA1UEAwwTdGVzdHNpdGUuZm9vYmFyLmNvbTCCASIwDQYJKoZIhvc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6Ekls+wu8G5FAmbtOEV0WOafGvdcnELn5IPXlkvLbiRx5EChG+nF3XrLgn3dBQwP2cGrI/IPRm1XfaaBAkMSkf6St5TX3C40g1CGcNSVoKBYBB2Di+hPXwTHImGggR1JF34ljHCokMoPxmr7lP9pam0dhP/SSpIwxfsvDJylBgUEqTr3tsVDIDfMtJjudK7A7H1HMoqEiqlzRvJIEZ1koOxANFcQ1f9am2PPUNFvfK9IbLQlV8d4k1w6xBAeOVke79lJI9pTTCSVb+PTDniEL79JXjmjQUoKE4zo1u41d+wLu3dEGM27GI7BdLYt6bRsolZvrbey7Nn4c0t4ug4B4GTd1SLLVJns/IRLBrNr1anBJ7u9WFruBUEWwtdxAwSoXdtIIQ==",
"attributes": {
"enabled": true,
"nbf": 1509231134,
"exp": 1541631134,
"created": 1509346510,
"updated": 1509346510,
"recoveryLevel": "Recoverable+Purgeable"
},
"policy": {
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myRecoverableCertificate/policy",
"key_props": {
"exportable": true,
"kty": "RSA",
"key_size": 2048,
"reuse_key": false
},
"secret_props": {
"contentType": "application/x-pem-file"
},
"x509_props": {
"subject": "CN=testsite.foobar.com, O=Foobar, S=California, C=US",
"ekus": ["1.3.6.1.5.5.7.3.1"],
"key_usage": ["digitalSignature", "keyEncipherment"],
"validity_months": 13,
"basic_constraints": {
"ca": false
}
},
"lifetime_actions": [{
"trigger": {
"lifetime_percentage": 80
},
"action": {
"action_type": "EmailContacts"
}
}],
"issuer": {
"name": "Unknown"
},
"attributes": {
"enabled": true,
"created": 1509346510,
"updated": 1509346510
}
}
}

View File

@ -0,0 +1,18 @@
{
"recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedkeys/myRecoverableKey",
"deletedDate": 1509335960,
"scheduledPurgeDate": 1517111960,
"key": {
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myRecoverableKey/274f6c69b94b41359a5932226425eb43",
"kty": "RSA",
"key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
"n": "urhKlXbEGvYetOSH-GLytvSJ5djS0-5SKBtFOlJ2885PE0s_ZbnkRURDm2fImv_RV763HKSUQbEolQNs8I99N-3uCkrDStVZ6MPii9-0U6lrEkX7LrMRNYCfPAaSSZhSjCbsyqX9Y-N_A5Jz9uHNuXvpjQ9N7ojUK7fqqhnJKcJ6l6YsGOhGCD3uei4SL5GzbSAn2auIK51lj77UXjBZaudnNWTiKaCbTAmSmEe13DOJkg82_7Y1eWea3NJn4T2nY8WqRJCp4hzBsPBmFXjE1lgFWcSjm_afiSb0mCUP7v7tSOLR3xUBv9WgMO7p4_ce_--A9ZWP418Uqq0COcHAWQ",
"e": "AQAB"
},
"attributes": {
"enabled": true,
"created": 1509335950,
"updated": 1509335950,
"recoveryLevel": "Recoverable+Purgeable"
}
}

View File

@ -0,0 +1,13 @@
{
"recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedsecrets/myRecoverableSecret",
"deletedDate": 1509335980,
"scheduledPurgeDate": 1517111980,
"contentType": "aNewSecretKey",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/myRecoverableSecret/d7194ca6b0214d0ba382353109cd7e58",
"attributes": {
"enabled": true,
"created": 1509335958,
"updated": 1509335958,
"recoveryLevel": "Recoverable+Purgeable"
}
}

View File

@ -0,0 +1,15 @@
{
"key": {
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/bd6566ec707e4ad89f4ab9577d9d0bef",
"kty": "RSA",
"key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
"n": "2ZWsir4hwVxFTQXfWN7Vy1zA33jg1kxUMHmkmEFtVjGDByzmMfEXpnPziNCtYppBtpNT4AJEVQ60aIgSLNrUYBMoeiI2HCf2NM0NTdwYp7wq5tImtbGDASdDXQ1v3Bv3hXGh3CVmN2VLRf0OmoXnZUG_2UZZ05iPXOY6lNFfq8L81v0ZCMiXwFvNVhZ_fzppzhnwuHQf-X6Lnvrd1ocFqF8IFjV3663eumAfZmBLPP6tmiAZYW3G68_G0I2CHLtTPFX05aN51Jn42RITgcs63HFMT_iVW5556YR0BwtqkCXIUgTD714Fipz7EKGqhHsqND7YUSKpiRVQhfoZEckAkQ",
"e": "AQAB"
},
"attributes": {
"enabled": true,
"created": 1509335902,
"updated": 1509335902,
"recoveryLevel": "Purgeable"
}
}

View File

@ -0,0 +1,23 @@
{
"value": [{
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/1374543b3de34500a97d075991ee3893",
"attributes": {
"enabled": true,
"created": 1509335925,
"updated": 1509335925,
"recoveryLevel": "Purgeable"
}
}, {
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/bd6566ec707e4ad89f4ab9577d9d0bef",
"attributes": {
"enabled": true,
"created": 1509335902,
"updated": 1509335923,
"recoveryLevel": "Purgeable"
},
"tags": {
"purpose": "testing"
}
}],
"nextLink": null
}

View File

@ -0,0 +1,11 @@
{
"value": "-----BEGIN RSA PRIVATE KEY-----\\nMIIEogIBAAKCAQEAvZiOgV6b4EmGiasBskXYnTaRyWzBHBGnWB11BzFN3FGigfWx\\nVvjI7Ox1SHTx+vGsnjbqQPvIP4JnPEsNcWLyHa6tNAcnj/M7BuyIwdD5+Hvs6kOe\\nPuSOJUf8dRjPMUpr6rcUcBmmOwTnKOH4rdpb6jXNnuCIHP+lgXCeRWveZ62TjEB+\\n9aB8W8UHH854FGebiUd/aY0tpCFC7wkWz3KbgmjmY2vSe2U98Yj4+l/IWydIZ7ON\\nLicteEEIGbNM0o2QSYhQBCJSw5RixDpPlrUUB094qgqUOyW0k8PvjibGxxTh0LYy\\nWqWydPF0XaqFRQ6v36UvEiVGwzVsLwsJL/QVtQIDAQABAoIBAEJ6790lE3s9zNMR\\nB3M/UoktzUjXvY7eEdOv4I05GJgcd+MiB6D7c1jAQQ+7Ee5wN5rynolSwBCk5RYb\\nKweLLmKCEXGg4Jp1K0luPzXW1Q/wRE6Qjzh2Y/FmoHtey6f49IZE1AHKvKMNQRDw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nU1AIlNCIkfsQ5CpIoYsVoNEM8P+GyS8B9kaEmk/FVKldRTKJqkI=\\n-----END RSA PRIVATE KEY-----\\n",
"contentType": "testSecretKey",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/b936ececbc674f3bb1367ae50d28ada0",
"attributes": {
"enabled": true,
"created": 1509335932,
"updated": 1509335932,
"recoveryLevel": "Purgeable"
}
}

View File

@ -0,0 +1,25 @@
{
"value": [{
"contentType": "aNewSecretKey",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/8c418537cbc948539ea2ac12c0bfcfb4",
"attributes": {
"enabled": true,
"created": 1509335944,
"updated": 1509335944,
"recoveryLevel": "Purgeable"
}
}, {
"contentType": "testSecretKey",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/b936ececbc674f3bb1367ae50d28ada0",
"attributes": {
"enabled": true,
"created": 1509335932,
"updated": 1509335934,
"recoveryLevel": "Purgeable"
},
"tags": {
"purpose": "testing"
}
}],
"nextLink": null
}

View File

@ -0,0 +1,58 @@
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCipTxpnYqipaEm
1K4vYL6NpcktMdmsUqXk34CMSOEJ6oavMDJIofkrjvPtq8yFHd0vZ2KlcMOssvqh
4iS14twylWDP44CZxfj5VKF8bpQ9WmzfJF/kwirh3gH00iIzOlkoIphqlt4aAem2
B7GlBWgCIORWG4OfyKWxDJw9so1ODP5x1W8UcD6hxmHWH0qhg3h2Iw2/BnQP/jdC
QxKDFX5U0Cqw86vUdJcDoPpCAnptQ/pMMPWo8k7v+0HRPKDoQM7qhSFZAsmcKZK7
Oe+p4N+Jj9OL6RnAbPGIijg8nbRZdqeZWm16+ZWtC1aSyS+q1JDNxIVjoUNLPnwh
rX65ZhUTAgMBAAECggEAQWLiXadbM7YYik7YU+21zaZHsWaoFtIHJXMA7+Tgq6bg
TI+4t2B+lpda00LM7vspj8QlcVNbJxOx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GEwJVUzETMBEGA1UECAwKQ2FsaWZv
cm5pYTEPMA0GA1UECgwGRm9vYmFyMRQwEgYDVQQDDAtGb29iYXIgUm9vdIICQkIw
DgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA0GCSqGSIb3DQEB
CwUAA4ICAQA4sFKv4JDZ0+CVjcHL9bkTpk5I2L45xXk3d7GrhBpGveyy8vlb/g7P
0qyAVo0UnB+eRTtwk6GTsJdzz4FBem+FDq8ZO/N51Rn4ZJQbDg24eGErK4rpbOo5
OQgKKhTKjjBYwsAsIOkJ1TKQDQ3++Kqw3cWh/vlCWoxGPSMOeU/Iro34IWzSeERE
MamYo5kIYq2ERCcVSoTcYB87cTYMU+ORyQSEx/OncDuAKm45ub92By5NpeFVMk+8
ibifgzbNJHVnaZUVg8ScdM1A4Db6WAL0SUsYIawrnQ+TENs+6Ekls+wu8G5FAmbt
OEV0WOafGvdcnELn5IPXlkvLbiRx5EChG+nF3XrLgn3dBQwP2cGrI/IPRm1XfaaB
AkMSkf6St5TX3C40g1CGcNSVoKBYBB2Di+hPXwTHImGggR1JF34ljHCokMoPxmr7
lP9pam0dhP/SSpIwxfsvDJylBgUEqTr3tsVDIDfMtJjudK7A7H1HMoqEiqlzRvJI
EZ1koOxANFcQ1f9am2PPUNFvfK9IbLQlV8d4k1w6xBAeOVke79lJI9pTTCSVb+PT
DniEL79JXjmjQUoKE4zo1u41d+wLu3dEGM27GI7BdLYt6bRsolZvrbey7Nn4c0t4
ug4B4GTd1SLLVJns/IRLBrNr1anBJ7u9WFruBUEWwtdxAwSoXdtIIQ==
-----END CERTIFICATE-----

View File

@ -0,0 +1,52 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myImportableCertificate/f69168f2963e4ac7b68622b2bb2f80d3",
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myImportableCertificate/f69168f2963e4ac7b68622b2bb2f80d3",
"sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myImport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gYDVQQDDAtGb29iYXIgUm9vdIICQkIwDgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA0GCSqGSIb3DQEBCwUAA4ICAQA4sFKv4JDZ0+CVjcHL9bkTpk5I2L45xXk3d7GrhBpGveyy8vlb/g7P0qyAVo0UnB+eRTtwk6GTsJdzz4FBem+FDq8ZO/N51Rn4ZJQbDg24eGErK4rpbOo5OQgKKhTKjjBYwsAsIOkJ1TKQDQ3++Kqw3cWh/vlCWoxGPSMOeU/Iro34IWzSeEREMamYo5kIYq2ERCcVSoTcYB87cTYMU+ORyQSEx/OncDuAKm45ub92By5NpeFVMk+8ibifgzbNJHVnaZUVg8ScdM1A4Db6WAL0SUsYIawrnQ+TENs+6Ekls+wu8G5FAmbtOEV0WOafGvdcnELn5IPXlkvLbiRx5EChG+nF3XrLgn3dBQwP2cGrI/IPRm1XfaaBAkMSkf6St5TX3C40g1CGcNSVoKBYBB2Di+hPXwTHImGggR1JF34ljHCokMoPxmr7lP9pam0dhP/SSpIwxfsvDJylBgUEqTr3tsVDIDfMtJjudK7A7H1HMoqEiqlzRvJIEZ1koOxANFcQ1f9am2PPUNFvfK9IbLQlV8d4k1w6xBAeOVke79lJI9pTTCSVb+PTDniEL79JXjmjQUoKE4zo1u41d+wLu3dEGM27GI7BdLYt6bRsolZvrbey7Nn4c0t4ug4B4GTd1SLLVJns/IRLBrNr1anBJ7u9WFruBUEWwtdxAwSoXdtIIQ==",
"attributes": {
"enabled": true,
"nbf": 1509231134,
"exp": 1541631134,
"created": 1509346469,
"updated": 1509346469,
"recoveryLevel": "Purgeable"
},
"policy": {
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myImportableCertificate/policy",
"key_props": {
"exportable": true,
"kty": "RSA",
"key_size": 2048,
"reuse_key": false
},
"secret_props": {
"contentType": "application/x-pem-file"
},
"x509_props": {
"subject": "CN=testsite.foobar.com, O=Foobar, S=California, C=US",
"ekus": ["1.3.6.1.5.5.7.3.1"],
"key_usage": ["digitalSignature", "keyEncipherment"],
"validity_months": 13,
"basic_constraints": {
"ca": false
}
},
"lifetime_actions": [{
"trigger": {
"lifetime_percentage": 80
},
"action": {
"action_type": "EmailContacts"
}
}],
"issuer": {
"name": "Unknown"
},
"attributes": {
"enabled": true,
"created": 1509346469,
"updated": 1509346469
}
}
}

View File

@ -0,0 +1,9 @@
{
"policy": {
"lifetime_actions": [],
"secret_props": {
"contentType": "application/x-pem-file"
}
},
"value": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCipTxpnYqipaEm\n1K4vYL6NpcktMdmsUqXk34CMSOEJ6oavMDJIofkrjvPtq8yFHd0vZ2KlcMOssvqh\n4iS14twylWDP44CZxfj5VKF8bpQ9WmzfJF/kwirh3gH00iIzOlkoIphqlt4aAem2\nB7GlBWgCIORWG4OfyKWxDJw9so1ODP5x1W8UcD6hxmHWH0qhg3h2Iw2/BnQP/jdC\nQxKDFX5U0Cqw86vUdJcDoPpCAnptQ/pMMPWo8k7v+0HRPKDoQM7qhSFZAsmcKZK7\nOe+p4N+Jj9OL6RnAbPGIijg8nbRZdqeZWm16+ZWtC1aSyS+q1JDNxIVjoUNLPnwh\nrX65ZhUTAgMBAAECggEAQWLiXadbM7YYik7YU+21zaZHsWaoFtIHJXMA7+Tgq6bg\nTI+4t2B+lpda00LM7vspj8QlcVNbJxOxFOGgVosEcUWCbTEN40Qmqr3uSeL+r4ep\n2y95abLxoGorKSxNWYDslOkLk1Zhpdz9AxQmw6vfu3NTuJZJHTSCACKMsXUVv7lv\ngMzyaZQ5JC+NFjLv/AK1moq4AqkjwQYzwXou2jbzJ9aoSS+hGSijGwmJbYBe1tev\n3PZVa708PTUF/U0Iw2FaEIg7BrkUxILic6THRBE/Lak+nBG7dlmQhL/3gEukTojr\niMMtYhCEv0mhKGa7AycIGk31ySbAtV7/KXMEvgMROQKBgQDOrv9f9skNdanV5YyU\nOoOzfc8LO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InfGmkb2jNkPGuNiZ-mU0-ZrOgLza_fLL9ErZ35jUPhGFzdGxJNobklvsNoTd-E2GAU41YkJh24bncMLvJVYxHHA5iF7FBWx1SvpEyKVhhnIcuXGD7N5PbNZzEdmr9C6I7cPVkWO-sUV7zfFukexIcANmsd_oBBGKRoYzP5Tti4"
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
{
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/003a927b194f4f6a9070ebdbdce57c59",
"value": "R29sZCUyNTIxJTJCR29sZCUyNTIxJTJCR29sZCUyQmZyb20lMkJ0aGUlMkJBbWVyaWNhbiUyQlJpdmVyJTI1MjE"
}

View File

@ -0,0 +1,4 @@
{
"alg": "RSA-OAEP",
"value": "0_S8pyjjnGRlcbDa-Lt0jYjMXpXrf9Fat3elx-fSOg3dj6mYgEEs6kt79OMD4MFmVyOt6umeWAfdDIkNVnqb5fgyWceveh9wN-37jc5CFgG2PF3XIA6RII-HF2BkBcVa9KcAX3_di4KQE70PXgHf-dlz_RgLOJILeG50wzFeBFCLsjEEPp3itmoaiE6vfDidCRm5At8Vjka0G-N_afwkIijfQZLT0VaXvL39cIJE2QN3HJPZM8YPUlkFlYnY4GIRyRWSBpK_KYuVufzUGtDi6Sh8pUa67ppa7DHVZlixlmnVqI3Oeg6XUvMqbFFqVSrcNbRQDwVGL3cUtK-KB1PfKg"
}

View File

@ -0,0 +1,4 @@
{
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/003a927b194f4f6a9070ebdbdce57c59",
"value": "0_S8pyjjnGRlcbDa-Lt0jYjMXpXrf9Fat3elx-fSOg3dj6mYgEEs6kt79OMD4MFmVyOt6umeWAfdDIkNVnqb5fgyWceveh9wN-37jc5CFgG2PF3XIA6RII-HF2BkBcVa9KcAX3_di4KQE70PXgHf-dlz_RgLOJILeG50wzFeBFCLsjEEPp3itmoaiE6vfDidCRm5At8Vjka0G-N_afwkIijfQZLT0VaXvL39cIJE2QN3HJPZM8YPUlkFlYnY4GIRyRWSBpK_KYuVufzUGtDi6Sh8pUa67ppa7DHVZlixlmnVqI3Oeg6XUvMqbFFqVSrcNbRQDwVGL3cUtK-KB1PfKg"
}

View File

@ -0,0 +1,4 @@
{
"alg": "RSA-OAEP",
"value": "R29sZCUyNTIxJTJCR29sZCUyNTIxJTJCR29sZCUyQmZyb20lMkJ0aGUlMkJBbWVyaWNhbiUyQlJpdmVyJTI1MjE"
}

View File

@ -0,0 +1,4 @@
{
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/003a927b194f4f6a9070ebdbdce57c59",
"value": "uO0r4P1cB-fKsDZ8cj5ahiNw8Tdsudt5zLCeEKOt29LAlPDpeGx9Q1SOFNaR7JlRYVelxsohdzvydwX8ao6MLnqlpdEj0Xt5Aadp-kN84AXW238gabS1AUyiWILCmdsBFeRU4wTRSxz2qGS_0ztHkaNln32P_9GJC72ZRlgZoVA4C_fowZolUoCWGj4V7fAzcSoiNYipWP0HkFe3xmuz-cSQg3CCAs-MclHHfMeSagLJZZQ9bpl5LIr-Ik89bNtqEqyP7Jb_fCgHajAx2lUFcRZhSIKuCfrLPMl6wzejQ2rQXX-ixEkDa73dYaPIrVW4IL3iC0UfxnfxYffHJ7QCRw"
}

View File

@ -0,0 +1,4 @@
{
"alg": "RS256",
"value": "FvabKT6qGwpml59iHUJ72DZ4XyJcJ8bgpgFA4_8JFmM"
}

View File

@ -0,0 +1,4 @@
{
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/003a927b194f4f6a9070ebdbdce57c59",
"value": "YxzoHR65aFwD2_IOiZ5rD08jMSALA1y7b_yYW0G3hyI"
}

View File

@ -0,0 +1,4 @@
{
"alg": "RSA-OAEP",
"value": "1jcTlu3KJNDBYydhaH9POWOo0tAPGkpsZVizCkHpC3g_9Kg91Q3HKK-rfZynn5W5nVPM-SVFHA3JTankcXX8gx8GycwUh4pMoyil_DV35m2QjyuiTln83OJXw-nMvRXyKdVfF7nyRcs256kW7gthAOsYUVBrfFS7DFFxsXqLNREsA8j85IqIXIm8pAB3C9uvl1I7SQhLvrwZZXXqjeCWMfseVJwWgsQFyyqH2P0f3-xnngV7cvik2k3Elrk3G_2CuJCozIIrANg9zG9Z8DrwSNNm9YooxWkSu0ZeDLOJ0bMdhcPGGm5OvKz3oZqX-39yv5klNlCRbr0q7gqmI0x25w"
}

View File

@ -0,0 +1,3 @@
{
"value": true
}

View File

@ -0,0 +1,5 @@
{
"alg": "RS256",
"digest": "FvabKT6qGwpml59iHUJ72DZ4XyJcJ8bgpgFA4_8JFmM",
"value": "FvabKT6qGwpml59iHUJ72DZ4XyJcJ8bgpgFA4_8JFmM","value":"uO0r4P1cB-fKsDZ8cj5ahiNw8Tdsudt5zLCeEKOt29LAlPDpeGx9Q1SOFNaR7JlRYVelxsohdzvydwX8ao6MLnqlpdEj0Xt5Aadp-kN84AXW238gabS1AUyiWILCmdsBFeRU4wTRSxz2qGS_0ztHkaNln32P_9GJC72ZRlgZoVA4C_fowZolUoCWGj4V7fAzcSoiNYipWP0HkFe3xmuz-cSQg3CCAs-MclHHfMeSagLJZZQ9bpl5LIr-Ik89bNtqEqyP7Jb_fCgHajAx2lUFcRZhSIKuCfrLPMl6wzejQ2rQXX-ixEkDa73dYaPIrVW4IL3iC0UfxnfxYffHJ7QCRw"
}

View File

@ -0,0 +1,4 @@
{
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/003a927b194f4f6a9070ebdbdce57c59",
"value": "1jcTlu3KJNDBYydhaH9POWOo0tAPGkpsZVizCkHpC3g_9Kg91Q3HKK-rfZynn5W5nVPM-SVFHA3JTankcXX8gx8GycwUh4pMoyil_DV35m2QjyuiTln83OJXw-nMvRXyKdVfF7nyRcs256kW7gthAOsYUVBrfFS7DFFxsXqLNREsA8j85IqIXIm8pAB3C9uvl1I7SQhLvrwZZXXqjeCWMfseVJwWgsQFyyqH2P0f3-xnngV7cvik2k3Elrk3G_2CuJCozIIrANg9zG9Z8DrwSNNm9YooxWkSu0ZeDLOJ0bMdhcPGGm5OvKz3oZqX-39yv5klNlCRbr0q7gqmI0x25w"
}

View File

@ -0,0 +1,4 @@
{
"alg": "RSA-OAEP",
"value": "YxzoHR65aFwD2_IOiZ5rD08jMSALA1y7b_yYW0G3hyI"
}

View File

@ -0,0 +1,29 @@
{
"value": [{
"id": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourceGroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults/kvvaultapilivetest",
"name": "kvvaultapilivetest",
"type": "Microsoft.KeyVault/vaults",
"location": "westeurope",
"tags": {},
"properties": {
"sku": {
"family": "A",
"name": "standard"
},
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"accessPolicies": [{
"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"objectId": "5a7f4cb9-ce9d-4b31-87ce-f61083c4b0ea",
"permissions": {
"certificates": ["Get", "List", "Update", "Create", "Import", "Delete", "ManageContacts", "ManageIssuers", "GetIssuers", "ListIssuers", "SetIssuers", "DeleteIssuers", "Purge", "Recover"],
"keys": ["Get", "List", "Update", "Create", "Import", "Delete", "Recover", "Backup", "Restore", "Purge"],
"secrets": ["Get", "List", "Set", "Delete", "Recover", "Backup", "Restore", "Purge"],
"storage": []
}
}],
"enabledForDeployment": false,
"vaultUri": "https://kvvaultapilivetest.vault.azure.net/"
}
}],
"nextLink": "https://management.azure.com/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourcegroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults?api-version=2016-10-01&$skiptoken=a3Z2YXVsdGFwaWxpdmV0ZXN0"
}

View File

@ -0,0 +1,7 @@
{
"value": [{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/issuers/globalsign01",
"provider": "GlobalSign"
}],
"nextLink": null
}

View File

@ -0,0 +1,27 @@
{
"value": [{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate",
"x5t": "K7HXO6YIK6xwCX8W1InUKsJV9Rk",
"attributes": {
"enabled": true,
"nbf": 1509345867,
"exp": 1540882467,
"created": 1509346467,
"updated": 1509346472
},
"tags": {
"selfsigned": "true"
}
}, {
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myImportableCertificate",
"x5t": "-qEnW6P9TdfOOXzbNQNS5ZKveRo",
"attributes": {
"enabled": true,
"nbf": 1509231134,
"exp": 1541631134,
"created": 1509346469,
"updated": 1509346469
}
}],
"nextLink": null
}

View File

@ -0,0 +1,17 @@
{
"value": [{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/b73ba4610dc24dca946f76933f6590dd",
"x5t": "K7HXO6YIK6xwCX8W1InUKsJV9Rk",
"attributes": {
"enabled": true,
"nbf": 1509345867,
"exp": 1540882467,
"created": 1509346467,
"updated": 1509346472
},
"tags": {
"selfsigned": "true"
}
}],
"nextLink": null
}

View File

@ -0,0 +1,15 @@
{
"value": [{
"id": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/providers/Microsoft.KeyVault/locations/westeurope/deletedVaults/kvvaultapilivetest",
"name": "kvvaultapilivetest",
"type": "Microsoft.KeyVault/deletedVaults",
"properties": {
"vaultId": "/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/resourceGroups/rg-vaultapilivetest-jims/providers/Microsoft.KeyVault/vaults/kvvaultapilivetest",
"location": "westeurope",
"tags": {},
"deletionDate": "2017-10-29T22:06:02Z",
"scheduledPurgeDate": "2018-01-27T22:06:02Z"
}
}],
"nextLink": "https://management.azure.com/subscriptions/3fee811e-11bf-4b5c-9c62-a2f28b517724/providers/Microsoft.KeyVault/deletedVaults?api-version=2016-10-01&%24skiptoken=HY1db4IwGEb%2fS7PsrpQyUCQxiwts0QkMbDHxjo8Xh%2bUrtLgN438f8fJJzjnPDbXwq%2fZVKyRybujoHZjH4%2fDLQw76VqqXDiFN2qZnaKBVWjqNA2h51xA5ZjIfql5VXSvJSwlgUwqY0qzEZmbleJUvDJwapWFnFl0uDZP0Q3etChgk8at86GRXKu0T%2fpJ0rBUpoAYFxWPI17Sv8HUm5%2fja0OkCUx3r9PlJivmxE9CuuUiOcbJjMY%2ffmZfwA1%2bFe17z0t1Sn50t%2fyLM4LKZgknogZubPkvsQOzeQrdwQ49PMRNT4J3cSN9akfCNaDp9%2bOzh%2fERsg%2b73fw%3d%3d"
}

View File

@ -0,0 +1,18 @@
{
"value": [{
"recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedcertificates/myRecoverableCertificate",
"deletedDate": 1509346545,
"scheduledPurgeDate": 1517122545,
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myRecoverableCertificate",
"x5t": "-qEnW6P9TdfOOXzbNQNS5ZKveRo",
"attributes": {
"enabled": true,
"nbf": 1509231134,
"exp": 1541631134,
"created": 1509346510,
"updated": 1509346510,
"recoveryLevel": "Recoverable+Purgeable"
}
}],
"nextLink": null
}

View File

@ -0,0 +1,15 @@
{
"value": [{
"recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedkeys/myRecoverableKey",
"deletedDate": 1509335960,
"scheduledPurgeDate": 1517111960,
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myRecoverableKey",
"attributes": {
"enabled": true,
"created": 1509335950,
"updated": 1509335950,
"recoveryLevel": "Recoverable+Purgeable"
}
}],
"nextLink": null
}

View File

@ -0,0 +1,16 @@
{
"value": [{
"recoveryId": "https://kvvaultapilivetest.vault.azure.net/deletedsecrets/myRecoverableSecret",
"deletedDate": 1509335980,
"scheduledPurgeDate": 1517111980,
"contentType": "aNewSecretKey",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/myRecoverableSecret",
"attributes": {
"enabled": true,
"created": 1509335958,
"updated": 1509335958,
"recoveryLevel": "Recoverable+Purgeable"
}
}],
"nextLink": null
}

View File

@ -0,0 +1,42 @@
{
"value": [{
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myCertificate",
"attributes": {
"enabled": true,
"nbf": 1509313915,
"exp": 1540850515,
"created": 1509314515,
"updated": 1509314515,
"recoveryLevel": "Purgeable"
},
"managed": true
}, {
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myImportableCertificate",
"attributes": {
"enabled": true,
"nbf": 1509231134,
"exp": 1541631134,
"created": 1509314521,
"updated": 1509314521,
"recoveryLevel": "Purgeable"
},
"managed": true
}, {
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myImportKey",
"attributes": {
"enabled": true,
"created": 1509314522,
"updated": 1509314522,
"recoveryLevel": "Purgeable"
}
}, {
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey",
"attributes": {
"enabled": true,
"created": 1509314506,
"updated": 1509314506,
"recoveryLevel": "Purgeable"
}
}],
"nextLink": null
}

View File

@ -0,0 +1,40 @@
{
"value": [{
"contentType": "application/x-pkcs12",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/myCertificate",
"managed": true,
"attributes": {
"enabled": true,
"nbf": 1509335314,
"exp": 1540871914,
"created": 1509335914,
"updated": 1509335920,
"recoveryLevel": "Purgeable"
},
"tags": {
"selfsigned": "true"
}
}, {
"contentType": "application/x-pem-file",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/myImportableCertificate",
"managed": true,
"attributes": {
"enabled": true,
"nbf": 1509231134,
"exp": 1541631134,
"created": 1509335917,
"updated": 1509335917,
"recoveryLevel": "Purgeable"
}
}, {
"contentType": "testSecretKey",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret",
"attributes": {
"enabled": true,
"created": 1509335932,
"updated": 1509335932,
"recoveryLevel": "Purgeable"
}
}],
"nextLink": null
}

View File

@ -0,0 +1,62 @@
{
"id": "https://jimskv1.vault.azure.net/certificates/jmskv1cert6/d8f385d3741b4b1cba9c002299e892dd",
"kid": "https://jimskv1.vault.azure.net/keys/jmskv1cert6/d8f385d3741b4b1cba9c002299e892dd",
"sid": "https://jimskv1.vault.azure.net/secrets/jmskv1cert6/d8f385d3741b4b1cba9c002299e892dd",
"x5t": "SQ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XlV1HQzQ/BmavudPT1MiuH0CVSlCHE/JetXdJdWZA4HRiwXJn+5K8MgE5i1hjjXN/dLuaY8vItJzyrgxGRtRZoJA8t7B3QJjDECmey2m0K0qjYu7l1jAVFBWaqDdJQLmnKxViuz0MF4uFqgveW6CZEMcdqwZQ2cmZPlmcjneT0veBBh5qCdFNFM9pYDn0wqt5ruK+vqHkqJdMToBPNaBfGX10ADlB8rKW24eve+2c0iVmorJuTPdOqm2L9NKGpf2scvZZU4n/khkGKihrSOLygeLZ6SQc74cRL35FmzJqqKKpZtG9/a91dkJDz2XUiTO5TialaOU9+A1+Xrzj8LGG9JnB0KizF5dOd5mbZTROr3VCexRxyTrtZLpeJK+lYQLkDQ5ixWnd2sikym4hy3+NZ1g6nE+GQpqSALB4YnsFgUdg==",
"attributes": {
"enabled": true,
"nbf": 1511910551,
"exp": 1544310551,
"created": 1511911458,
"updated": 1511911458,
"recoveryLevel": "Purgeable"
},
"policy": {
"id": "https://jimskv1.vault.azure.net/certificates/jmskv1cert6/policy",
"key_props": {
"exportable": true,
"kty": "RSA",
"key_size": 2048,
"reuse_key": true
},
"secret_props": {
"contentType": "application/x-pem-file"
},
"x509_props": {
"subject": "C=US, ST=CA, L=Alleghany, O=ACME, OU=Engineering, CN=ACME Foobar Cert",
"sans": {
"emails": [],
"dns_names": [],
"upns": []
},
"ekus": [
"1.3.6.1.5.5.7.3.1"
],
"key_usage": [
"cRLSign",
"dataEncipherment",
"digitalSignature",
"keyAgreement",
"keyCertSign",
"keyEncipherment"
],
"validity_months": 24,
"basic_constraints": {
"ca": false
}
},
"lifetime_actions": [],
"issuer": {
"name": "Unknown"
},
"attributes": {
"enabled": true,
"created": 1511910301,
"updated": 1511910301
}
},
"pending": {
"id": "https://jimskv1.vault.azure.net/certificates/jmskv1cert6/pending"
}
}

View File

@ -0,0 +1,10 @@
{
"attributes": {
"enabled": true
},
"x5c": [
"MIIFljCCA36gAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwVjELMAkGA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MIfBsyjRSJh/Phjqib6kcYWcz6I6yTfkcsXcUB1JgR8KnQdVy0gYDu1MacHu2VYuS35HpPcQyXRqR1Ky9qh16+OhheRJw03ghEiPMcKbWS5NRgw/l/itoST2Qd6BzJTHUkJaXHNSO9fNF/fAccqECp0ZfaCSrfZs47EcjCv+N7bvrqfFl4BhB77tb7ZAQIDAQABMA0GCSqGSIb3DQEBCwUAA4ICAQCbpjL5XGC3T6gWU8sxCbS0VBmgamyvSHA8jLkWUXQfPirGFwgdGN7394mYViVU0qe6ZqmnhlhqZ1h6VbkBMVwzp3KlRhuoz/fXlW+TFvEC8Q3F+7oUdHn8w3EMyjKA5EbLzRIYXBizdbfEn8eJynjyWEdOaJpMmy9au/oFSqpmZDcxWW2SKq4j+Pqjhr+Ig4BmTVvwR6iEERPYQI4pv0OxRa7xA6Hb8NF02TyDzV7k02kN9PL/QO2dh9f3U0YY5XlV1HQzQ/BmavudPT1MiuH0CVSlCHE/JetXdJdWZA4HRiwXJn+5K8MgE5i1hjjXN/dLuaY8vItJzyrgxGRtRZoJA8t7B3QJjDECmey2m0K0qjYu7l1jAVFBWaqDdJQLmnKxViuz0MF4uFqgveW6CZEMcdqwZQ2cmZPlmcjneT0veBBh5qCdFNFM9pYDn0wqt5ruK+vqHkqJdMToBPNaBfGX10ADlB8rKW24eve+2c0iVmorJuTPdOqm2L9NKGpf2scvZZU4n/khkGKihrSOLygeLZ6SQc74cRL35FmzJqqKKpZtG9/a91dkJDz2XUiTO5TialaOU9+A1+Xrzj8LGG9JnB0KizF5dOd5mbZTROr3VCexRxyTrtZLpeJK+lYQLkDQ5ixWnd2sikym4hy3+NZ1g6nE+GQpqSALB4YnsFgUdg==

View File

@ -0,0 +1,52 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myRecoverableCertificate/42f1b607074a4531b4f14fb4447d4346",
"sid": "https://kvva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GA1UECgwGRm9vYmFyMRQwEgYDVQQDDAtGb29iYXIgUm9vdIICQkIwDgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA0GCSqGSIb3DQEBCwUAA4ICAQA4sFKv4JDZ0+CVjcHL9bkTpk5I2L45xXk3d7GrhBpGveyy8vlb/g7P0qyAVo0UnB+eRTtwk6GTsJdzz4FBem+FDq8ZO/N51Rn4ZJQbDg24eGErK4rpbOo5OQgKKhTKjjBYwsAsIOkJ1TKQDQ3++Kqw3cWh/vlCWoxGPSMOeU/Iro34IWzSeEREMamYo5kIYq2ERCcVSoTcYB87cTYMU+ORyQSEx/OncDuAKm45ub92By5NpeFVMk+8ibifgzbNJHVnaZUVg8ScdM1A4Db6WAL0SUsYIawrnQ+TENs+6Ekls+wu8G5FAmbtOEV0WOafGvdcnELn5IPXlkvLbiRx5EChG+nF3XrLgn3dBQwP2cGrI/IPRm1XfaaBAkMSkf6St5TX3C40g1CGcNSVoKBYBB2Di+hPXwTHImGggR1JF34ljHCokMoPxmr7lP9pam0dhP/SSpIwxfsvDJylBgUEqTr3tsVDIDfMtJjudK7A7H1HMoqEiqlzRvJIEZ1koOxANFcQ1f9am2PPUNFvfK9IbLQlV8d4k1w6xBAeOVke79lJI9pTTCSVb+PTDniEL79JXjmjQUoKE4zo1u41d+wLu3dEGM27GI7BdLYt6bRsolZvrbey7Nn4c0t4ug4B4GTd1SLLVJns/IRLBrNr1anBJ7u9WFruBUEWwtdxAwSoXdtIIQ==",
"attributes": {
"enabled": true,
"nbf": 1509231134,
"exp": 1541631134,
"created": 1509346510,
"updated": 1509346510,
"recoveryLevel": "Recoverable+Purgeable"
},
"policy": {
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myRecoverableCertificate/policy",
"key_props": {
"exportable": true,
"kty": "RSA",
"key_size": 2048,
"reuse_key": false
},
"secret_props": {
"contentType": "application/x-pem-file"
},
"x509_props": {
"subject": "CN=testsite.foobar.com, O=Foobar, S=California, C=US",
"ekus": ["1.3.6.1.5.5.7.3.1"],
"key_usage": ["digitalSignature", "keyEncipherment"],
"validity_months": 13,
"basic_constraints": {
"ca": false
}
},
"lifetime_actions": [{
"trigger": {
"lifetime_percentage": 80
},
"action": {
"action_type": "EmailContacts"
}
}],
"issuer": {
"name": "Unknown"
},
"attributes": {
"enabled": true,
"created": 1509346510,
"updated": 1509346510
}
}
}

View File

@ -0,0 +1,15 @@
{
"key": {
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myRecoverableKey/274f6c69b94b41359a5932226425eb43",
"kty": "RSA",
"key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
"n": "urhKlXbEGvYetOSH-GLytvSJ5djS0-5SKBtFOlJ2885PE0s_ZbnkRURDm2fImv_RV763HKSUQbEolQNs8I99N-3uCkrDStVZ6MPii9-0U6lrEkX7LrMRNYCfPAaSSZhSjCbsyqX9Y-N_A5Jz9uHNuXvpjQ9N7ojUK7fqqhnJKcJ6l6YsGOhGCD3uei4SL5GzbSAn2auIK51lj77UXjBZaudnNWTiKaCbTAmSmEe13DOJkg82_7Y1eWea3NJn4T2nY8WqRJCp4hzBsPBmFXjE1lgFWcSjm_afiSb0mCUP7v7tSOLR3xUBv9WgMO7p4_ce_--A9ZWP418Uqq0COcHAWQ",
"e": "AQAB"
},
"attributes": {
"enabled": true,
"created": 1509335950,
"updated": 1509335950,
"recoveryLevel": "Recoverable+Purgeable"
}
}

View File

@ -0,0 +1,10 @@
{
"contentType": "aNewSecretKey",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/myRecoverableSecret/d7194ca6b0214d0ba382353109cd7e58",
"attributes": {
"enabled": true,
"created": 1509335958,
"updated": 1509335958,
"recoveryLevel": "Recoverable+Purgeable"
}
}

View File

@ -0,0 +1,15 @@
{
"key": {
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myKey/1374543b3de34500a97d075991ee3893",
"kty": "RSA",
"key_ops": ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"],
"n": "tY2pzXPfU7NFYCWvZB1gJNAetkgJ7Qi75lTVOzVns9KjFFo6e_F9GSETZbAYl5oMwfLtdqQqT5fxzWDk0sYlz09HXvCCoYmbzobd3gJ6-WLAqhtCbBikr5HAIlCzy_UqKT--WhEw8AT_EJFBPIY9xNktqnaNZuRBmjmXinzT02qUmBZRsAdJmaYfG9IZSmToOkb54OytI5TreWN0JvceoQ3GSeFLMC5PUmXP6HmZliOzBBHWnXNq3H7a3qfWV3rxT2QpbrIuz18ZqOVp7o5868kN8knKytVcqEzmdiQUdabkqbrwuh-z_IEre9AqTfw6OjUUmLjs4lyKcpWLYFh8KJuML1ub-8u0VgNGwczUZ7aAld1iwGMsoMmQfMRDOnv-9pqtY-y40ZWpBGXpzFV-IvtKHnqQk_vWqowpE8xwx7yZ74z9XNgS9TmkVpcC-ONbEfNE1sez0Zf-RZ9eOm_7WSxxH6OJYtJI7wotBXYoy1bJaqo7mgHs1IUOFhSE-Evj",
"e": "AQAB"
},
"attributes": {
"enabled": true,
"created": 1509335925,
"updated": 1509335925,
"recoveryLevel": "Purgeable"
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,10 @@
{
"contentType": "aNewSecretKey",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/8c418537cbc948539ea2ac12c0bfcfb4",
"attributes": {
"enabled": true,
"created": 1509335944,
"updated": 1509335944,
"recoveryLevel": "Purgeable"
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAvZiOgV6b4EmGiasBskXYnTaRyWzBHBGnWB11BzFN3FGigfWx
VvjI7Ox1SHTx+vGsnjbqQPvIP4JnPEsNcWLyHa6tNAcnj/M7BuyIwdD5+Hvs6kOe
PuSOJUf8dRjPMUpr6rcUcBmmOwTnKOH4rdpb6jXNnuCIHP+lgXCeRWveZ62TjEB+
9aB8W8UHH854FGebiUd/aY0tpCF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fQcW9up5X
K8HibC3ZodZ6cT9zOBx7sbzlqhOlicPP0v+LNE9nPcQyPDgjrvjXhTIrdIMyrmmm
8gpgZLUidKF42r4fgYSaOhyvsXBFNAJkxDRp/ox6EIaBzLuJjMIycqnklcFaJ0nK
xxjnAoGAU/3jRok74Yn0MY183UCXICf/WxVYzwEi3cyRWVh6gAo2ExNye97rau/B
Y2woAcVxEN9h1HNirq8Z2AwrZKd/BcBnvulZqECeH5zBQ0W56ADX72r+lzOAxTJa
U1AIlNCIkfsQ5CpIoYsVoNEM8P+GyS8B9kaEmk/FVKldRTKJqkI=
-----END RSA PRIVATE KEY-----

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/contacts",
"contacts": [{
"email": "foo@bar.com",
"name": "Foo bar",
"phone": "867-5309"
}]
}

View File

@ -0,0 +1,7 @@
{
"contacts": [{
"email": "foo@bar.com",
"name": "Foo bar",
"phone": "867-5309"
}]
}

View File

@ -0,0 +1,21 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/issuers/globalsign01",
"provider": "GlobalSign",
"credentials": {
"account_id": "imauser"
},
"org_details": {
"zip": 0,
"admin_details": [{
"first_name": "Admin",
"last_name": "Guy",
"email": "adminguy@certsforme.com",
"phone": "867-5309"
}]
},
"attributes": {
"enabled": true,
"created": 1509346474,
"updated": 1509346474
}
}

View File

@ -0,0 +1,15 @@
{
"credentials": {
"account_id": "imauser",
"pwd": "This1sMyPa55wurD!"
},
"org_details": {
"admin_details": [{
"email": "adminguy@certsforme.com",
"first_name": "Admin",
"last_name": "Guy",
"phone": "867-5309"
}]
},
"provider": "GlobalSign"
}

View File

@ -0,0 +1,11 @@
{
"value": "-----BEGIN RSA PRIVATE KEY-----\\nMIIEogIBAAKCAQEAvZiOgV6b4EmGiasBskXYnTaRyWzBHBGnWB11BzFN3FGigfWx\\nVvjI7Ox1SHTx+vGsnjbqQPvIP4JnPEsNcWLyHa6tNAc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N8IREiSKFtsCf+8OhViVwLjv8YETJGq6N\\nIT/HEZKNTd86W0uU6UrhsA1e/cmJx6iObbHfyEssPEqZT5ZJ8DN65Oh2KhWRBCks\\n5MrJeQps5ITBowunfr5+JQKBgBln09goPD9tbEzcOPRlzoanw5s3kxdfQcW9up5X\\nK8HibC3ZodZ6cT9zOBx7sbzlqhOlicPP0v+LNE9nPcQyPDgjrvjXhTIrdIMyrmmm\\n8gpgZLUidKF42r4fgYSaOhyvsXBFNAJkxDRp/ox6EIaBzLuJjMIycqnklcFaJ0nK\\nxxjnAoGAU/3jRok74Yn0MY183UCXICf/WxVYzwEi3cyRWVh6gAo2ExNye97rau/B\\nY2woAcVxEN9h1HNirq8Z2AwrZKd/BcBnvulZqECeH5zBQ0W56ADX72r+lzOAxTJa\\nU1AIlNCIkfsQ5CpIoYsVoNEM8P+GyS8B9kaEmk/FVKldRTKJqkI=\\n-----END RSA PRIVATE KEY-----\\n",
"contentType": "testSecretKey",
"id": "https://kvvaultapilivetest.vault.azure.net/secrets/mySecret/b936ececbc674f3bb1367ae50d28ada0",
"attributes": {
"enabled": true,
"created": 1509335932,
"updated": 1509335932,
"recoveryLevel": "Purgeable"
}
}

View File

@ -0,0 +1,7 @@
{
"attributes": {
"enabled": true
},
"contentType": "testSecretKey",
"value": "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAvZiOgV6b4EmGiasBskXYnTaRyWzBHBGnWB11BzFN3FGigfWx\nVvjI7Ox1SHTx+vGsnjbqQPvIP4JnPEsNcWLyHa6tNAcnj/M7BuyIwdD5+Hvs6kOe\nPuSOJUf8dRjPMUpr6rcUcBmmOwTnKOH4rdpb6jXNnuCIHP+lgXCeRWveZ62TjEB+\n9aB8W8UHH854FGebiUd/aY0tpCFC7wkWz3KbgmjmY2vSe2U98Yj4+l/IWydIZ7ON\nLicteEEIGbNM0o2QSYhQBCJSw5RixDpPlrUUB094qgqUOyW0k8PvjibGxxTh0LYy\nWqWydPF0XaqFRQ6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BFNAJkxDRp/ox6EIaBzLuJjMIycqnklcFaJ0nK\nxxjnAoGAU/3jRok74Yn0MY183UCXICf/WxVYzwEi3cyRWVh6gAo2ExNye97rau/B\nY2woAcVxEN9h1HNirq8Z2AwrZKd/BcBnvulZqECeH5zBQ0W56ADX72r+lzOAxTJa\nU1AIlNCIkfsQ5CpIoYsVoNEM8P+GyS8B9kaEmk/FVKldRTKJqkI\u003d\n-----END RSA PRIVATE KEY-----"
}

View File

@ -0,0 +1,58 @@
{
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/b73ba4610dc24dca946f76933f6590dd",
"kid": "https://kvvaultapilivetest.vault.azure.net/keys/myCertificate/b73ba4610dc24dca946f76933f6590dd",
"sid": "https://kvvaultapilivetest.vault.azure.net/secrets/myCertificate/b73ba4610dc24dca946f76933f6590dd",
"x5t": "K7HXO6YIK6xwCX8W1InUKsJV9Rk",
"cer": "MIIDTDCCAjSgAwIBAgIQVA+XomvgS56ybBWv2MnacjANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDExhteWNlcnRpZmljYXRlLmZvb2Jhci5jb20wHhcNMTcxMDMwMDY0NDI3WhcNMTgxMDMwMDY1NDI3WjAjMSEwHwYDVQQDExhteWNlcnRpZmljYXRlLmZvb2Jhci5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCusjC1A7rQEjW9SRL9XHRNDl0EuNYEV9AVQcAEmgpcJ6WgusdataeFrHKPmO8RUZgXk4sE14d3o9HjduYcqfOre+FBdQDWwoFHEAlq9Iz1r4woGk3f1oq9KepE12cRMTyTA214iluYNUx7XxSca3KFFswqonvcekbLJF2IPydNL0XrlIJFCUoAs3PRWLfPnYuijqRGhk8B9xGQMBtuDsnEi4wQRxusFHR1JxHSbY65xi1Hc9Ds9RAxdKwvBmYYC7V78q6qNM0LpenFGlZJMd/eRLVDguM1d17yyTX/lei/Oj8yVVDsva23ilUrv1mR549sv1lIqxNzdOGLsb6jykJ7AgMBAAGjfDB6MA4GA1UdDwEB/wQEAwIFoDAJBgNVHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBRnlX51KtyJ/m/V8I/3il4cAW/HOzAdBgNVHQ4EFgQUZ5V+dSrcif5v1fCP94peHAFvxzswDQYJKoZIhvcNAQELBQADggEBAAbSFuMRMbXyH80iA/jU7vuUCYe0Ra/wTTB1qVHTBuqQ/W8RI01mdqI9+GAPOTyN94XPPYVpSz9ZQ3P0/dhgcsahW5bZQkC0CcUSE5R7JUOKI5Up6n8zZM/unHlC6ZcEpNA/scObPKhQXdZayxgf2/p30bii4CiyS7ADEH92xMnzo1Eu9Dckxh1MRDypfxMY9YIzggksiY78BxoNsRDyxNjeRHVUxAIJ3n9TUv+WG31r7rMOIs6ZPsWc96AzUHHAZREVTEh2kiKKIenbMXn1tCpF6/GJKGfp7rt5ObUoQAlnn7kgAceteKZHEMgRZ4c4EQq+yqBw3hJrz4dOabJcmcU=",
"attributes": {
"enabled": true,
"nbf": 1509345867,
"exp": 1540882467,
"created": 1509346467,
"updated": 1509346472,
"recoveryLevel": "Purgeable"
},
"tags": {
"selfsigned": "true"
},
"policy": {
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/policy",
"key_props": {
"exportable": false,
"kty": "RSA",
"key_size": 2048,
"reuse_key": false
},
"secret_props": {
"contentType": "application/x-pkcs12"
},
"x509_props": {
"subject": "CN=mycertificate.foobar.com",
"ekus": ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.2"],
"key_usage": ["digitalSignature", "keyEncipherment"],
"validity_months": 12,
"basic_constraints": {
"ca": false
}
},
"lifetime_actions": [{
"trigger": {
"lifetime_percentage": 80
},
"action": {
"action_type": "AutoRenew"
}
}],
"issuer": {
"name": "Self"
},
"attributes": {
"enabled": true,
"created": 1509346452,
"updated": 1509346472
}
},
"pending": {
"id": "https://kvvaultapilivetest.vault.azure.net/certificates/myCertificate/pending"
}
}

Some files were not shown because too many files have changed in this diff Show More