24 Commits

Author SHA1 Message Date
88b3df7906 csp provider tests requests.HTTPError exceptions 2020-02-12 21:32:48 -05:00
3163c73a0d resolve merge conflict 2020-02-11 15:40:15 -05:00
41e2ae5253 azure csp tests catch exceptions resulting from raised requests exceptions 2020-02-11 15:32:47 -05:00
441e81ba8d azure csp unit tests WIP 2020-02-11 14:11:11 -05:00
50ab045353 provisioning error handling applied to all requests calls 2020-02-06 14:44:49 -05:00
37eda0b959 create_tenant error handling 2020-02-05 15:34:59 -05:00
dandds
b754f1384f Include all Azure config in the INI file.
Adds all the new config items to the INI file and adjusts some naming
conventions so that these values sort together. Also adds defaults for
some values where they're known.
2020-02-04 16:12:45 -05:00
tomdds
6b8ea41925 Make AADP purchase quantity configurable
Also remove a few constant params from the payload model.
2020-01-30 22:12:28 -05:00
tomdds
0bc0e15134 Merge branch 'staging' into azure-config-values 2020-01-29 16:50:44 -05:00
tomdds
d4dd581b7a Implement principal creation and admin elevation provisioning features. 2020-01-29 16:17:28 -05:00
dandds
abd03be806 Store and pull tenant creds from Key Vault.
The tenant ID should be hashed and used as the key for the JSON blob of
relevant creds for any given tenant. Azure CSP interface methods that
need to source creds should call the internal `_source_creds` method,
either with a `tenant_id` or no parameters. That method will source the
creds. If a tenant ID is provided, it will source them from the Key
Vault. If not provided, it will return the default creds for the app
registration in the home tenant.
2020-01-29 10:49:27 -05:00
tomdds
144312863c Draft implementations of remote admin creation and root management group ownership. 2020-01-28 20:14:50 -05:00
tomdds
7bf6b9addc Remove creds from payloads and passthroughs. 2020-01-28 14:12:04 -05:00
tomdds
475ceaed7c Source Azure Environment Values from Config
This commit switches a few previously hardcoded values to be parsed from configuration, either from the SDK or current consts.
2020-01-27 16:49:19 -05:00
tomdds
ea040a914e Properly report initial clin information
Includes fixed up state machine test as well as adds some missing dependencies
2020-01-24 11:01:53 -05:00
tomdds
1b1a20cf52 Restore implementations for policies and management group creation
These were accidentally stripped out during a rebase.
2020-01-22 14:39:30 -05:00
tomdds
f5e4b603cb Bring naming conventions for methods and classes related to CSP provisioning in line with state machine 2020-01-22 13:39:41 -05:00
tomdds
2ac333e0b7 Sample create tenant itegration
This integration works with the happy path, we'll need to expand some fields and handle error states more coherently.
2020-01-14 17:16:54 -05:00
dandds
3bfb6c9621 Basic implementation for a policy wrapper.
The implementation here is meant to wrap a library of JSON policy
documents. Policies should be added to directories corresponding to
where they will be defined (portfolio, application, environment).
Functionality for parsing portfolio policy definitions is included. When
the policies need to be defined on a management group, the
AzureCloudProvider can iterate the appropriate tier of the policy
manager and add those definitions.
2019-12-20 10:34:12 -05:00
dandds
b61956080e Initial policies and method for creating policy definition.
This adds some initial example policies:

- One for region restrictions
- One for service restrictions

Note that the MS ARM team has said that region restrictions may be
controlled by ARM, so that policy might prove unnecessary. The
parameters list for the service restrictions is stubbed for now, pending
the full list.

I also added an internal method for adding policy definitions to a
management group. This method is agnostic about what tier of management
group the policy is being defined at. It requires that a dictionary
representing the properties section of a valid Azure JSON policy
definition be passed as an argument.
2019-12-20 10:34:12 -05:00
tomdds
8a1ed5b193 Sketch in Management Group integration for Azure
Add mocks and real implementations for creating nested management groups that reflect the Portfolio->Application->Environment->Subscription hierarchy.
2019-12-13 10:53:24 -05:00
tomdds
d0746a3bf6 Cleanup imports and formatting in azure testing code 2019-10-30 16:43:59 -04:00
tomdds
63ea7db390 Rudimentary tests to validate mocking 2019-10-30 16:43:59 -04:00
tomdds
99e306e602 First pass at mocking and testing azure integration 2019-10-30 16:43:59 -04:00