6374 Commits

Author SHA1 Message Date
leigh-mil
0abe27eb36 Remove form mixin from toggler component 2019-11-15 17:36:57 -05:00
leigh-mil
3e57579990 Use BaseForm instead of specialized Vue component for step 1 of the application form
Remove unnecessary event listener
2019-11-15 17:35:11 -05:00
leigh-mil
d1e1a2a36a Update TO form and nested components to emit directly to parent components instead of emitting from the root component 2019-11-15 17:35:11 -05:00
leigh-mil
f40ce3d1aa
Merge pull request #1189 from dod-ccpo/remove-edit-link-for-viewonly
Remove edit links and menus for users with view only access
2019-11-18 09:40:33 -05:00
leigh-mil
f76af8f646 Remove edit links and menus for users with view only access 2019-11-15 15:48:09 -05:00
leigh-mil
1eaa14d603
Merge pull request #1179 from dod-ccpo/vue-emitters-fix
Vue emitters fix - TO form
2019-11-15 14:57:30 -05:00
leigh-mil
5c3643a18b
Merge pull request #1186 from dod-ccpo/fix-revoke-env-access-bug
Fix revoke env role bug
2019-11-15 14:48:03 -05:00
Jay R. Newlin (PromptWorks)
c226dd13a1
Merge pull request #1187 from dod-ccpo/ghost-update-20191115
Modifications to Ghost Inspector tests for the week ended 11-15-19
2019-11-15 11:41:34 -05:00
leigh-mil
a4f21dc7e6 Prevent error from being raised when user is not trying to update a
disabled env role

We were only checking to see if a role was disabled or deleted before
raising an error, so I added in a check to see if the user was trying to
update the env role before raising an error. The error should only be
raised if the role is disabled or deleted AND the user is trying to
assign a new role to the env role.

I also added in a disabled property to the EnvironmentRole model to make
things more readable.
2019-11-15 09:51:02 -05:00
Jay R. Newlin (PromptWorks)
889a0090aa Modifications to Ghost Inspector tests for the current week 2019-11-14 18:05:14 -05:00
leigh-mil
c94570f83e Update TO form and nested components to emit directly to parent components instead of emitting from the root component 2019-11-14 16:46:35 -05:00
dandds
b034d668a1
Merge pull request #1185 from dod-ccpo/celery-queues
Supply named default queue for Celery.
2019-11-14 16:12:07 -05:00
dandds
a0e2332b05
Merge pull request #1184 from dod-ccpo/fix-crl-test-bug
Fix bug in static CRL test.
2019-11-14 16:11:29 -05:00
dandds
88171aaee7 Supply named default queue for Celery.
Supplying this will prevent queue clashes between various ATAT sites
sharing the same Redis instance.

Note that the Celery documentation is currently wrong about the name for
configuring this:

https://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-task_default_queue

It specifies `CELERY_TASK_DEFAULT_QUEUE`, but
`CELERY_DEFAULT_QUEUE` is the value that Celery currently looks for.
This appears to be fixed in on an upcoming release:

https://github.com/celery/celery/issues/5575

This is worth keeping an eye on, since the configuration key could
change in the future.
2019-11-14 15:48:14 -05:00
dandds
3ddfc5c179 Fix bug in static CRL test.
A CRL test that relies on fixtures files was not getting a working copy
of the relevant CRL list it needed. This also adds a setup function to
the relevant test module so that we can clear and rebuild the CRL
location cache for the fixtures.
2019-11-14 14:12:07 -05:00
dandds
bf1badeff0
Merge pull request #1182 from dod-ccpo/lets-encrypt-manually
Configure K8s deployment for easy LetsEncrypt verification.
2019-11-14 12:46:25 -05:00
dandds
a813ffa07a
Merge pull request #1178 from dod-ccpo/staging-ci
Add CircleCI config for staging deployment.
2019-11-14 12:42:00 -05:00
dandds
79eb691907 Configure K8s deployment for easy LetsEncrypt verification.
This is not the certificate setup we will use in production. I'd like to
merge this configuration as a reference point because this is the
easiest way to handle manual LetsEncrypt verification within the
cluster.

This allows NGINX to serve static files over HTTP from the
".well-known/acme-challenge" directory, which is necessary for certbot
validation of domain ownership.
2019-11-14 09:51:35 -05:00
dandds
9c086e2f85
Merge pull request #1177 from dod-ccpo/crls-again
Maintain static list of CRL URIs and issuers.
2019-11-14 05:45:51 -05:00
leigh-mil
92ce3420b6
Merge pull request #1146 from dod-ccpo/app-members-perms-form
Add revoke access to app members perms/env roles form
2019-11-13 11:12:16 -05:00
richard-dds
f0101f1230
Merge pull request #1171 from dod-ccpo/remove-unused-config
Remove unused config
2019-11-13 10:09:17 -05:00
dandds
387f957aa4 Add CircleCI config for staging deployment.
This generalizes the deploy step into a configurable CircleCI command.
The available parameters are:

- `namespace`: the K8s namespace to alter
- `tag`: the docker tag to apply to the image

The script for applying migrations to the K8s environment and the
corresponding K8s Job config have been generalized so that they can be
configured to run in the specified namespace.

The main workflow has been updated so that the appropriate deployment
will happen, depending on whether we are merging to staging or master.
In the future, we could look to add an additional workflow based around
Git tags for production.

Note that this also removes the creation of the `latest` tag from CD.
That tag is no longer hard-coded into our K8s config and so there's no
longer a need to update it in our container registry.
2019-11-13 09:56:36 -05:00
leigh-mil
06a36f23bc Raise error when a user attempts to update a disabled env role 2019-11-12 17:02:57 -05:00
leigh-mil
e8f21acf5b PR fixes 2019-11-12 16:59:22 -05:00
richard-dds
6a1e1b8de8 Remove STORAGE_PROVIDER from test config 2019-11-12 16:57:46 -05:00
richard-dds
4a66bf4d29 Remove prod.ini, becase it's useless 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
b653546768 Styling 2019-11-12 16:56:55 -05:00
leigh-mil
d33fcb6073 Fix issues with deleting roles:
1. Prevents roles from being created with the role 'None'
2. Only call EnvironmentRoles.delete() if the env_role exists
3. Update the filter on the role field of the app member form to return
'No Access'. This fixed an issue where if a role was deleted, then other
env roles belonging to the app member could not be updated because the
role field of the deleted env_role was invalid
2019-11-12 16:54:46 -05:00
leigh-mil
f928b776a6 Properly set deleted data for UpdateMemberForm and display suspended env access text
Styling for env name and role in update app member perms form
2019-11-12 16:54:46 -05:00
leigh-mil
d40c11a8f6 Change how env_roles are updated
This change makes it so that when an env_role is updated to be None, the
role property on the env_role is changed to be None in addition to being
marked as deleted. This also adds in a check so that previously deleted
env_roles cannot be reassigned a role.
2019-11-12 16:54:46 -05:00
leigh-mil
3a1a996469 Create macro for environment role field and update route so the correct data is passed to Environments.update_env_role to update or delete roles 2019-11-12 16:54:46 -05:00
leigh-mil
d324ec57ec Add field for deleted in the app members environment form 2019-11-12 16:54:46 -05:00
leigh-mil
54f3c2f8ba Update text and icon in modal
Update env_role status when it is deleted
2019-11-12 16:54:46 -05:00
leigh-mil
eb617ef68a
Merge pull request #1161 from dod-ccpo/app-members-edit-menu
App members edit menu
2019-11-12 16:46:44 -05:00
graham-dds
948976bb78
Merge pull request #1176 from dod-ccpo/bugfix/date-validation
Tweak date validation logic for months and days
2019-11-12 16:09:00 -05:00
leigh-mil
4218359bac
Merge pull request #1162 from dod-ccpo/env-name-bugfix
Env name bugfix
2019-11-12 15:24:53 -05:00
leigh-mil
9037c44498 Move filter out of class definition and change name of form field 2019-11-12 13:07:50 -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
leigh-mil
045e06abee When validating that envs have names, make sure that names containing only strings are not valid 2019-11-12 13:07:50 -05:00
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
leigh-mil
cfd73fec78 Use translations file 2019-11-12 12:01:33 -05:00
leigh-mil
aa7dbc2699 Remove unused styles 2019-11-12 11:44:38 -05:00
leigh-mil
98298db5f2 Add toggle drop down menu for app member edit 2019-11-12 11:44:38 -05:00
dandds
1b6239893b Maintain static list of CRL URIs and issuers.
The previous solution (ad-hoc stream-parsing the CRLs to obtain their
issuers and nextUpdate) was too cute. It began breaking on CRLs that had
an addition hex 0x30 byte somewhere in their header. I thought that 0x30
was a reserved character only to be used for tags in ASN1 encoded with
DER; turns out that's not true. Rather than write a full-fledged ASN1
stream-parser, the simplest solution is to just maintain the list of
issuers as a constant in the codebase. This is fine because the issuer
for a specific CRL URI should not change. If it does, we've probably got
bigger problems.

This also removes the Flask app's functionality for updating the local
CRL cache. This is being handled out-of-band by a Kubernetes CronJob
and is not a concern of the app's. This means that instances of the
CRLCache do not have to explicitly track expirations for CRLs.
Previously, the in-memory dictionary or CRL issuers and locations
included expirations; now it is flattened to not include that
information.

The CRLCache class has been updated to accept a crl_list kwargs so that
unit tests can provide their own alternative CRL lists, since we now
hard-code the expected CRLs and issuers. The nightly CRL check job has
been updated to check that the hard-coded list of issuers matches what
we get when we actually sync the CRLs.
2019-11-12 05:43:11 -05:00
graham-dds
637a366baf
Merge pull request #1175 from dod-ccpo/bugfix/standardize-ordering
Standardize member and env name ordering
2019-11-11 16:08:23 -05:00
dandds
42e682e63f
Merge pull request #1169 from dod-ccpo/generalize-k8s
Use kustomize and envsubst to generalize k8s config.
2019-11-11 13:14:25 -05:00
Jay R. Newlin (PromptWorks)
608e3436ee
Merge pull request #1174 from dod-ccpo/gi-update-20191108
Ghost Inspector update 20191108
2019-11-11 11:19:03 -05:00
graham-dds
d73af9b919 Change description text to match default envs 2019-11-11 11:04:04 -05:00
graham-dds
a8d5201cc6 Standardize member and env name ordering 2019-11-08 15:06:25 -05:00