7028 Commits

Author SHA1 Message Date
dandds
058ee57527 Create database with separate script.
Creating the ATAT database requires a separate connection to one of the
default Postgres databases, like `postgres`. This updates the scripts
and secrets-tool command to handle creating the database. It also
removes database creation from Terraform and updates the documentation.
2020-01-27 13:17:09 -05:00
dandds
a8f6befc17 secrets-tool command for bootstrapping database.
This additional secrets-tool command can be used to run the database
bootsrapping script (`script/database_setup.py`) inside an ATAT docker
container against the Azure database. It sources the necessary keys from
Key Vault.
2020-01-27 13:17:09 -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
dandds
49edd028a0
Merge pull request #1360 from dod-ccpo/azure-integration-cleanup
Azure Integration Cleanup
2020-01-26 17:24:54 -05:00
tomdds
bcd774ffe0 Fix wildcard import in azure cloud provider. 2020-01-26 16:11:53 -05:00
tomdds
5b0a523e92 Use more specific imports for cloud models and exceptions. 2020-01-26 15:52:55 -05:00
tomdds
466a575229 Move portfolio state machine helpers directly to model file to prevent import issues.
Having `get_stage_csp_class` in the csp module meant that any file that interacted with that import path would throw an error in a REPL. This will allow importing of the Azure and Mock providers for interactive dev.
2020-01-26 15:17:53 -05:00
tomdds
b28281d04e Break out cloud integration into smaller files. 2020-01-26 14:03:09 -05:00
tomdds
d02d47615e First step in breaking out cloud.py
Move cloud.py to a module init. Move policy with it. Update related unit tests. Also adds a patch to state machine test to prevent randomness in mock from failing test.
2020-01-26 14:03:09 -05:00
tomdds
f08d53d7a0 Transition all Cloud Interface Methods to use Dataclasses 2020-01-24 15:42:23 -05:00
tomdds
02ec54a310
Merge pull request #1317 from dod-ccpo/azure-custom-integration
First Pass Azure Tenant Creation Integration + Orchestration
2020-01-24 14:42:28 -05:00
tomdds
7e0fda67b0 Clean up unusued imports and variables 2020-01-24 13:52:41 -05:00
tomdds
b9206ed7be Some more LGTM fixes 2020-01-24 13:35:46 -05:00
tomdds
35eea8e31c
Merge branch 'staging' into azure-custom-integration 2020-01-24 11:16:11 -05:00
tomdds
e9d03ec68b Fix some LGTM errors and start sketching in credential update functionality 2020-01-24 11:15:35 -05:00
tomdds
910920af44 Formatting fixes 2020-01-24 11:03:38 -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
dandds
272d492af6
Merge pull request #1350 from robgil-dds/170808212-storage-private-endpoint
Service Endpoints
2020-01-24 10:24:23 -05:00
Rob Gil
76465e978a Remove k8s test tf 2020-01-24 07:36:24 -05:00
Rob Gil
7b2523254d Adds Dans home ip 2020-01-24 07:36:02 -05:00
Rob Gil
daa07f8631 Removes unnecessary locals in the bucket module 2020-01-23 20:26:27 -05:00
Rob Gil
e0d59eb166 Finally fixes subnet list output
This finally fixes the output coming from the vpc module so that it
returns a full list of subnets. Now they can be referenced just like the
redis module is using in this commit.
2020-01-23 20:22:53 -05:00
leigh-mil
204bf49ff4
Merge pull request #1352 from dod-ccpo/add-subscription-to-env
Add subscription to env
2020-01-23 20:20:58 -05:00
Rob Gil
3f5bbf2c5e Cleans out comments 2020-01-23 19:58:06 -05:00
Rob Gil
9f0904c201 Adds dedicated redis subnet 2020-01-23 19:57:45 -05:00
Rob Gil
0f5f5bd926 Converts redis to use service_endpoints
This is still a WIP.
2020-01-23 19:16:00 -05:00
Rob Gil
38ce1ef2b2 Adds list of users for access to storage and more service endpoints
This sets up the rest of the service endpoints on the subnets. It also
adds a variable map specifically to grant IP access to the storage
buckets. This new variable map is necessary since the azure storage ip
rules do not accept /32 CIDR ranges. The rest of the services do support
cidr ranges.
2020-01-23 18:41:29 -05:00
leigh-mil
1bad32bcdb Add success flash message 2020-01-23 16:44:27 -05:00
leigh-mil
59327d4cea Styling for environment edit form 2020-01-23 16:44:07 -05:00
leigh-mil
0fcd5a6471 Move text into translations file and fix formatting to make file more readable 2020-01-23 16:44:07 -05:00
leigh-mil
1054457048 Button for adding a subscription 2020-01-23 16:44:07 -05:00
leigh-mil
ec56d8e38a Properly display environment role on application index page 2020-01-23 16:44:07 -05:00
leigh-mil
31b7e2f589 Create route and domain method for creating a subscription 2020-01-23 16:44:07 -05:00
dandds
1c53ceef00
Merge pull request #1337 from dod-ccpo/apply-session-limit
Forcibly destroy existing session on logout.
2020-01-23 16:04:43 -05:00
Rob Gil
536eccdb90 Container registry private networking and bucket cidr range fix 2020-01-23 13:13:56 -05:00
Rob Gil
dab6cdb7dc Locks down keyvaults to subnets and administrator ip addresses 2020-01-23 11:02:12 -05:00
Rob Gil
c31d68a18c Makes client vpn cidr range configurable 2020-01-23 10:50:16 -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
dandds
0fa4fd2304 Limit concurrent session by default for deployed sites.
To meet ATO requirements, a user should not be able to have concurrent
logins.
2020-01-23 10:29:37 -05:00
tomdds
81054b2ff0 Fix Enum Migration to properly deal with constraint changes
Since we're using non-native enums for our model, alembic has some issues knowing what the previous "type" actually was, and not specifying it correctly causes a bad constraint.
2020-01-23 10:17:07 -05:00
597ea32e42 portfolio provision process. add logging, __repr___ method, fix broken tests 2020-01-23 10:14:22 -05:00
Rob Gil
48482785ac Adds IP whitelisting to storage buckets 2020-01-23 10:02:31 -05:00
leigh-mil
6f2454ae5f
Merge pull request #1342 from dod-ccpo/route-validation
Validation on route parameters
2020-01-22 20:06:03 -05:00
Rob Gil
d22357e609 Adds step to manually configure MFA in AD 2020-01-22 19:37:04 -05:00
Rob Gil
635ccb0fd3 Fixes postgres character collation 2020-01-22 19:36:33 -05:00
Rob Gil
01703b1488 Configures storage buckets to be optionally exposed via service endpoints 2020-01-22 19:35:54 -05:00
Rob Gil
9042a960bb Adds configurable service endpoints to subnets in the vpc module 2020-01-22 19:35:19 -05:00
leigh-mil
158f7f43d7 Remove catch_all route 2020-01-22 16:53:28 -05:00
leigh-mil
bdc03fb0a2 Remove /help route and templates 2020-01-22 16:53:11 -05:00
leigh-mil
0484d9b77f
Merge pull request #1344 from dod-ccpo/fix-app-member-form
Remove delete environments from app members form
2020-01-22 16:30:43 -05:00