351 Commits

Author SHA1 Message Date
dandds
4d7af9a4d0 Fix portfolio user names in seed_sample.py script.
`script/seed_sample.py` was creating portfolio users with no names
because it was calling `Users.get_or_create_by_dod_id` with a DOD ID as
its only argument. This updates it to pass the rest of the profile
information for the sample user.
2019-08-14 14:43:35 -04:00
richard-dds
36d39dc949 Use unique attachment object names 2019-08-14 10:39:58 -04:00
richard-dds
ac7de6b4d2 Formatting 2019-08-13 13:49:49 -04:00
richard-dds
034645d013 Fix seed script 2019-08-13 10:51:44 -04:00
dandds
529a7b71c9
Merge pull request #1016 from dod-ccpo/detect-secrets
Scripts for finding accidental secrets in the repo.
2019-08-13 10:16:13 -04:00
dandds
2a0168b1e6 Scripts for finding accidental secrets in the repo.
This adds the following:
- A detect-secrets dependency and a related script
  (`script/detect_secrets`) to find and alert developers to secrets
  added to the code. By default, the script will search staged and new,
  unstaged files. It can optionally search only staged files.
- A whitelist, `.secrets.baseline`, that tracks instances of secrets or
  false positives already in the repo.
- Modifies `script/test` to detect secrets as part of the test suite.
- Updates to the README regarding the use of detect-secrets.
2019-08-13 05:59:56 -04:00
dandds
d5706454e3 Fix newline issues in script/write_dotenv.
In `sh` on Alpine Linux in our Docker images, the newline characters in
the script were being interpreted as literals. This substitutes a
HEREDOC instead.
2019-08-09 14:55:18 -04:00
dandds
485f578c78 Apply config changes for CSP file uploads.
This applies configuration changes for the Flask app and adds changes to
the Dockerfile so that the build can make a CSP-specific JS bundle. It
adds `write_dotenv` script that creates the appropriate `.env` file for
the `parcel` bundler depending on how the `CSP` environment variable is
set.

- Configure K8s environment variables for Flask CSP usage
- Supply default CSP config setting to Flask app
- Declare the CSP arg in the Dockerfile
- Supply extra Docker build args to CD
- Fix top-level reference to boto3 in file_upload module
- Add back missing sample NGINX config for docker-compose build
2019-08-09 08:05:20 -04:00
dandds
d79127f652 Update the k8s config directory in the migration script. 2019-08-08 12:02:02 -04:00
dandds
44141c002d Fix up sync-crls script and add to Dockerfile.
- Fix some python formatting and import issues
- Fix dockerfile to include sync-crls script
- Adjust sync-crls script to use paths and CLI tools available in the
  Docker container
2019-08-06 11:31:19 -04:00
dandds
b1cf89051a Add kubernetes config and scripts for syncing CRLs.
This adds a previous version of the CRL sync functionality back to the
repo, with some small adjustments. We now grab the CRLs directly from
their DISA URLs.

The CRL sync is handled by a kubernetes cronjob that sync the files to a
persistent volume that is mounted into each Flask app container.
2019-08-06 11:05:18 -04:00
dandds
f3e032fc03 Finalize CD config and add k8s job for migrations.
Add CircleCI config for both CSPs to:
- build the Docker image and push it to the registry
- run a short-lived k8s job to apply migrations and see data
- update the images for the Flask pods and rq worker pods
2019-07-31 11:58:43 -04:00
dandds
beabd2ce72 Remove the scriptz submodule and hard-commit the files.
The submodule is a leftover from when this project was intended to work
as a series of microservices. It was meant to provide common
functionality to the builds for every microservice. That's no longer the
case, and the submodule is a pain-point both in on-boarding new
developers and running the Docker build.
2019-07-14 16:01:13 -04:00
George Drummond
9f274a7d1c
Script to find unused translations 2019-06-14 09:59:07 -04:00
George Drummond
32022b054c
Merge pull request #895 from dod-ccpo/seeds-changes
More realistic seeds
2019-06-12 15:43:34 -04:00
George Drummond
c719999cdb
Attach PDFs to task orders 2019-06-12 15:02:57 -04:00
dandds
bea2e02253 Remove unused EDA client code 2019-06-12 13:42:55 -04:00
George Drummond
9edf816765
More realistic seeds 2019-06-12 11:41:40 -04:00
richard-dds
ee46fb2320 Formatting 2019-06-10 15:34:01 -04:00
richard-dds
40b599d1d0 Fix rebase conflicts 2019-06-10 15:33:30 -04:00
richard-dds
7f4f857424 Sort task orders by status and time_created 2019-06-10 15:16:02 -04:00
richard-dds
e84e61bbad Update seed script with TOs of various statuses 2019-06-10 15:15:39 -04:00
George Drummond
f7562714cb
Add New Portfolio Workflow 2019-06-04 13:10:42 -04:00
dandds
5434443b02 Adjust script/seed_sample.py for new portfolio invitation flow. 2019-06-03 15:57:49 -04:00
leigh-mil
1784318e0e Update seed_sample with new TO info 2019-05-31 13:07:03 -04:00
dandds
df06d1b62f Use application_role_id on environment_roles.
In the future, an `application_invitation1 will not refer to a `user` until
someone accepts the invitation; they'll only reference an
`application_role`. When a user is invited to an application, the
inviter can specify the environments the invitee should have access to.
For this to be possible, an `environment_role` should reference an
`application_role`, because no `user` entity will be known at that time.

In addition to updating all the models and domain methods necessary for
this change, this commit deletes unused code and tests that were
dependent on `environment_roles` having a `user_id` foreign key.
2019-05-31 11:21:20 -04:00
George Drummond
1b217113d4
Keep alembic_version table 2019-05-29 11:40:23 -04:00
George Drummond
0a8868ca37
Just clean out tables for seed sample reset 2019-05-28 13:31:55 -04:00
leigh-mil
9412ccffea Reorder items to delete so that join models are deleted before the models they join
Add application invitations to list of items to be deleted
Clean up reference to workspace
2019-05-22 19:41:30 -04:00
George Drummond
334f3d8ed3
Move js to form component 2019-05-03 14:48:27 -04:00
George Drummond
0996f254cb
Use prettier rather than sass-convert 2019-05-03 14:01:08 -04:00
George Drummond
f3a6bf9c47
Use list-different option for js prettier 2019-05-02 13:41:01 -04:00
George Drummond
3acbecdf1a
Add in scss formatter 2019-05-01 12:43:56 -04:00
George Drummond
45be1e5100
Fix remove_sample_data.py script 2019-04-17 16:05:33 -04:00
dandds
9084dce762 build out seed sample script
- semi-random data for applications and environments
- added users to applications and environments
- updated CSPRole enum with current CSP roles
2019-04-11 15:38:27 -04:00
George Drummond
e556ded6dd
Fix script to reflect changes in ApplicationRoles.create 2019-04-11 14:17:28 -04:00
George Drummond
50a532ddbb
ApplicationRoles seed and domain 2019-04-11 10:03:21 -04:00
dandds
0ac8c9632b add application permission sets 2019-04-08 13:31:19 -04:00
dandds
92e13dbf1b update seed_sample script to give default perms to portfolio users 2019-04-08 06:25:44 -04:00
dandds
3f5b2abcd5 add uwsgi logfile plugin for additional loggers 2019-04-02 16:38:34 -04:00
dandds
4a0dd2d432 remove unused domain methods and arguments 2019-03-22 06:31:20 -04:00
dandds
c4b4cc0912 update atat-wide permission sets 2019-03-21 05:38:28 -04:00
dandds
3af849c035 disable debug output in seed_roles.py 2019-03-19 10:26:23 -04:00
dandds
d3c3209fc0 cleanup unused portfolio roles 2019-03-15 07:14:49 -04:00
dandds
1a122c5335 rename role -> permission_set everywhere 2019-03-15 07:14:49 -04:00
dandds
798eb7e1b0 first cut of portfolio permission sets 2019-03-15 07:14:49 -04:00
leigh-mil
c2e20c8757 Remove unnecessary get_users call 2019-03-06 16:30:37 -05:00
leigh-mil
4b45233fd4 Removed unused function and associated array of data 2019-03-06 16:29:47 -05:00
leigh-mil
da4edc3343 Create all users before creating portfolios 2019-03-06 15:41:35 -05:00
dandds
12776c7124
Merge pull request #689 from dod-ccpo/get-crl-expiry
script for checking expiration dates of CRLs
2019-03-06 09:24:08 -05:00