nccgroup / ScoutSuite

Multi-Cloud Security Auditing Tool
GNU General Public License v2.0
6.73k stars 1.07k forks source link

Azure Error: SubscriptionNotFound listed when using Scout through Azure Gov doesn't let you set cloud environment #337

Open jagallardo19 opened 5 years ago

jagallardo19 commented 5 years ago

I logged into Azure Gov using az account set -subscription to set the environment to Azure gov. Then ran Scout azure --cli and got the message "Azure Error: SubscriptionNotFound". Used different methods to try and login through Azure gov. Also did an "az account show" to verify the environment name as "AzureUSGovernment". Also tried different methods of authentication to no avail. I was also able to track within our Proxy that the request was going to login.microsoftonline.com vs. login.microsoftonline.us which is the Azure US Gov version.

x4v13r64 commented 5 years ago

Thanks, I don't believe we've looked at this (as we don't have such an account to test against).

Looking here https://github.com/Azure/azure-sdk-for-python/blob/master/doc/multicloud.rst it doesn't seem like supporting this would be very complicated. @jagallardo19 if we push a branch would you be so kind as to test it out?

jagallardo19 commented 5 years ago

I wouldn't mind at all.

jagallardo19 commented 5 years ago

Just as an fYI this is how I found the cloud list for some of the APIs: az cloud list and I set the subscription in the environment in this way: az account set --subscription <subscription #>