6318 Commits

Author SHA1 Message Date
graham-dds
295088524c Tweak date validation logic for months and days
- valid months should be between 1 and 12, inclusive
- days should be between 1 and 31, inclusive
- swap a few lets for consts
2019-11-12 13:00:01 -05:00
dandds
0cee3c9959
Merge pull request #1172 from dod-ccpo/crl-storage-container
Create CRL_STORAGE_CONTAINER if it does not exist.
2019-11-08 10:49:39 -05:00
dandds
1654d2ea9f Create CRL_STORAGE_CONTAINER if it does not exist.
In local development, the app will fail to start if it does not find the
directory specified by CRL_STORAGE_CONTAINER. This adds a few lines to
safely create that directory on startup and corresponding tests.
2019-11-08 06:21:56 -05:00
dandds
9cceb1880c
Merge pull request #1170 from dod-ccpo/static-fonts
Force removal of existing fonts symlink in Docker build.
2019-11-07 16:27:34 -05:00
dandds
253cc29c56 Force removal of existing fonts symlink in Docker build.
For local development, we symlink the USWDS fonts from the npm installed
copy into our static directory. This causes problems for the Docker
build because it is not expecting to find a pre-existing "static/fonts"
directory. This forcibly removes any existing "static/fonts" directory
to fix the issue.
2019-11-07 15:22:16 -05:00
graham-dds
e6d9dcf4bd
Merge pull request #1168 from dod-ccpo/bugfix/sort_environments
Bugfix: Ensure environment names are sorted when rendered
2019-11-07 13:55:13 -05:00
graham-dds
f705ac2303 Ensure env roles are sorted for each member 2019-11-07 09:36:45 -05:00
dandds
17149efa09
Merge pull request #1167 from dod-ccpo/crl-test-bugfix
CRL test should skip JSON cache.
2019-11-06 12:00:05 -05:00
graham-dds
6bc1e0ba9a Ensure environment names are sorted when rendered 2019-11-06 11:53:31 -05:00
dandds
7ac29eff56 CRL test should skip JSON cache. 2019-11-06 06:08:48 -05:00
leigh-mil
7b96a05f95
Merge pull request #1154 from dod-ccpo/add-env-roles-to-app-members-table
Add env role to the app members table and truncate long env names
2019-11-05 15:58:25 -05:00
leigh-mil
da516554c2 Add env role to the app members table and truncate long env names 2019-11-05 11:46:33 -05:00
leigh-mil
6569bbd135
Merge pull request #1165 from dod-ccpo/ccpo-users-order
Sort ccpo users
2019-11-05 10:43:15 -05:00
dandds
d5bc49a7b9
Merge pull request #1156 from dod-ccpo/crl-issuer-cache
CRL Issuer Cache
2019-11-05 09:59:43 -05:00
leigh-mil
35b2718e18 Sort ccpo users by last name 2019-11-05 09:48:54 -05:00
leigh-mil
9e6e19fb90
Merge pull request #1153 from dod-ccpo/fix-save-button-text
Fix Save button text
2019-11-05 06:14:59 -05:00
Jay R. Newlin (PromptWorks)
5c366c2993
Merge pull request #1158 from dod-ccpo/ghost-refactor
Tests "refactored" to remove extraneous clicks
2019-11-04 16:57:46 -05:00
richard-dds
daa0f81dd5
Merge pull request #1149 from dod-ccpo/lgtm-fixes
LGTM Fixes
2019-11-04 15:35:03 -05:00
dandds
3e0b7b1c5f CD sets image for Kubernetes CRLs CronJob.
This ensures that the CronJon responsible for updating CRLs is using the
most up-to-date image. Previously, it used the "latest" tag. Since the
K8s Docker environment caches image tags, "latest" would not always be
up-to-date.
2019-11-04 08:44:21 -05:00
dandds
0b5acde4c4 Stream-parse CRLs for caching file locations.
AT-AT needs to maintain a key-value CRL cache where each key is the DER
byte-string of the issuer and the value is a dictionary of the CRL file
path and expiration. This way when it checks a client certificate, it
can load the correct CRL by comparing the issuers. This is preferable to
loading all of the CRLs in-memory. However, it still requires that AT-AT
load and parse each CRL when the application boots. Because of the size
of the CRLs and their parsed, in-memory size, this leads to the
application spiking to use nearly 900MB of memory (resting usage is
around 50MB).

This change introduces a small function to ad-hoc parse the CRL and
obtain the information in the CRL we need: the issuer and the
expiration. It does this by reading the CRL byte-by-byte until it
reaches the ASN1 sequence that corresponds to the issuer, and then looks
ahead to find the nextUpdate field (i.e., the expiration date). The
CRLCache class uses this function to build its cache and JSON-serializes
the cache to disk. If another AT-AT application process finds the
serialized version, it will load that copy instead of rebuilding it. It
also entails a change to the function signature for the init method of
CRLCache: now it expects the CRL directory as its second argument,
instead of a list of locations.

The Python script invoked by `script/sync-crls` will rebuild the
location cache each time it's run. This means that when the Kubernetes
CronJob for CRLs runs, it will refresh the cache each time. When a new
application container boots, it will get the refreshed cache.

This also adds a nightly CircleCI job to sync the CRLs and test that the
ad-hoc parsing function returns the same result as a proper parsing
using the Python cryptography library. This provides extra insurance
that the function is returning correct results on real data.
2019-11-04 08:36:03 -05:00
Jay R. Newlin (PromptWorks)
fee7a1f85d Tests "refactored" to remove extraneous clicks 2019-11-01 16:08:05 -04:00
Jay R. Newlin (PromptWorks)
e64f5cb96a
Merge pull request #1155 from dod-ccpo/ghost-inspector-to-github
Ghost Inspector to GitHub
2019-11-01 15:59:42 -04:00
dandds
56f0119814
Merge pull request #1157 from dod-ccpo/quick-fixes
Fix secrets baseline and type hint error.
2019-11-01 15:38:34 -04:00
Jay R. Newlin (PromptWorks)
288999c77f Removing erroreous .DS_Store 2019-11-01 15:12:39 -04: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
Jay R. Newlin (PromptWorks)
8c7a5e7e5f Update README with reference to exported Ghost Inspector tests 2019-10-31 16:32:23 -04:00
leigh-mil
d142fa974a Update Form mixin so that you can enable the save button for a form on render 2019-10-31 16:21:32 -04:00
Jay R. Newlin (PromptWorks)
fbe0963071 First export of test steps from Ghost Inspector 2019-10-31 16:04:29 -04:00
richard-dds
e3c9105270 Fix some LGTM errors 2019-10-31 13:46:04 -04:00
tomdds
52de1471e0
Merge pull request #1144 from dod-ccpo/azure-integration
Azure Integration
2019-10-31 13:07:11 -04:00
leigh-mil
f3dcca8368 use 'text=' in the SaveButton kwargs and add in a default for the save button text 2019-10-31 10:48:26 -04:00
tomdds
d0746a3bf6 Cleanup imports and formatting in azure testing code 2019-10-30 16:43:59 -04:00
tomdds
3e7a720ffb Post-rebase fixes 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
tomdds
1a92cd35d1 Extract service principal resolution to private method
Also made root creds a property
2019-10-30 16:43:59 -04:00
tomdds
41633417d8 Add Azure Libraries 2019-10-30 16:43:59 -04:00
dandds
06dc193c28 WIP: can add new app/SP 2019-10-30 16:43:59 -04:00
tomdds
608f988b71 First pass at process of adding admin to azure 2019-10-30 16:43:59 -04:00
tomdds
15ff4a01f1 Add Azure Graph API 2019-10-30 16:43:59 -04:00
tomdds
5cd20c650a Draft of Azure create_environment 2019-10-30 16:43:59 -04:00
dandds
06239c94ba
Merge pull request #1145 from dod-ccpo/bugfix/disallow-resent-invite-with-invalid-date
Allow submit buttons to be valid on initial render
2019-10-30 16:15:13 -04:00
dandds
b5a2e6e929
Merge pull request #1141 from dod-ccpo/consolidate-ci
Consolidate CI
2019-10-30 16:06:46 -04:00
dandds
b7c5b5ef7f
Merge pull request #1150 from dod-ccpo/remove-dispatch-environment-baseline
Remove the Celery schedule for the environment baseline task.
2019-10-30 16:05:55 -04:00
richard-dds
6910916cd8
Merge pull request #1148 from dod-ccpo/remove-aws-uploader
Remove AwsUploader
2019-10-30 15:48:09 -04:00
leigh-mil
48a90b5177
Merge pull request #1152 from dod-ccpo/env-processing-label-bugfix
Remove baseline_info column from environments table
2019-10-30 15:47:58 -04:00
leigh-mil
e64900245d Remove baseline_info column from environments table 2019-10-30 14:46:33 -04:00
richard-dds
f4e72e7173
Merge pull request #1151 from dod-ccpo/fix-suspend-migration
Fix "disabled environment role status" migration
2019-10-30 14:46:10 -04:00
richard-dds
308bad2fc8 Fix "disabled environment role status" migration 2019-10-30 14:31:27 -04:00
dandds
969293f5b2 Remove the Celery schedule for the environment baseline task. 2019-10-30 13:03:11 -04:00