Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ready for review] Graph & Key Vault MGMT #1008

Merged
merged 33 commits into from
Sep 13, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0484ce6
Generate graph and keyvault clients
jianghaolu Sep 13, 2016
36616ae
Add interfaces for vault & access policy
jianghaolu Jul 27, 2016
b112eff
Basic Create
jianghaolu Jul 27, 2016
1fe0f3f
Add graph to key vault flow
jianghaolu Aug 1, 2016
34207df
Add update flow to vault
jianghaolu Aug 3, 2016
3a3b5d5
Add authorize flow
jianghaolu Aug 3, 2016
262a7ee
Rename getters for Users & ServicePrincipals
jianghaolu Aug 3, 2016
fd4ce07
Add group & add graph endpoints to AzureEnvironment
jianghaolu Aug 4, 2016
1d9c0c3
Address some review feedback
jianghaolu Aug 4, 2016
622029c
Basic impl for vault
jianghaolu Aug 4, 2016
e9aca42
default tenant id
jianghaolu Aug 8, 2016
4b86b42
Regen graph and a bunch of refactors
jianghaolu Aug 8, 2016
52449ff
Allow specifying upn and spn
jianghaolu Aug 10, 2016
ef9f961
more checks
jianghaolu Aug 10, 2016
1e307c4
Move key vault tests to correct location
jianghaolu Aug 17, 2016
cd66a20
Regenerate graph & keyvault client
jianghaolu Aug 30, 2016
ad615f2
basic get in Graph in observable
jianghaolu Aug 31, 2016
08fac8d
Supports spn & upn config in vault creation
jianghaolu Sep 2, 2016
e0106a5
Enable user login
jianghaolu Sep 3, 2016
eca2ca5
Add asserts to keyvault tests
jianghaolu Sep 7, 2016
000da13
Regenerate keyvault & graph with latest autorest
jianghaolu Sep 7, 2016
665884d
Fix merge errors and key vault test
jianghaolu Sep 7, 2016
25ae568
Add tenantId requirement on roll-up client
jianghaolu Sep 7, 2016
a6ea6bb
Add key vault sample
jianghaolu Sep 8, 2016
f03d29f
more fixes in key vault
jianghaolu Sep 8, 2016
ce5012a
Add key vault to roll-up client
jianghaolu Sep 8, 2016
2d12e85
Allow empty pages in paged list
jianghaolu Sep 8, 2016
907d8c0
Adapt group paged list to new paged list
jianghaolu Sep 9, 2016
7e66016
Child list flattener doesn't need to worry about cousins
jianghaolu Sep 9, 2016
53ad799
Add javadocs and address checkstyle
jianghaolu Sep 10, 2016
93be0f4
Fix merge errors
jianghaolu Sep 13, 2016
dd31927
Address cr feedback in key vault
jianghaolu Sep 13, 2016
dd0e985
Rename Group to ActiveDirectoryGroup
jianghaolu Sep 13, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ public interface Vault extends
Updatable<Vault.Update>,
Wrapper<VaultInner> {
/**
* @return The URI of the vault for performing operations on keys and secrets.
* @return the URI of the vault for performing operations on keys and secrets.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, no period at the end for @return :-)

*/
String vaultUri();

/**
* @return The Azure Active Directory tenant ID that should be used for
* @return the Azure Active Directory tenant ID that should be used for
* authenticating requests to the key vault.
*/
String tenantId();
Expand All @@ -41,29 +41,29 @@ public interface Vault extends
Sku sku();

/**
* @return An array of 0 to 16 identities that have access to the key vault. All
* @return an array of 0 to 16 identities that have access to the key vault. All
* identities in the array must use the same tenant ID as the key vault's
* tenant ID.
*/
List<AccessPolicy> accessPolicies();

/**
* @return Property to specify whether Azure Virtual Machines are permitted to
* @return whether Azure Virtual Machines are permitted to
* retrieve certificates stored as secrets from the key vault.
*/
Boolean enabledForDeployment();
boolean enabledForDeployment();

/**
* @return Property to specify whether Azure Disk Encryption is permitted to
* @return whether Azure Disk Encryption is permitted to
* retrieve secrets from the vault and unwrap keys.
*/
Boolean enabledForDiskEncryption();
boolean enabledForDiskEncryption();

/**
* @return Property to specify whether Azure Resource Manager is permitted to
* @return whether Azure Resource Manager is permitted to
* retrieve secrets from the key vault.
*/
Boolean enabledForTemplateDeployment();
boolean enabledForTemplateDeployment();

/**************************************************************
* Fluent interfaces to provision a Vault
Expand Down Expand Up @@ -144,42 +144,42 @@ interface WithConfigurations {
*
* @return the next stage of key vault definition
*/
WithCreate enableDeployment();
WithCreate withDeploymentEnabled();

/**
* Enable Azure Disk Encryption to retrieve secrets from the vault and unwrap keys.
*
* @return the next stage of key vault definition
*/
WithCreate enableDiskEncryption();
WithCreate withDiskEncryptionEnabled();

/**
* Enable Azure Resource Manager to retrieve secrets from the key vault.
*
* @return the next stage of key vault definition
*/
WithCreate enableTemplateDeployment();
WithCreate withTemplateDeploymentEnabled();

/**
* Disable Azure Virtual Machines to retrieve certificates stored as secrets from the key vault.
*
* @return the next stage of key vault definition
*/
WithCreate disableDeployment();
WithCreate withDeploymentDisabled();

/**
* Disable Azure Disk Encryption to retrieve secrets from the vault and unwrap keys.
*
* @return the next stage of key vault definition
*/
WithCreate disableDiskEncryption();
WithCreate withDiskEncryptionDisabled();

/**
* Disable Azure Resource Manager to retrieve secrets from the key vault.
*
* @return the next stage of key vault definition
*/
WithCreate disableTemplateDeployment();
WithCreate withTemplateDeploymentDisabled();
}

/**
Expand Down Expand Up @@ -245,42 +245,42 @@ interface WithConfigurations {
*
* @return the key vault update stage
*/
Update enableDeployment();
Update withDeploymentEnabled();

/**
* Enable Azure Disk Encryption to retrieve secrets from the vault and unwrap keys.
*
* @return the key vault update stage
*/
Update enableDiskEncryption();
Update withDiskEncryptionEnabled();

/**
* Enable Azure Resource Manager to retrieve secrets from the key vault.
*
* @return the key vault update stage
*/
Update enableTemplateDeployment();
Update withTemplateDeploymentEnabled();

/**
* Disable Azure Virtual Machines to retrieve certificates stored as secrets from the key vault.
*
* @return the key vault update stage
*/
Update disableDeployment();
Update withDeploymentDisabled();

/**
* Disable Azure Disk Encryption to retrieve secrets from the vault and unwrap keys.
*
* @return the next stage of key vault definition
*/
Update disableDiskEncryption();
Update withDiskEncryptionDisabled();

/**
* Disable Azure Resource Manager to retrieve secrets from the key vault.
*
* @return the key vault update stage
*/
Update disableTemplateDeployment();
Update withTemplateDeploymentDisabled();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,25 @@ public List<AccessPolicy> accessPolicies() {
}

@Override
public Boolean enabledForDeployment() {
if (inner().properties() == null) {
return null;
public boolean enabledForDeployment() {
if (inner().properties() == null || inner().properties().enabledForDeployment() == null) {
return false;
}
return inner().properties().enabledForDeployment();
}

@Override
public Boolean enabledForDiskEncryption() {
if (inner().properties() == null) {
return null;
public boolean enabledForDiskEncryption() {
if (inner().properties() == null || inner().properties().enabledForDiskEncryption() == null) {
return false;
}
return inner().properties().enabledForDiskEncryption();
}

@Override
public Boolean enabledForTemplateDeployment() {
if (inner().properties() == null) {
return null;
public boolean enabledForTemplateDeployment() {
if (inner().properties() == null || inner().properties().enabledForTemplateDeployment()) {
return false;
}
return inner().properties().enabledForTemplateDeployment();
}
Expand Down Expand Up @@ -153,37 +153,37 @@ public AccessPolicyImpl updateAccessPolicy(String objectId) {
}

@Override
public VaultImpl enableDeployment() {
public VaultImpl withDeploymentEnabled() {
inner().properties().withEnabledForDeployment(true);
return this;
}

@Override
public VaultImpl enableDiskEncryption() {
public VaultImpl withDiskEncryptionEnabled() {
inner().properties().withEnabledForDiskEncryption(true);
return this;
}

@Override
public VaultImpl enableTemplateDeployment() {
public VaultImpl withTemplateDeploymentEnabled() {
inner().properties().withEnabledForTemplateDeployment(true);
return this;
}

@Override
public VaultImpl disableDeployment() {
public VaultImpl withDeploymentDisabled() {
inner().properties().withEnabledForDeployment(false);
return this;
}

@Override
public VaultImpl disableDiskEncryption() {
public VaultImpl withDiskEncryptionDisabled() {
inner().properties().withEnabledForDiskEncryption(false);
return this;
}

@Override
public VaultImpl disableTemplateDeployment() {
public VaultImpl withTemplateDeploymentDisabled() {
inner().properties().withEnabledForTemplateDeployment(false);
return this;
}
Expand Down