2
0
mirror of https://github.com/VinylDNS/vinyldns synced 2025-08-31 06:15:49 +00:00
Commit Graph

236 Commits

Author SHA1 Message Date
Michael Ly
807f6760d9 [DeleteRecord] Remove multi-record config (#836)
* Remove multi-record enabled flag and enable DeleteRecord in JSON protocol.
* Update unit and functional tests
2019-09-24 16:51:18 -04:00
Michael Ly
8dd07df858 [DeleteRecord] Refactor batch change converter (#834)
* Refactor BatchChangeConverter to use ChangeForValidationMap.
* Update unit tests.
2019-09-20 14:56:06 -04:00
Michael Ly
1bc054440c [DeleteRecord] Delete record validations (#833)
* Update batch change validations to include DeleteRecord.
* Add/update unit tests.
2019-09-18 19:27:32 -04:00
Paul Cleary
730c6f8897 Par func tests (#838)
Major overhaul of func tests to allow them to run in parallel.  Major changes include:

1. Consolidate all separate test fixtures into a single test fixture in the `shared_zone_test_context`
1. Add `xdist` to allow running tests in parallel
1. Add hooks in main `conftest.py` to setup the test fixture before workers run, and tear it down when workers are finished
1. After fixture is setup, save state in a local `tmp.out` so the workers will use that state instead of trying to recreate the fixture.
1. Add a `utils.generate_record_name` which generates a unique record name in order to avoid conflicts when running tests in parallel
1. Add a `pytest.mark.serial` for func tests that just cannot be run in serial
1. Tests are now run in two phases, first we run in parallel, and if that is successful, we run the serial tests
1. Add a `--teardown` flag, this allows us to reuse the test fixture between the two phases parallel and serial
2019-09-18 15:02:25 -04:00
Britney Wright
093d27ad21 save new batch change errors on approval attempt (#823) 2019-09-12 10:18:31 -04:00
Paul Cleary
1358eb0022 Set the maxItems to 1000 like list groups (#831)
Following the same pattern we did for list groups, where we just set the default page size to 1000 when listing members.

- `service.groups.js` - modified the call to `getGroupMembers` to hard code the page size to 1000
- `service.groups.spec.js` - fixed unit tests
- `TestDataLoader` - added a sample group for dummy users that has all dummy users (200 of them) for simple testing.
2019-09-06 16:46:06 -04:00
Paul Cleary
7e2aab4de6 Global ACLs (#830)
Changes in this pull request:
- `GlobalACLs` - captures logic around testing a user's `AuthPrincipal` for access to a zone
- `AccessValidations` - modified the `getAccessLevel` to consult the `GlobalACLs` for a user to determine if the user has access.  `AccessValidations` now also takes `GlobalACLs`
- `VinylDNSConfig` - load the `GlobalACLs` from the config file
- `Boot` - load two separate `AccessValidations`.  One is used exclusively for batch changes that _will_ consult the configured global acls.  The other one used by the normal record set interface will not consult the global acls.  This is a TODO for cleanup
2019-09-06 10:44:20 -04:00
Rebecca Star
59dfb2583f create access package (#828)
* create access package
2019-09-04 13:02:55 -04:00
Rebecca Star
8e585644a9 Refactor cvm (#826)
* Refactor ChangeForValidationMap.

* Refactor service.

* Refactor unit tests.

* clean up validation changes
2019-09-03 12:05:21 -04:00
Britney Wright
e3e3a476a6 update ManualReviewRequiresOwnerGroup (#822) 2019-08-27 12:20:59 -04:00
Britney Wright
86b4f68856 relax list group ignoreAccess assertions (#815) 2019-08-22 09:12:22 -04:00
Michael Ly
ed1f2c7e6f JSON deserialization and protobuf changes for remove single DNS record entry (#795)
* Support DeleteRecord in API
2019-08-21 15:32:23 -04:00
Britney Wright
d0d88dc0ea Open list groups access (#809) 2019-08-21 14:26:51 -04:00
Britney Wright
e7820e6005 update send to manual review logic (#811) 2019-08-21 14:25:50 -04:00
Rebecca Star
7bdeb39a02 clean up after ourselves in the manual review tests (#810) 2019-08-20 23:19:41 -04:00
Michael Ly
e3f8dfadec Flag batch changes requiring manual review by zone name (#807)
* Implement zone name needs review.
* Add unit tests.
* Update func tests.
* Update conf files and docs.
2019-08-20 16:05:55 -04:00
Rebecca Star
70c0737300 lock down approve/reject for test support user (#802)
* lock down approve/reject for test support user
2019-08-19 12:27:51 -04:00
Rebecca Star
53ffabdd32 Allow configuration of ipv6 zone discovery search range (#798)
* configure v6 range

* fix and test

* with pureconfig and assertions
2019-08-13 11:08:30 -04:00
Britney Wright
d1968bd170 API: cancel batch change that is pending review (#794) 2019-08-12 10:43:13 -04:00
Rebecca Star
a5e0336499 rename SingleDeleteChange to SingleDeleteRRSetChange (#786)
* rename SingleDeleteChange to SingleDeleteRRSetChange in preparation for SingleDeleteRecordChange
2019-08-09 14:38:11 -04:00
Paul James Cleary
9cc985b22d Formatting 2019-08-07 20:32:15 -04:00
Britney Wright
cf7f27a59a flag func test (#788) 2019-08-07 13:07:15 -04:00
Michael Ly
9014570a37 Implement domains requiring manual review (via batch change interface) (#779)
* Implement domains requiring review.
* Update configs.
* Update tests.
2019-08-07 10:33:18 -04:00
Paul Cleary
e0456491fb Updating play to 2.7 (#783)
* Upgrade to Play 2.7
* Upgrade to akka-http 10.1.9
* Upgrade to akk 2.5.23
2019-08-07 09:13:05 -04:00
Britney Wright
1fbcdfd35a validate scheduled time is in the future (#784) 2019-08-07 08:26:15 -04:00
Britney Wright
ad6d818252 allow underscores in batch change requests (#782) 2019-08-06 16:28:58 -04:00
Britney Wright
4e2b76cccf correctly get batchChangeSummary totalChanges (#780) 2019-08-05 17:09:11 -04:00
Britney Wright
7fdff0b73e Update batch change serializers (#773) 2019-07-31 09:48:56 -04:00
Rebecca Star
eefa2a3392 remove unused BatchChangeInfoSerializer (#776)
* remove unused BatchChangeInfoSerializer

* with extra validation
2019-07-30 14:11:12 -04:00
Michael Ly
a72c7faf0a Require owner group ID for soft errors (#775)
* Require owner group ID for soft errors.
* Update tests.
2019-07-30 12:45:53 -04:00
Paul Cleary
48d6ebe01d Sched approval (#774)
Add check to make sure that a scheduled change is not past due when approving.

* `BatchChangeErrors` - added `ScheduledChangeNotDue` error type that will be raised in the event someone approves a batch change (i.e. processes) a scheduled change too soon.
* `BatchChangeValidations` - added a `validateScheduledApproval` function that raises the `ScheduledChangeNotDue` if the scheduled date is not past due
* `BatchChangeRouting` - added `ScheduledChangeNotDue` to `handleErrors` to return a `Forbidden`
2019-07-30 11:30:40 -04:00
Britney Wright
b143eeaa44 expand batch change statuses (#768) 2019-07-30 10:13:52 -04:00
Paul Cleary
bc6519dbcf Advance scheduled change to PendingApproval (#771)
When a scheduled change is submitted, if there are no hard errors advance to PendingApproval status.

* `BatchChange` - changed the calculation of the batch change status; if it is pending approval and the scheduled time is set it will be `Scheduled`
* `MySqlBatchChangeRepository` - updated the de-serialize to consider scheduled time so when "getting" a batch change, the status returned will appropriately be `Scheduled`
* `BatchChangeService` - updated the `buildResponse` method to consider scheduled time.  If no fatal errors, manual review enabled, and scheduled then goto PendingApproval
2019-07-29 19:18:12 -04:00
Rebecca Star
eb51f56449 Zone discovery soft failure and tests (#767)
* zone discovery soft failure and tests
2019-07-26 15:16:40 -04:00
Dave Cleaver
e51261ba2c Add SNS Notifier (#760)
Changes in this pull request:
- Notify SNS topic on batch completion
2019-07-26 11:42:12 -04:00
Paul Cleary
07dfbe091d Add scheduled change feature flag and check (#761)
Add a scheduled change feature flag.  If a user submits a batch change that is scheduled, and the feature flag is disabled, then raise an error.

* `BatchChangeValidations` - added a class member variable that holds the feature flag.  Added a function `validateScheduledChange` that has the business rule if the feature flag is disabled and scheduled time is set then raise an error
* `Boot` - pass the config value into the `BatchChangeValidations` constructor
* `BatchChangeRoute` - added error handler for `ScheduleChangeDisabled` error
* `VinylDNSConfig` - add a feature flag
* `api/reference.conf` - ensure that the scheduled batch change enabled flag is set to `false` by default (it is off)
2019-07-26 10:46:36 -04:00
Britney Wright
1d1bca230c add approval fields to batch responses (#752) 2019-07-25 11:46:36 -04:00
Rebecca Star
e5b078ab31 the rest of the approval flow (#757)
* full approval flow

* with testing
2019-07-25 10:54:08 -04:00
Michael Ly
2448a6bfac Increase timefactor. (#763) 2019-07-24 11:55:31 -04:00
Rebecca Star
246aae2f9b remove the val in the batch route test (#762) 2019-07-24 11:43:15 -04:00
Rebecca Star
56c6605902 fix a test that travis hates (#759)
* use built in EitherValues
2019-07-23 15:45:07 -04:00
Michael Ly
566ae1f3da Properly reject requests sent to non-existent routes (#739)
* Refactor routing
2019-07-23 12:19:39 -04:00
Paul Cleary
a520bcca4d Adding scheduled time to all the things (#756)
Add scheduled time field to prepare for scheduled batch changes.

* `create_batch_change_test.py` - add a test that ensures posting and retrieving using the scheduled time field works as expected
* `BatchChangeProtocol.scala` - add scheduledTime field to `BatchChangeInput`
* `BatchChangeService.scala` - modify the `buildResonse` method, it does some logic to produce the resulting `BatchChange` entity, and we need to ensure that the `scheduledTime` field propagates through that logic
* `BatchChangeJsonProtocol.scala` - make sure that `BatchChangeInputSerializer` takes in `scheduledTime`, make sure that `BatchChangeSerializer` converts `scheduledTime` to json
* `BatchChange.scala` - add `scheduledTime` field
* `BatchChangeSummary.scala` - add `scheduledTime` field
* `V3.18__ScheduledChange.sql` - add a `scheduled_time` field to the `batch_change` table; add an index on `scheduled_time` as well to support querying by scheduled time
* `MySqlBatchChangeRepository` - make sure that save and get methods support `scheduledTime`
2019-07-22 17:17:09 -04:00
Michael Ly
85af4f25eb Batch change rejection email notifications (#751)
* Send batch change rejection notifications.
* Update e-mail format.
* Update tests.
2019-07-22 15:24:31 -04:00
Britney Wright
444d15678e add flag to opt out of batch review process (#736) 2019-07-22 12:21:10 -04:00
Rebecca Star
000139ff8f Approval up front checks (#755)
* up front approval conversions

* with tests

* fix approval func tests

* address comments
2019-07-22 10:07:00 -04:00
Rebecca Star
c2c103add3 add getAuthById to auth principal (#754)
* add getAuthById to auth principal
2019-07-19 10:50:37 -04:00
Britney Wright
5efae16b50 batch change review tweaks (#750) 2019-07-19 10:19:11 -04:00
Rebecca Star
6cefbc9027 Store errors on single changes (#745)
* update protobuf

* test
2019-07-17 12:23:22 -04:00
Britney Wright
fc757d1940 allow updates to dotted CNAME records (#742) 2019-07-16 14:37:54 -04:00