chaostoolkit-incubator / chaostoolkit-azure

Chaos Toolkit Extension for Azure
https://chaostoolkit.org/
Apache License 2.0
22 stars 28 forks source link

Allow Use of Azure Credentials File #58

Closed mikeln closed 4 years ago

mikeln commented 5 years ago

Azure API allows the use of a Credentials File in addition to the explicit ENV vars approach.
This is an easier way to deal with Azure credentials, especially in the case where you are given access to a previously running AKS cluster.

Here is the example from Azure python API doc: https://docs.microsoft.com/en-us/python/azure/python-sdk-azure-authenticate?view=azure-python#mgmt-auth-file

bugra-derre commented 4 years ago

@mkaszub Did you see this?

mkaszub commented 4 years ago

I think we can introduce something like a "credential file" especially that other extensions e.g aws, kubernetes have such things and it would be beneficial here as well.

Unfortunately Azure/Microsoft has no standard for such credential file (like aws/kubernetes). Azure CLI is using acessToken.json that can be found under ~./azure/ but it is not documented (and it stores only tokens). Another example of such file could be the one from link provided by @mikeln

In addition to that Azure has multiple authenticaiton methods. We currently support:

@bugra-derre @mikeln let me check the code and experiment a bit so I can propose a solution.

buderre commented 4 years ago

@mikeln I guess that this feature is in master now. Therefore I will close this issue.

mikeln commented 4 years ago

I'm currently not working in this area, so I haven't validated this fix. Though I assume it is probably correct. Thanks!