Skip to content
This repository has been archived by the owner on Jul 25, 2020. It is now read-only.

JCLOUDS-1304: add azure customdata, JCLOUDS-1305: add support for ssh keys in keyvault #398

Conversation

VRanga000
Copy link
Contributor

No description provided.

@VRanga000 VRanga000 changed the title Feature/add azure customdata keyvault JCLOUDS-1304: add azure customdata, JCLOUDS-1305: add support for ssh keys in keyvault Jun 16, 2017
Copy link
Member

@nacx nacx left a comment

Choose a reason for hiding this comment

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

Thanks, @VRanga000 and apologies for the late review!
I see the key vault option being added but it is not used anywhere. Are there plans to add that later? In that case, Does it make more sense to add that option then too?

@@ -41,7 +41,17 @@
private List<IpOptions> ipOptions = ImmutableList.of();
private WindowsConfiguration windowsConfiguration;
private List<Secrets> secrets = ImmutableList.of();

private String customData;
Copy link
Member

Choose a reason for hiding this comment

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

In mots providers, we declare this as a byte[], so we don't have to deal with charset issues, etc. We just get the bytes to be base64-encoded. Mind changing the type and method signatures to accept a byte array?

* Sets the KeyVault id and secret separated with ":"
*/
public AzureTemplateOptions keyVaultIdAndSecret(String keyVaultIdAndSecret) {
this.keyVaultIdAndSecret = keyVaultIdAndSecret;
Copy link
Member

Choose a reason for hiding this comment

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

Validate that the parameter has the right format.

@VRanga000
Copy link
Contributor Author

Thanks for the review comments @nacx ! I do need to add (back) the code to actually use the keyvaultidAndSecret, will do that. Will address the other comments as well.

@VRanga000
Copy link
Contributor Author

Hello @nacx - need your input on implementation for keyvault support. The azure compute adapter code was refactored to use the VirtualMachineAPI instead of the deployment API. As a result, keyvaults cannot be accessed merely by reference (as we could in the deployment template). So - I think we need to implement a new "feature" for azurecompute-arm - namely the keyvault API (https://docs.microsoft.com/en-us/rest/api/keyvault/). So I think we should restrict this PR to just "custom data" support" and remove the keyvault refs. Then create a new issue for keyvault support. Thoughts? Thanks much!

@nacx
Copy link
Member

nacx commented Jul 14, 2017

Thoughts? Thanks much!

Looks good to me!

@neykov
Copy link
Member

neykov commented Aug 6, 2017

@VRanga000 what do you think about splitting the PR into customData support and another one for keyvault support? The two don't seem to depend on each other, and we can merge customData without waiting for the rest.

@jmspring
Copy link
Contributor

@VRanga000 Is it possible to split off the custom data support sooner than later and issue the PR with that? That way we can merge the PR and get azure-armcompute promoted out of labs. The Keyvault work still relies on the things we talked about last week. Let me know if I can help at all.

@nacx
Copy link
Member

nacx commented Sep 29, 2017

I've extracted the customData stuff and pushed to master and 2.0.x. Should we better close this pull request and work on keyvault in a new one?

@andreaturli
Copy link
Contributor

thanks @nacx fyi I'm looking at KeyVaultApi, focusing on the feature first and then we can together add that at the level of the ComputeAdapter?

@jmspring
Copy link
Contributor

jmspring commented Sep 29, 2017 via email

@andreaturli
Copy link
Contributor

thanks @jmspring!

Do you think it would make sense to work on the same branch? my wip is available at https://github.com/andreaturli/jclouds-labs/tree/feature/vault-api in case you want to have a look.

I can make *keys operations work for some authorization issues I'm still trying to figure out

@jmspring
Copy link
Contributor

jmspring commented Oct 3, 2017 via email

@andreaturli
Copy link
Contributor

Excellent @jmspring

I can't list/create keys or certificates into a newly created key vault because of an Authorization issue

@jmspring
Copy link
Contributor

jmspring commented Oct 3, 2017 via email

@jmspring
Copy link
Contributor

@andreaturli - I hope to have some progress on this this week. I'm going through the live tests now for Vault API.

Do you have thoughts on externalizing the tenantId which is hard coded in the live test?

@nacx
Copy link
Member

nacx commented Oct 10, 2017

Do you have thoughts on externalizing the tenantId which is hard coded in the live test?

I don't have the context of the discussion, but isn't it part of the oauth.endpoint property? It could be parsed and exposed, for example in a provider method in the AzureHttpApiModule so it can be injected as a qualified String where needed?

@nacx
Copy link
Member

nacx commented Jan 8, 2018

Closing this. With the recent addition of the keyvault API and the configuration of the custom data in a different PR this should be better done in a new one.

@nacx nacx closed this Jan 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants