Commit Graph

2730 Commits

Author SHA1 Message Date
dandds
4511630787 Update application_roles table for provisioning.
Adds cloud_id and claimed_until columns to the application_roles table
so that rows can be locked when they're being processed and updated with
relevant Azure information when processing is finished. Since the
claimed_until column is now common to a few different models, I've also
moved it to a mixin.
2020-02-02 14:01:35 -05:00
tomdds
61e891258b Merge branch 'staging' into azure-subscriptions 2020-01-31 17:00:43 -05:00
tomdds
6952a533e2 Merge branch 'staging' into product-purchase-provisioning 2020-01-31 15:50:31 -05:00
tomdds
bbed83d897 Update AADP Purchase url and respose format to newer schema. 2020-01-31 15:50:10 -05:00
tomdds
53dcb94046 Merge branch 'staging' into azure-subscriptions 2020-01-31 15:43:08 -05:00
tomdds
d5e739ea68 Fill in subscription creation mocks 2020-01-31 14:42:38 -05:00
tomdds
9acbeeb824 Add display name to subscription creation payload
Also extracts environment -> subscription payload construction to it's own method.
2020-01-31 14:42:38 -05:00
tomdds
670e135a0e Merge branch 'staging' into azure-subscriptions 2020-01-31 14:41:39 -05:00
tomdds
a0ea3e3220 Merge branch 'staging' into product-purchase-provisioning 2020-01-31 14:41:32 -05:00
leigh-mil
42b3fa2b0c Merge branch 'staging' into download-and-email-tos 2020-01-31 14:28:37 -05:00
tomdds
e672941259 Source correct tenant id for root credentials 2020-01-31 14:11:28 -05:00
leigh-mil
b5e7ea3fa6 Fix column type on portfolios defense_component 2020-01-31 14:03:30 -05:00
graham-dds
e32e211966 Make Upload related classes more generic
Renames Python classes that refer to Upload to something to FileService.
We added this change because these classes now handle downloading as
well as uploading.
2020-01-31 13:17:00 -05:00
graham-dds
a7770d8a6a Add method to download TOs from Azure 2020-01-31 13:17:00 -05:00
graham-dds
00a5a98577 Add Mailer class method to email TOs to MSFT 2020-01-31 13:17:00 -05:00
tomdds
ba84b92795 Merge branch 'staging' into product-purchase-provisioning 2020-01-31 13:13:07 -05:00
leigh-mil
745ce713b0 Hard code TO upload description into the UploadInput Macro
This is a temporary fix to avoid spending too much time trying to use app.config variables in a Form class field descriptions and labels. This is tech debt and should be fixed in the future.
2020-01-31 12:08:48 -05:00
tomdds
f41d54aa9e Merge branch 'staging' into product-purchase-provisioning 2020-01-31 12:03:08 -05:00
leigh-mil
0c408bccfd Update PDF file size limit to be less than the GMail SMTP size limit 2020-01-31 11:59:07 -05:00
leigh-mil
dff9924c95 Make file size limit configurable 2020-01-31 11:59:07 -05:00
tomdds
73ddd32365 Only unpack AADP purchase date after verifying response code. 2020-01-31 11:51:13 -05:00
dandds
10f8bf9503 Fix bug in setting Secure on session cookie.
This fixes a bug I introduced with commit

6edc7b138b

The value for SESSION_COOKIE_SECURE was being read in as a truthy string
every time. In order for it to be interpreted correctly, we need to map
it to a boolean.
2020-01-31 06:18:54 -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
29b69a7d5d code formatting 2020-01-30 16:50:32 -05:00
tomdds
afcc4d16cd Add functionality for creating and verifying subscriptions.
Currently the create call will be consumed by on-demand requests from the frontend, and the 2 stage create will be used by the enviroment management group provisioning to verify an initial subscription was created.
2020-01-30 15:58:09 -05:00
7e4340e7e4 resolve merge conflict with staging 2020-01-30 15:57:06 -05:00
de992eeed8 premium product purchase code formatting. 2020-01-30 14:50:16 -05:00
7493b9c3d6 premium product purchase unit tests. 2020-01-30 14:48:16 -05:00
leigh-mil
0a7541ef99 Remove unused mock csp routes, templates, and images. Remove unused JEDIhierarchy image 2020-01-30 14:09:12 -05:00
tomdds
6480060b8d Merge branch 'staging' into azure-admin-provisioning 2020-01-30 11:17:33 -05:00
graham-dds
05ef9131dd Merge branch 'staging' into safe_redirect 2020-01-30 10:42:33 -05:00
tomdds
33c6e8c68c Merge CSP secret handling implementations and refine updating. 2020-01-29 18:22:21 -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
leigh-mil
f48404215a Merge branch 'staging' into to-builder-previous-button 2020-01-29 15:09:27 -05:00
graham-dds
82ef8f3574 Add fn to ensure a url matches an app url pattern
In some functions, we redirect a user based on a parameter in a query
string.  This commit adds a function that checks to see if a given url
matches a url pattern of a view function. This will help us ensure that
the url passed  as the next parameter isn't malicious.
2020-01-29 13:24:12 -05:00
5223fda8f8 product purchase mock function correct args 2020-01-29 12:51:33 -05:00
a0d59aa9e4 portfolio provisioning. create product purchase and verification stages 2020-01-29 12:51:19 -05:00
dandds
63b5ddbdd4 Merge branch 'staging' into app-env-provisioning 2020-01-29 11:16:55 -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
dandds
66bd81eda9 Merge branch 'staging' into take3 2020-01-28 14:33:05 -05:00
tomdds
7bf6b9addc Remove creds from payloads and passthroughs. 2020-01-28 14:12:04 -05:00
dandds
67bfe09bbf Merge branch 'staging' into alpha-numeric-to-numbers 2020-01-28 11:24:40 -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
dandds
49a1a219ae Script for setting up database user, schema, and seed data.
This script is for bootstrapping the initial database. It can be run via
a container, but requires that a Postgres superuser's credentials be
provided via our normal config. That way the superuser can provision a
less-privileged user for the application's database connection.
2020-01-27 13:17:09 -05:00
leigh-mil
99edf3df90 Save valid TO form fields when clicking previous in TO builder 2020-01-27 11:56:09 -05:00
dandds
a10d733fb7 Fix test and LGTM warnings.
- Fixes LGTM warnings for an unused import and equality comparisons to
  None in SQLAlchemy filters.
- Removes part of a unit test asserting that the claimed_until locking
  mechanism works correctly. If I recall correctly, this does not work
  in unit tests because the test takes place inside a transaction, and
  the database provider does evaluate the current time until the
  transaction is written.
2020-01-27 06:27:18 -05:00
dandds
ef8f92b678 Merge branch 'staging' into app-env-provisioning 2020-01-26 18:56:29 -05:00
dandds
37a5218a1d Split and barrel cloud module for merge. 2020-01-26 18:38:02 -05:00