57 Commits

Author SHA1 Message Date
graham-dds
237848c2c9 Azure cloud method to get a url to the calculator 2020-02-18 16:15:07 -05:00
graham-dds
8f52443b5d Send email to PPOC when portfolio is provisioned
When a portfolio state machine transitions to the COMPLETED state, an
email is sent to the PPOC letting them know it's ready, and provides
them with their username needed to create a password.
2020-02-13 10:55:47 -05:00
dandds
10014e696d Merge branch 'staging' into environment-role-creation 2020-02-11 12:12:45 -05:00
dandds
f975249f07 Set Redis verification mode for TLS connections.
If the app is making a TLS connection to Redis, the new config setting
REDIS_SSLMODE determines whether CA verification should be performed.
Acceptable values are Python `None` or strings "none", "optional", and
"required".
2020-02-10 16:58:07 -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
leigh-mil
dff9924c95 Make file size limit configurable 2020-01-31 11:59:07 -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
dandds
944c5d3c9f Forcibly destroy existing session on logout.
To comply with security guidelines, we need to destroy the session when
a user logs out. This means that the session's key in the Redis cache
needs to be deleted. Flask expects to _always_ have a session object. If
the current session object does not exist in the Redis cache, Flask will
reserialize and store it at the end of the request. In order for
session deletion to work, we need to delete the key for the existing
session and then replace the session object with a new, empty one.

This also updates the SessionLimiter class so that the session prefix is
configurable.
2020-01-23 10:31:20 -05:00
graham-dds
156d733aee Add missing regex and validation for StringFields
This commit adds further validation for StringFields that were missing
it. This mostly amounted to being Regex patters and max lengths.
2020-01-22 15:20:18 -05:00
leigh-mil
05e7dab673 Delete ppoc related tests 2020-01-17 10:49:05 -05:00
leigh-mil
ab5485e103 Update version of sqlalchemy 2020-01-14 06:27:28 -05:00
dandds
c2ea17b8d1 Clean up unused PKI test files.
Previously these files were being used to integration testing of mutual
TLS authentication. They're not any longer and can be removed.
2020-01-10 09:44:57 -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
leigh-mil
d300ccf31b Catch error on update applications route when app name is duplicated within a portfolio 2019-12-18 10:54:18 -05:00
leigh-mil
22dd5d7b85 Add migration for enforcing uniqueness of an application name within a portfolio and update create/update Applicaiton domain methods. 2019-12-16 14:39:32 -05:00
leigh-mil
ac8dd662d1 Fake task order's expended funds, default task order start and end date to None, fix how task orders are sorted by status 2019-12-12 09:40:18 -05:00
dandds
2d714cae39 Add some missing configuration settings.
These settings are used in the deployed instance and mentioned elsewhere
in the README, but were missing from the base INI file and the
Configuration Guide section of the README.
2019-12-10 10:14:53 -05:00
leigh-mil
74ff581570 Remove route for /portfolios 2019-12-03 15:43:06 -05:00
leigh-mil
614514d6a2 Update tables to match business logic 2019-12-02 14:46:11 -05:00
richard-dds
6b2427a98d Remove unused RQ_QUEUES 2019-11-27 10:30:42 -05:00
richard-dds
684b86c2d0 Remove PE_NUMBER_CSV_URL and PGAPPNAME 2019-11-27 10:30:42 -05:00
richard-dds
2f8135ecd1 Remove CLASSIFIED param 2019-11-27 10:30:42 -05:00
richard-dds
946a29acda Document the significance of our configuration values 2019-11-27 10:30:42 -05:00
richard-dds
4c693cf9c0 Fix bad rebase 2019-11-21 16:42:42 -05:00
richard-dds
5e9a3f0ba6 Add STATIC_URL and ASSET_URL config in base.ini 2019-11-21 16:42:42 -05:00
graham-dds
fea8c9bce9 Remove developer styleguide from project
Since we're actively moving our styles toward a pure of a USWDS
implementation as possible, this styleguide page is becoming
increasingly outdated.
2019-11-19 13:34:14 -05:00
richard-dds
6a1e1b8de8 Remove STORAGE_PROVIDER from test config 2019-11-12 16:57:46 -05:00
richard-dds
4b8296c6ea Remove unused configuration values from base.ini 2019-11-12 16:57:46 -05:00
leigh-mil
ab9b62f54b Update validators and filter to remove strings that contain only
whitespace

The validator ListItemRequired() was only checking for None and an empty
string, not for strings that were multiple whitespace characters. This
fixes this issue by checking each item with regex to make sure it
contains non whitespace characters

The filter remove_empty_string() also was not checking for strings that
were multiple whitespace characters. This was also fixed by using regex
tomake sure that the string contains non whitespace characters, and also
clips any trailing whitespace.
2019-11-12 13:07:50 -05:00
dandds
87a2da68dc Fix secrets baseline and type hint error.
- detect-secrets was previously bumped to 0.13 but the baseline file was
  not updated.
- mypy objects to the way the Azure Subscription type was defined. Since
  the module is encapsulated for dependency injection, we can either
  declare it as a generic or remove the type hint. I did the latter,
  since I don't know that we gain anything by the former.
2019-11-01 15:06:30 -04:00
richard-dds
4da8c923ed Remove boto3 dependency 2019-10-28 14:01:03 -04:00
richard-dds
c66b1ef2f9 Add mypy and add typechecking step to script/test
Only check atst/domain/csp/cloud.py for now
2019-10-24 14:44:53 -04:00
dandds
efcb9681d3 Make Postgres SSL connection configurable.
This will allow us to force SSL connections to the database in
production by setting two values:

- PGSSLMODE should be set to "verify-full". This forces the client to
  verify the server against a known CA: https://www.postgresql.org/docs/10/libpq-ssl.html
- PGSSLROOTCERT should be set to the path of the public cert for the
  relevant CA.

When the database connection is made, these values are passed to the
adapter. For local development, PGSSLMODE is set to "prefer" and
PGSSLROOTCERT is left unset.

Kubernetes config has been added to maintain the root CAs for both Azure
and AWS as k8s ConfigMap objects. These are mounted into the containers
and referenced by PGSSLROOTCERT in the container environment.
2019-10-17 16:05:19 -04:00
dandds
7949c64b9b Initial set up for Ghost Inspector integration tests.
Adds a CircleCI integration for Ghost Inspector
(https://ghostinspector.com), a headless browser testing SaaS. The
README is updated with details about how to run GI locally.

Removes the bootstrap setup for Selenium testing with BrowserStack.
2019-10-14 16:32:38 -04:00
leigh-mil
c9c7c3a1b5 Fix add portfolio member modal 2019-10-08 16:31:01 -04:00
leigh-mil
13bc830536 Add update invite form to settings page and move user info page of member form into its own macro 2019-10-08 16:10:46 -04:00
leigh-mil
4d043363a7 Create route for resending an app invite
Replace ApplicationInvitations._update_status() with revoke() because multiple functions used _update_status() and it was causing app roles to be disabled when they shouldn't have. Now app roles are disabled within the revoke function.
Updated Invitations.resend() to accept user details so the invite info
can be changed in the new invite
2019-10-08 15:59:16 -04:00
richard-dds
faaac42291 Remove todo 2019-10-02 16:01:23 -04:00
richard-dds
cacb9135d1 Tests for AWSCloudProvider.create_environment
Created mock boto3 for testing
2019-10-02 16:01:12 -04:00
richard-dds
30210ba09c Rough implementation of AWSCloudProvider
Rough implementation of AWSCloudProvider.create_environment

Rough impl of AWSCloudProvider.create_atat_admin_user
2019-10-02 16:00:43 -04:00
leigh-mil
738d73dc03 Add in a default error sub heading 2019-10-02 10:55:15 -04:00
leigh-mil
1435734969 Add monkeypatch to mock handle_error() 2019-10-02 10:45:22 -04:00
graham-dds
94ccda9d84 update .secrets.baseline 2019-10-01 15:56:18 -04:00
leigh-mil
c9f654664c Update test to check that env role was deleted and that the status changed on the app role 2019-09-26 10:46:29 -04:00
leigh-mil
663fb9f288 Use ApplicationRoles.disable() instead of Applications.remove_member() 2019-09-26 09:53:20 -04:00
leigh-mil
5c54c043c0 Add route for applications.revoke_invite 2019-09-26 09:46:23 -04:00
dandds
6dc1e10e77 Delete unused Vue components and remove references to them. 2019-09-25 06:14:12 -04:00
graham-dds
dbc851258f Update .secrets.baseline 2019-09-24 10:16:49 -04:00
dandds
112f0e0ab2 Initial JS tests for the Vue TOForm component.
This adds BeautifulSoup to the Python dev dependencies so that we can
render an entire page and then extract the Vue component we need.
Ideally, we should refactor all the Vue components so that they live in
Jinja macros and we can render those macros directly.
2019-09-20 15:24:55 -04:00
leigh-mil
93530e903f Create route for updating app member 2019-09-18 11:16:54 -04:00