Skip to content

Adding support for multiple Azure Clouds#193

Merged
ianhelle merged 23 commits intomainfrom
ianhelle/azure-cloud-settings-2021-08-06
Sep 9, 2021
Merged

Adding support for multiple Azure Clouds#193
ianhelle merged 23 commits intomainfrom
ianhelle/azure-cloud-settings-2021-08-06

Conversation

@ianhelle
Copy link
Contributor

@ianhelle ianhelle commented Aug 7, 2021

Added Azure settings section containing cloud and auth_methods entries.
Updated settings editor to show these.
Updated KeyVault settings to use these global settings if nothing provided for Key Vault
Updated kql_driver settings to use Azure cloud settings for its cloud settings.

Now using Kqlmagic.kql() function in kql_driver. Allows
it to be used from python code.
…as_function-2021-08-04

Merging fixes from mordor branch into here.
Adding cloud options to settings, kql_driver and keyvault

Updated help text and combined CESimpleSettings class.
@ianhelle ianhelle requested a review from petebryan August 7, 2021 00:46
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@ianhelle
Copy link
Contributor Author

@petebryan - I've reviewed your code but can't approve my own PR.
Will try to test in usgov tomorrow.

…from config

azure_auth.py - uses AzureCloudConfig, added credential_scopes option SubscriptionClient init, spelling corrections
azure_auth_core.py - create AzureCloudConfig, and _AzCachedConnect classes to read cloud config values and cache tokens
cred_wrapper.py - minor formatting
keyvault_settings.py - usea AzureCloudConfig
ce_common.py - uses AzureCloudConfig in get_def_tenant_id function
azure_data.py - uses AzureCloudConfig, added credential_scopes option to client class inits, spelling corrections
azure_sentinel.py - uses AzureCloudConfig. added functions to set default subscription and workspace, changed _build_paths to method
kql_driver.py - uses AzureCloudConfig, added load_mode == Silent, added mp_az_auth to control using Azure auth instead of native Kqlmagic auth,
resource_graph_driver.py -  uses AzureCloudConfig, added credential_scopes option SubscriptionClient init
pivot_magic_core.py - fixing pandas deprecation warning
test_azure_auth_core - Added test for AzureCloudConfig class
test_resource_graph_driver.py, test_azure_data.py,  test_azure_sentinel.py - added real credential classes to test
msticpyconfig-test.yaml, msticpyconfig.yaml - added Azure sections to test config.
@ianhelle ianhelle merged commit a00741d into main Sep 9, 2021
@ianhelle ianhelle deleted the ianhelle/azure-cloud-settings-2021-08-06 branch September 9, 2021 18:06
juju4 pushed a commit to juju4/msticpy that referenced this pull request Jun 5, 2022
* Kqlmagic operations called as func vs. IPython magics
Now using Kqlmagic.kql() function in kql_driver. Allows
it to be used from python code.

* Fixing Mordor URL again.

* Fixes to data paths and metadata in mordor driver

* Fixing test paths due to AV isolating file.

* Fixing bug where KQL env var was overwritten

* removing explicit identifier from test in test_mordor_driver

Adding cloud options to settings, kql_driver and keyvault

Updated help text and combined CESimpleSettings class.

* Updating Notice.txt file

* Test failures from new changes

* Azure auth multicloud support

* Replacing hard-coded URIs with msrestazure enums

* Modularize multicloud support

* Linting fixes

* Fix way endpoints are retreived

* updated types

* cred-scan suppression

* Refactoring code to use AzureCloudConfig instead of reading directly from config

azure_auth.py - uses AzureCloudConfig, added credential_scopes option SubscriptionClient init, spelling corrections
azure_auth_core.py - create AzureCloudConfig, and _AzCachedConnect classes to read cloud config values and cache tokens
cred_wrapper.py - minor formatting
keyvault_settings.py - usea AzureCloudConfig
ce_common.py - uses AzureCloudConfig in get_def_tenant_id function
azure_data.py - uses AzureCloudConfig, added credential_scopes option to client class inits, spelling corrections
azure_sentinel.py - uses AzureCloudConfig. added functions to set default subscription and workspace, changed _build_paths to method
kql_driver.py - uses AzureCloudConfig, added load_mode == Silent, added mp_az_auth to control using Azure auth instead of native Kqlmagic auth,
resource_graph_driver.py -  uses AzureCloudConfig, added credential_scopes option SubscriptionClient init
pivot_magic_core.py - fixing pandas deprecation warning
test_azure_auth_core - Added test for AzureCloudConfig class
test_resource_graph_driver.py, test_azure_data.py,  test_azure_sentinel.py - added real credential classes to test
msticpyconfig-test.yaml, msticpyconfig.yaml - added Azure sections to test config.

* Fixing some issues in unit tests - test_provider_secrets.py and test_resource_graph_driver.py

* Update azure-mgmt-subscription and azure_mgmt-resource versions

* Adding a bit more text/warning to check the browser.

Co-authored-by: Pete Bryan <pebryan@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MSTICPy config should support Azure cloud config AzureGov support

2 participants