7179 Commits

Author SHA1 Message Date
leigh-mil
8e2870b62f Add max width to CTA footer in the TO builder form
- Created a new mixin (ExpandSidenavMixin) that sets the defaultVisible prop that can be used in both the root component and the SidenavToggler. This makes it so that the Root knows whether or not the sidenav is collapsed or expanded, so then child components can use this to calculate margins/paddings/offsets/etc.
- Added new classes for the .action-group-footer that set the elements padding based on whether or not the sidenav is expanded.
- Added a nested div (.action-group-footer--container) inside .action-group-footer which sets the max width
2020-02-04 16:13:07 -05:00
leigh-mil
ece4b20bcf
Merge pull request #1383 from dod-ccpo/fix-script-server
Update Pipfile to fix script/server
2020-02-03 15:55:01 -05:00
leigh-mil
e85934c8fe Update Pipfile 2020-02-03 15:38:32 -05:00
dandds
8b0c28b09f
Merge pull request #1380 from dod-ccpo/azure-user-creation
Azure user creation
2020-02-03 14:09:43 -05:00
dandds
b81ece7ad9
Merge branch 'staging' into azure-user-creation 2020-02-03 13:54:22 -05:00
dandds
bb7cbf00cd Add microsoft domain to AAD user names. 2020-02-03 11:17:42 -05:00
dandds
ce72529b8a
Merge pull request #1381 from dod-ccpo/170977491-uploads
Fix task order uploads.
2020-02-03 10:48:21 -05:00
dandds
0517bd1b0a Fix task order uploads.
Task order uploads and downloads were broken. Uploads were broken
because file content was eing read in as plaintext every time, resulting
in encoding issues. I updated the bundle to use the newer Azure JS SDK.
We can now use a method for uploading browser files directly without
having to read their content. This required a few small internal changes
to the upload component, since the response structure is different.

I also removed the `downloadUrl` method from the JS uploader since it
was not being used.

Downloads were broken because the method that generates the download
link was not updated to use the BlobSasPermissions class from the
updated Azure Python SDK.
2020-02-03 09:56:02 -05:00
dandds
0b8886182d Fix wrong creds reference in create_applications method. 2020-02-02 14:42:44 -05:00
dandds
6b8d9d1d65 Celery wrapper for creating a user. 2020-02-02 14:42:44 -05:00
dandds
b1c6dd5ad0 Adds a method for creating an Active Directory user.
This method is added to the Azure cloud interface. We need to set the
AAD user's alternate email, which is a subsequent PATCH call to the API.
These two calls are handled with a single interface method and payload
because ATAT would never create a user without an associated email.

This commit also:

- Expands internal method for getting principal tokens so that it can be
  scoped to different resources.
- Retains the tenant domain name in the portfolios.csp_data column
  because ATAT needs that information for provisioning users via API.
2020-02-02 14:42:44 -05:00
dandds
cc28f53999 Function for claiming multiple resources at once.
Like claim_for_update, the claim_many_for_update claims resources with
an expiring lock. This was written to allow the updating of multiple
application roles with a single cloud_id, since multiple application
roles will map to a single Azure Active Directory user.
2020-02-02 14:19:13 -05:00
dandds
1b45502fe5 SQLAlchemy query for finding ApplicationRoles ready for provisioning.
This adds a query method to return the IDs of the application roles that
should be provisioned as users in Azure. We will provision one Azure
Active Directory user per ATAT user in a portfolio, meaning that one AAD
user might correspond to multiple application roles under a single
portfolio. The query method returns IDs in a nested list grouped by
portfolio and user because of this.

add method for getting app roles that are pending creation

update application_roles query to group by portfolio

check for user existing and role status correct when filtering ApplicationRole for creation
2020-02-02 14:03:17 -05:00
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
dandds
f79af3ad62
Merge pull request #1375 from dod-ccpo/azure-subscriptions
Add functionality for creating and verifying subscriptions.
2020-02-01 10:29:29 -05:00
tomdds
61e891258b Merge branch 'staging' into azure-subscriptions 2020-01-31 17:00:43 -05:00
tomdds
f296358e6d
Merge pull request #1368 from dod-ccpo/product-purchase-provisioning
Product purchase provisioning
2020-01-31 16:19:27 -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
dandds
b20df28116
Merge pull request #1374 from dod-ccpo/download-and-email-tos
Download and email tos
2020-01-31 15:19:49 -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
leigh-mil
3737219995
Merge pull request #1379 from dod-ccpo/fix-portfolio-column-type
Fix column type on portfolios defense_component
2020-01-31 14:25:23 -05:00
tomdds
e672941259 Source correct tenant id for root credentials 2020-01-31 14:11:28 -05:00
tomdds
9880da93c9
Merge branch 'staging' into product-purchase-provisioning 2020-01-31 14:04:39 -05:00
leigh-mil
b5e7ea3fa6 Fix column type on portfolios defense_component 2020-01-31 14:03:30 -05:00
leigh-mil
32607224b3
Merge pull request #1378 from dod-ccpo/fix-last-login
Remove extra </div>
2020-01-31 13:53:53 -05:00
leigh-mil
45231d11fa
Merge branch 'staging' into fix-last-login 2020-01-31 13:17:47 -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
0e49d038be Add azure-storage-blob and remove pytest-watch
pytest-watch + pipenv were causing problems when building the app in CI,
so pytest-watched was removed for the time being.
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
baf7be2961
Merge pull request #1373 from dod-ccpo/limit-file-size
Limit file size
2020-01-31 13:09:15 -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
leigh-mil
881bf3220c fix formatting 2020-01-31 11:57:15 -05:00
leigh-mil
8d30fd4cfb Remove extra </div> 2020-01-31 11:52:15 -05:00
tomdds
73ddd32365 Only unpack AADP purchase date after verifying response code. 2020-01-31 11:51:13 -05:00
dandds
62d8a89eb1
Merge pull request #1376 from dod-ccpo/k8s-perms-for-load-balancers
Give the cluster perms to create load balancers.
2020-01-31 10:27:05 -05:00
dandds
60fe6615c7
Merge branch 'staging' into k8s-perms-for-load-balancers 2020-01-31 10:06:49 -05:00
dandds
36da6fff32
Merge pull request #1377 from dod-ccpo/secure-session-bug
Fix bug in setting Secure on session cookie.
2020-01-31 09:51:37 -05:00
dandds
10f8bf9503 Fix bug in setting Secure on session cookie.
This fixes a bug I introduced with commit

6edc7b138b0745d0b3f9d99da76c445fe954c5a7

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