mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 09:45:23 +02:00
Merge branch 'main' into rb/kristinayin
This commit is contained in:
commit
38e8337900
32 changed files with 1864 additions and 495 deletions
|
@ -6,6 +6,7 @@ name = "pypi"
|
|||
[packages]
|
||||
django = "*"
|
||||
cfenv = "*"
|
||||
django-cors-headers = "*"
|
||||
pycryptodomex = "*"
|
||||
django-allow-cidr = "*"
|
||||
django-auditlog = "*"
|
||||
|
|
508
src/Pipfile.lock
generated
508
src/Pipfile.lock
generated
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "423c746438717fb7d281dfac02d3950e6e5033c6190f4adf0c63ccdf9433fae5"
|
||||
"sha256": "a0ea45d8f77132e22b8c3437e90903240af1bb29f9994f6ce4ce1e5b8d06b6ed"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {},
|
||||
|
@ -32,29 +32,29 @@
|
|||
},
|
||||
"boto3": {
|
||||
"hashes": [
|
||||
"sha256:38658585791f47cca3fc6aad03838de0136778b533e8c71c6a9590aedc60fbde",
|
||||
"sha256:a8228522c7db33694c0746dec8b48c05473671626359dd62ab6829eb7871eddc"
|
||||
"sha256:02ce7dcad2d3b054cd99e7ca6df7a708e016a31b1c98b46d8df3b3891070c121",
|
||||
"sha256:b8acb57a124434284d6ab69c61d32d70e84e13e2c27c33b4ad3c32f15ad407d3"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.28.66"
|
||||
"version": "==1.28.79"
|
||||
},
|
||||
"botocore": {
|
||||
"hashes": [
|
||||
"sha256:70e94a5f9bd46b26b63a41fb441ad35f2ae8862ad9d90765b6fa31ccc02c0a19",
|
||||
"sha256:8d161a97a25eb381721b4b7251d5126ef4ec57e452114250b3e51ba5e4ff45a4"
|
||||
"sha256:07ecb93833475dde68e5c0e02a7ccf8ca22caf68cdc892651c300529894133e1",
|
||||
"sha256:6f1fc49e9e12f9772b4fef577837670bc84d772a7c946b4d08fe2890e34a4305"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.31.66"
|
||||
"version": "==1.31.79"
|
||||
},
|
||||
"cachetools": {
|
||||
"hashes": [
|
||||
"sha256:95ef631eeaea14ba2e36f06437f36463aac3a096799e876ee55e5cdccb102590",
|
||||
"sha256:dce83f2d9b4e1f732a8cd44af8e8fab2dbe46201467fc98b3ef8f269092bf62b"
|
||||
"sha256:086ee420196f7b2ab9ca2db2520aca326318b68fe5ba8bc4d49cca91add450f2",
|
||||
"sha256:861f35a13a451f94e301ce2bec7cac63e881232ccce7ed67fab9b5df4d3beaa1"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==5.3.1"
|
||||
"version": "==5.3.2"
|
||||
},
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
|
@ -132,128 +132,128 @@
|
|||
},
|
||||
"charset-normalizer": {
|
||||
"hashes": [
|
||||
"sha256:02673e456dc5ab13659f85196c534dc596d4ef260e4d86e856c3b2773ce09843",
|
||||
"sha256:02af06682e3590ab952599fbadac535ede5d60d78848e555aa58d0c0abbde786",
|
||||
"sha256:03680bb39035fbcffe828eae9c3f8afc0428c91d38e7d61aa992ef7a59fb120e",
|
||||
"sha256:0570d21da019941634a531444364f2482e8db0b3425fcd5ac0c36565a64142c8",
|
||||
"sha256:09c77f964f351a7369cc343911e0df63e762e42bac24cd7d18525961c81754f4",
|
||||
"sha256:0d3d5b7db9ed8a2b11a774db2bbea7ba1884430a205dbd54a32d61d7c2a190fa",
|
||||
"sha256:1063da2c85b95f2d1a430f1c33b55c9c17ffaf5e612e10aeaad641c55a9e2b9d",
|
||||
"sha256:12ebea541c44fdc88ccb794a13fe861cc5e35d64ed689513a5c03d05b53b7c82",
|
||||
"sha256:153e7b6e724761741e0974fc4dcd406d35ba70b92bfe3fedcb497226c93b9da7",
|
||||
"sha256:15b26ddf78d57f1d143bdf32e820fd8935d36abe8a25eb9ec0b5a71c82eb3895",
|
||||
"sha256:1872d01ac8c618a8da634e232f24793883d6e456a66593135aeafe3784b0848d",
|
||||
"sha256:187d18082694a29005ba2944c882344b6748d5be69e3a89bf3cc9d878e548d5a",
|
||||
"sha256:1b2919306936ac6efb3aed1fbf81039f7087ddadb3160882a57ee2ff74fd2382",
|
||||
"sha256:232ac332403e37e4a03d209a3f92ed9071f7d3dbda70e2a5e9cff1c4ba9f0678",
|
||||
"sha256:23e8565ab7ff33218530bc817922fae827420f143479b753104ab801145b1d5b",
|
||||
"sha256:24817cb02cbef7cd499f7c9a2735286b4782bd47a5b3516a0e84c50eab44b98e",
|
||||
"sha256:249c6470a2b60935bafd1d1d13cd613f8cd8388d53461c67397ee6a0f5dce741",
|
||||
"sha256:24a91a981f185721542a0b7c92e9054b7ab4fea0508a795846bc5b0abf8118d4",
|
||||
"sha256:2502dd2a736c879c0f0d3e2161e74d9907231e25d35794584b1ca5284e43f596",
|
||||
"sha256:250c9eb0f4600361dd80d46112213dff2286231d92d3e52af1e5a6083d10cad9",
|
||||
"sha256:278c296c6f96fa686d74eb449ea1697f3c03dc28b75f873b65b5201806346a69",
|
||||
"sha256:2935ffc78db9645cb2086c2f8f4cfd23d9b73cc0dc80334bc30aac6f03f68f8c",
|
||||
"sha256:2f4a0033ce9a76e391542c182f0d48d084855b5fcba5010f707c8e8c34663d77",
|
||||
"sha256:30a85aed0b864ac88309b7d94be09f6046c834ef60762a8833b660139cfbad13",
|
||||
"sha256:380c4bde80bce25c6e4f77b19386f5ec9db230df9f2f2ac1e5ad7af2caa70459",
|
||||
"sha256:3ae38d325b512f63f8da31f826e6cb6c367336f95e418137286ba362925c877e",
|
||||
"sha256:3b447982ad46348c02cb90d230b75ac34e9886273df3a93eec0539308a6296d7",
|
||||
"sha256:3debd1150027933210c2fc321527c2299118aa929c2f5a0a80ab6953e3bd1908",
|
||||
"sha256:4162918ef3098851fcd8a628bf9b6a98d10c380725df9e04caf5ca6dd48c847a",
|
||||
"sha256:468d2a840567b13a590e67dd276c570f8de00ed767ecc611994c301d0f8c014f",
|
||||
"sha256:4cc152c5dd831641e995764f9f0b6589519f6f5123258ccaca8c6d34572fefa8",
|
||||
"sha256:542da1178c1c6af8873e143910e2269add130a299c9106eef2594e15dae5e482",
|
||||
"sha256:557b21a44ceac6c6b9773bc65aa1b4cc3e248a5ad2f5b914b91579a32e22204d",
|
||||
"sha256:5707a746c6083a3a74b46b3a631d78d129edab06195a92a8ece755aac25a3f3d",
|
||||
"sha256:588245972aca710b5b68802c8cad9edaa98589b1b42ad2b53accd6910dad3545",
|
||||
"sha256:5adf257bd58c1b8632046bbe43ee38c04e1038e9d37de9c57a94d6bd6ce5da34",
|
||||
"sha256:619d1c96099be5823db34fe89e2582b336b5b074a7f47f819d6b3a57ff7bdb86",
|
||||
"sha256:63563193aec44bce707e0c5ca64ff69fa72ed7cf34ce6e11d5127555756fd2f6",
|
||||
"sha256:67b8cc9574bb518ec76dc8e705d4c39ae78bb96237cb533edac149352c1f39fe",
|
||||
"sha256:6a685067d05e46641d5d1623d7c7fdf15a357546cbb2f71b0ebde91b175ffc3e",
|
||||
"sha256:70f1d09c0d7748b73290b29219e854b3207aea922f839437870d8cc2168e31cc",
|
||||
"sha256:750b446b2ffce1739e8578576092179160f6d26bd5e23eb1789c4d64d5af7dc7",
|
||||
"sha256:7966951325782121e67c81299a031f4c115615e68046f79b85856b86ebffc4cd",
|
||||
"sha256:7b8b8bf1189b3ba9b8de5c8db4d541b406611a71a955bbbd7385bbc45fcb786c",
|
||||
"sha256:7f5d10bae5d78e4551b7be7a9b29643a95aded9d0f602aa2ba584f0388e7a557",
|
||||
"sha256:805dfea4ca10411a5296bcc75638017215a93ffb584c9e344731eef0dcfb026a",
|
||||
"sha256:81bf654678e575403736b85ba3a7867e31c2c30a69bc57fe88e3ace52fb17b89",
|
||||
"sha256:82eb849f085624f6a607538ee7b83a6d8126df6d2f7d3b319cb837b289123078",
|
||||
"sha256:85a32721ddde63c9df9ebb0d2045b9691d9750cb139c161c80e500d210f5e26e",
|
||||
"sha256:86d1f65ac145e2c9ed71d8ffb1905e9bba3a91ae29ba55b4c46ae6fc31d7c0d4",
|
||||
"sha256:86f63face3a527284f7bb8a9d4f78988e3c06823f7bea2bd6f0e0e9298ca0403",
|
||||
"sha256:8eaf82f0eccd1505cf39a45a6bd0a8cf1c70dcfc30dba338207a969d91b965c0",
|
||||
"sha256:93aa7eef6ee71c629b51ef873991d6911b906d7312c6e8e99790c0f33c576f89",
|
||||
"sha256:96c2b49eb6a72c0e4991d62406e365d87067ca14c1a729a870d22354e6f68115",
|
||||
"sha256:9cf3126b85822c4e53aa28c7ec9869b924d6fcfb76e77a45c44b83d91afd74f9",
|
||||
"sha256:9fe359b2e3a7729010060fbca442ca225280c16e923b37db0e955ac2a2b72a05",
|
||||
"sha256:a0ac5e7015a5920cfce654c06618ec40c33e12801711da6b4258af59a8eff00a",
|
||||
"sha256:a3f93dab657839dfa61025056606600a11d0b696d79386f974e459a3fbc568ec",
|
||||
"sha256:a4b71f4d1765639372a3b32d2638197f5cd5221b19531f9245fcc9ee62d38f56",
|
||||
"sha256:aae32c93e0f64469f74ccc730a7cb21c7610af3a775157e50bbd38f816536b38",
|
||||
"sha256:aaf7b34c5bc56b38c931a54f7952f1ff0ae77a2e82496583b247f7c969eb1479",
|
||||
"sha256:abecce40dfebbfa6abf8e324e1860092eeca6f7375c8c4e655a8afb61af58f2c",
|
||||
"sha256:abf0d9f45ea5fb95051c8bfe43cb40cda383772f7e5023a83cc481ca2604d74e",
|
||||
"sha256:ac71b2977fb90c35d41c9453116e283fac47bb9096ad917b8819ca8b943abecd",
|
||||
"sha256:ada214c6fa40f8d800e575de6b91a40d0548139e5dc457d2ebb61470abf50186",
|
||||
"sha256:b09719a17a2301178fac4470d54b1680b18a5048b481cb8890e1ef820cb80455",
|
||||
"sha256:b1121de0e9d6e6ca08289583d7491e7fcb18a439305b34a30b20d8215922d43c",
|
||||
"sha256:b3b2316b25644b23b54a6f6401074cebcecd1244c0b8e80111c9a3f1c8e83d65",
|
||||
"sha256:b3d9b48ee6e3967b7901c052b670c7dda6deb812c309439adaffdec55c6d7b78",
|
||||
"sha256:b5bcf60a228acae568e9911f410f9d9e0d43197d030ae5799e20dca8df588287",
|
||||
"sha256:b8f3307af845803fb0b060ab76cf6dd3a13adc15b6b451f54281d25911eb92df",
|
||||
"sha256:c2af80fb58f0f24b3f3adcb9148e6203fa67dd3f61c4af146ecad033024dde43",
|
||||
"sha256:c350354efb159b8767a6244c166f66e67506e06c8924ed74669b2c70bc8735b1",
|
||||
"sha256:c5a74c359b2d47d26cdbbc7845e9662d6b08a1e915eb015d044729e92e7050b7",
|
||||
"sha256:c71f16da1ed8949774ef79f4a0260d28b83b3a50c6576f8f4f0288d109777989",
|
||||
"sha256:d47ecf253780c90ee181d4d871cd655a789da937454045b17b5798da9393901a",
|
||||
"sha256:d7eff0f27edc5afa9e405f7165f85a6d782d308f3b6b9d96016c010597958e63",
|
||||
"sha256:d97d85fa63f315a8bdaba2af9a6a686e0eceab77b3089af45133252618e70884",
|
||||
"sha256:db756e48f9c5c607b5e33dd36b1d5872d0422e960145b08ab0ec7fd420e9d649",
|
||||
"sha256:dc45229747b67ffc441b3de2f3ae5e62877a282ea828a5bdb67883c4ee4a8810",
|
||||
"sha256:e0fc42822278451bc13a2e8626cf2218ba570f27856b536e00cfa53099724828",
|
||||
"sha256:e39c7eb31e3f5b1f88caff88bcff1b7f8334975b46f6ac6e9fc725d829bc35d4",
|
||||
"sha256:e46cd37076971c1040fc8c41273a8b3e2c624ce4f2be3f5dfcb7a430c1d3acc2",
|
||||
"sha256:e5c1502d4ace69a179305abb3f0bb6141cbe4714bc9b31d427329a95acfc8bdd",
|
||||
"sha256:edfe077ab09442d4ef3c52cb1f9dab89bff02f4524afc0acf2d46be17dc479f5",
|
||||
"sha256:effe5406c9bd748a871dbcaf3ac69167c38d72db8c9baf3ff954c344f31c4cbe",
|
||||
"sha256:f0d1e3732768fecb052d90d62b220af62ead5748ac51ef61e7b32c266cac9293",
|
||||
"sha256:f5969baeaea61c97efa706b9b107dcba02784b1601c74ac84f2a532ea079403e",
|
||||
"sha256:f8888e31e3a85943743f8fc15e71536bda1c81d5aa36d014a3c0c44481d7db6e",
|
||||
"sha256:fc52b79d83a3fe3a360902d3f5d79073a993597d48114c29485e9431092905d8"
|
||||
"sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027",
|
||||
"sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087",
|
||||
"sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786",
|
||||
"sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8",
|
||||
"sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09",
|
||||
"sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185",
|
||||
"sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574",
|
||||
"sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e",
|
||||
"sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519",
|
||||
"sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898",
|
||||
"sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269",
|
||||
"sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3",
|
||||
"sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f",
|
||||
"sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6",
|
||||
"sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8",
|
||||
"sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a",
|
||||
"sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73",
|
||||
"sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc",
|
||||
"sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714",
|
||||
"sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2",
|
||||
"sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc",
|
||||
"sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce",
|
||||
"sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d",
|
||||
"sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e",
|
||||
"sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6",
|
||||
"sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269",
|
||||
"sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96",
|
||||
"sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d",
|
||||
"sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a",
|
||||
"sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4",
|
||||
"sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77",
|
||||
"sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d",
|
||||
"sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0",
|
||||
"sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed",
|
||||
"sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068",
|
||||
"sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac",
|
||||
"sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25",
|
||||
"sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8",
|
||||
"sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab",
|
||||
"sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26",
|
||||
"sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2",
|
||||
"sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db",
|
||||
"sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f",
|
||||
"sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5",
|
||||
"sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99",
|
||||
"sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c",
|
||||
"sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d",
|
||||
"sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811",
|
||||
"sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa",
|
||||
"sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a",
|
||||
"sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03",
|
||||
"sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b",
|
||||
"sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04",
|
||||
"sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c",
|
||||
"sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001",
|
||||
"sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458",
|
||||
"sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389",
|
||||
"sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99",
|
||||
"sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985",
|
||||
"sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537",
|
||||
"sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238",
|
||||
"sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f",
|
||||
"sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d",
|
||||
"sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796",
|
||||
"sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a",
|
||||
"sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143",
|
||||
"sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8",
|
||||
"sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c",
|
||||
"sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5",
|
||||
"sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5",
|
||||
"sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711",
|
||||
"sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4",
|
||||
"sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6",
|
||||
"sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c",
|
||||
"sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7",
|
||||
"sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4",
|
||||
"sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b",
|
||||
"sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae",
|
||||
"sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12",
|
||||
"sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c",
|
||||
"sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae",
|
||||
"sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8",
|
||||
"sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887",
|
||||
"sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b",
|
||||
"sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4",
|
||||
"sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f",
|
||||
"sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5",
|
||||
"sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33",
|
||||
"sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519",
|
||||
"sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"
|
||||
],
|
||||
"markers": "python_full_version >= '3.7.0'",
|
||||
"version": "==3.3.0"
|
||||
"version": "==3.3.2"
|
||||
},
|
||||
"cryptography": {
|
||||
"hashes": [
|
||||
"sha256:004b6ccc95943f6a9ad3142cfabcc769d7ee38a3f60fb0dddbfb431f818c3a67",
|
||||
"sha256:047c4603aeb4bbd8db2756e38f5b8bd7e94318c047cfe4efeb5d715e08b49311",
|
||||
"sha256:0d9409894f495d465fe6fda92cb70e8323e9648af912d5b9141d616df40a87b8",
|
||||
"sha256:23a25c09dfd0d9f28da2352503b23e086f8e78096b9fd585d1d14eca01613e13",
|
||||
"sha256:2ed09183922d66c4ec5fdaa59b4d14e105c084dd0febd27452de8f6f74704143",
|
||||
"sha256:35c00f637cd0b9d5b6c6bd11b6c3359194a8eba9c46d4e875a3660e3b400005f",
|
||||
"sha256:37480760ae08065437e6573d14be973112c9e6dcaf5f11d00147ee74f37a3829",
|
||||
"sha256:3b224890962a2d7b57cf5eeb16ccaafba6083f7b811829f00476309bce2fe0fd",
|
||||
"sha256:5a0f09cefded00e648a127048119f77bc2b2ec61e736660b5789e638f43cc397",
|
||||
"sha256:5b72205a360f3b6176485a333256b9bcd48700fc755fef51c8e7e67c4b63e3ac",
|
||||
"sha256:7e53db173370dea832190870e975a1e09c86a879b613948f09eb49324218c14d",
|
||||
"sha256:7febc3094125fc126a7f6fb1f420d0da639f3f32cb15c8ff0dc3997c4549f51a",
|
||||
"sha256:80907d3faa55dc5434a16579952ac6da800935cd98d14dbd62f6f042c7f5e839",
|
||||
"sha256:86defa8d248c3fa029da68ce61fe735432b047e32179883bdb1e79ed9bb8195e",
|
||||
"sha256:8ac4f9ead4bbd0bc8ab2d318f97d85147167a488be0e08814a37eb2f439d5cf6",
|
||||
"sha256:93530900d14c37a46ce3d6c9e6fd35dbe5f5601bf6b3a5c325c7bffc030344d9",
|
||||
"sha256:9eeb77214afae972a00dee47382d2591abe77bdae166bda672fb1e24702a3860",
|
||||
"sha256:b5f4dfe950ff0479f1f00eda09c18798d4f49b98f4e2006d644b3301682ebdca",
|
||||
"sha256:c3391bd8e6de35f6f1140e50aaeb3e2b3d6a9012536ca23ab0d9c35ec18c8a91",
|
||||
"sha256:c880eba5175f4307129784eca96f4e70b88e57aa3f680aeba3bab0e980b0f37d",
|
||||
"sha256:cecfefa17042941f94ab54f769c8ce0fe14beff2694e9ac684176a2535bf9714",
|
||||
"sha256:e40211b4923ba5a6dc9769eab704bdb3fbb58d56c5b336d30996c24fcf12aadb",
|
||||
"sha256:efc8ad4e6fc4f1752ebfb58aefece8b4e3c4cae940b0994d43649bdfce8d0d4f"
|
||||
"sha256:0c327cac00f082013c7c9fb6c46b7cc9fa3c288ca702c74773968173bda421bf",
|
||||
"sha256:0d2a6a598847c46e3e321a7aef8af1436f11c27f1254933746304ff014664d84",
|
||||
"sha256:227ec057cd32a41c6651701abc0328135e472ed450f47c2766f23267b792a88e",
|
||||
"sha256:22892cc830d8b2c89ea60148227631bb96a7da0c1b722f2aac8824b1b7c0b6b8",
|
||||
"sha256:392cb88b597247177172e02da6b7a63deeff1937fa6fec3bbf902ebd75d97ec7",
|
||||
"sha256:3be3ca726e1572517d2bef99a818378bbcf7d7799d5372a46c79c29eb8d166c1",
|
||||
"sha256:573eb7128cbca75f9157dcde974781209463ce56b5804983e11a1c462f0f4e88",
|
||||
"sha256:580afc7b7216deeb87a098ef0674d6ee34ab55993140838b14c9b83312b37b86",
|
||||
"sha256:5a70187954ba7292c7876734183e810b728b4f3965fbe571421cb2434d279179",
|
||||
"sha256:73801ac9736741f220e20435f84ecec75ed70eda90f781a148f1bad546963d81",
|
||||
"sha256:7d208c21e47940369accfc9e85f0de7693d9a5d843c2509b3846b2db170dfd20",
|
||||
"sha256:8254962e6ba1f4d2090c44daf50a547cd5f0bf446dc658a8e5f8156cae0d8548",
|
||||
"sha256:88417bff20162f635f24f849ab182b092697922088b477a7abd6664ddd82291d",
|
||||
"sha256:a48e74dad1fb349f3dc1d449ed88e0017d792997a7ad2ec9587ed17405667e6d",
|
||||
"sha256:b948e09fe5fb18517d99994184854ebd50b57248736fd4c720ad540560174ec5",
|
||||
"sha256:c707f7afd813478e2019ae32a7c49cd932dd60ab2d2a93e796f68236b7e1fbf1",
|
||||
"sha256:d38e6031e113b7421db1de0c1b1f7739564a88f1684c6b89234fbf6c11b75147",
|
||||
"sha256:d3977f0e276f6f5bf245c403156673db103283266601405376f075c849a0b936",
|
||||
"sha256:da6a0ff8f1016ccc7477e6339e1d50ce5f59b88905585f77193ebd5068f1e797",
|
||||
"sha256:e270c04f4d9b5671ebcc792b3ba5d4488bf7c42c3c241a3748e2599776f29696",
|
||||
"sha256:e886098619d3815e0ad5790c973afeee2c0e6e04b4da90b88e6bd06e2a0b1b72",
|
||||
"sha256:ec3b055ff8f1dce8e6ef28f626e0972981475173d7973d63f271b29c8a2897da",
|
||||
"sha256:fba1e91467c65fe64a82c689dc6cf58151158993b13eb7a7f3f4b7f395636723"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==41.0.4"
|
||||
"version": "==41.0.5"
|
||||
},
|
||||
"defusedxml": {
|
||||
"hashes": [
|
||||
|
@ -279,12 +279,12 @@
|
|||
},
|
||||
"django": {
|
||||
"hashes": [
|
||||
"sha256:08f41f468b63335aea0d904c5729e0250300f6a1907bf293a65499496cdbc68f",
|
||||
"sha256:a64d2487cdb00ad7461434320ccc38e60af9c404773a2f95ab0093b4453a3215"
|
||||
"sha256:8e0f1c2c2786b5c0e39fe1afce24c926040fad47c8ea8ad30aaf1188df29fc41",
|
||||
"sha256:e1d37c51ad26186de355cbcec16613ebdabfa9689bbade9c538835205a8abbe9"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==4.2.6"
|
||||
"version": "==4.2.7"
|
||||
},
|
||||
"django-allow-cidr": {
|
||||
"hashes": [
|
||||
|
@ -310,6 +310,15 @@
|
|||
],
|
||||
"version": "==3.4.4"
|
||||
},
|
||||
"django-cors-headers": {
|
||||
"hashes": [
|
||||
"sha256:25aabc94d4837678c1edf442c7f68a5f5fd151f6767b0e0b01c61a2179d02711",
|
||||
"sha256:bd36c7aea0d070e462f3383f0dc9ef717e5fdc2b10a99c98c285f16da84ffba2"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==4.3.0"
|
||||
},
|
||||
"django-csp": {
|
||||
"hashes": [
|
||||
"sha256:01443a07723f9a479d498bd7bb63571aaa771e690f64bde515db6cdb76e8041a",
|
||||
|
@ -366,11 +375,11 @@
|
|||
},
|
||||
"faker": {
|
||||
"hashes": [
|
||||
"sha256:a62a3fd3bfa3122d4f57dfa26a1cc37d76751a76c8ddd63cf9d24078c57913a4",
|
||||
"sha256:e28090068293c5a83e7f4d636417d45fae1031ca8a8136cc2415549ebc2111e2"
|
||||
"sha256:14ccb0aec342d33aa3889a864a56e5b3c2d56bce1b89f9189f4fbc128b9afc1e",
|
||||
"sha256:da880a76322db7a879c848a0771e129338e0a680a9f695fd9a3e7a6ac82b45e1"
|
||||
],
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==19.11.0"
|
||||
"version": "==19.13.0"
|
||||
},
|
||||
"fred-epplib": {
|
||||
"git": "https://github.com/cisagov/epplib.git",
|
||||
|
@ -443,72 +452,67 @@
|
|||
},
|
||||
"greenlet": {
|
||||
"hashes": [
|
||||
"sha256:02a807b2a58d5cdebb07050efe3d7deaf915468d112dfcf5e426d0564aa3aa4a",
|
||||
"sha256:0b72b802496cccbd9b31acea72b6f87e7771ccfd7f7927437d592e5c92ed703c",
|
||||
"sha256:0d3f83ffb18dc57243e0151331e3c383b05e5b6c5029ac29f754745c800f8ed9",
|
||||
"sha256:10b5582744abd9858947d163843d323d0b67be9432db50f8bf83031032bc218d",
|
||||
"sha256:123910c58234a8d40eaab595bc56a5ae49bdd90122dde5bdc012c20595a94c14",
|
||||
"sha256:1482fba7fbed96ea7842b5a7fc11d61727e8be75a077e603e8ab49d24e234383",
|
||||
"sha256:19834e3f91f485442adc1ee440171ec5d9a4840a1f7bd5ed97833544719ce10b",
|
||||
"sha256:1d363666acc21d2c204dd8705c0e0457d7b2ee7a76cb16ffc099d6799744ac99",
|
||||
"sha256:211ef8d174601b80e01436f4e6905aca341b15a566f35a10dd8d1e93f5dbb3b7",
|
||||
"sha256:269d06fa0f9624455ce08ae0179430eea61085e3cf6457f05982b37fd2cefe17",
|
||||
"sha256:2e7dcdfad252f2ca83c685b0fa9fba00e4d8f243b73839229d56ee3d9d219314",
|
||||
"sha256:334ef6ed8337bd0b58bb0ae4f7f2dcc84c9f116e474bb4ec250a8bb9bd797a66",
|
||||
"sha256:343675e0da2f3c69d3fb1e894ba0a1acf58f481f3b9372ce1eb465ef93cf6fed",
|
||||
"sha256:37f60b3a42d8b5499be910d1267b24355c495064f271cfe74bf28b17b099133c",
|
||||
"sha256:38ad562a104cd41e9d4644f46ea37167b93190c6d5e4048fcc4b80d34ecb278f",
|
||||
"sha256:3c0d36f5adc6e6100aedbc976d7428a9f7194ea79911aa4bf471f44ee13a9464",
|
||||
"sha256:3fd2b18432e7298fcbec3d39e1a0aa91ae9ea1c93356ec089421fabc3651572b",
|
||||
"sha256:4a1a6244ff96343e9994e37e5b4839f09a0207d35ef6134dce5c20d260d0302c",
|
||||
"sha256:4cd83fb8d8e17633ad534d9ac93719ef8937568d730ef07ac3a98cb520fd93e4",
|
||||
"sha256:527cd90ba3d8d7ae7dceb06fda619895768a46a1b4e423bdb24c1969823b8362",
|
||||
"sha256:56867a3b3cf26dc8a0beecdb4459c59f4c47cdd5424618c08515f682e1d46692",
|
||||
"sha256:621fcb346141ae08cb95424ebfc5b014361621b8132c48e538e34c3c93ac7365",
|
||||
"sha256:63acdc34c9cde42a6534518e32ce55c30f932b473c62c235a466469a710bfbf9",
|
||||
"sha256:6512592cc49b2c6d9b19fbaa0312124cd4c4c8a90d28473f86f92685cc5fef8e",
|
||||
"sha256:6672fdde0fd1a60b44fb1751a7779c6db487e42b0cc65e7caa6aa686874e79fb",
|
||||
"sha256:6a5b2d4cdaf1c71057ff823a19d850ed5c6c2d3686cb71f73ae4d6382aaa7a06",
|
||||
"sha256:6a68d670c8f89ff65c82b936275369e532772eebc027c3be68c6b87ad05ca695",
|
||||
"sha256:6bb36985f606a7c49916eff74ab99399cdfd09241c375d5a820bb855dfb4af9f",
|
||||
"sha256:73b2f1922a39d5d59cc0e597987300df3396b148a9bd10b76a058a2f2772fc04",
|
||||
"sha256:7709fd7bb02b31908dc8fd35bfd0a29fc24681d5cc9ac1d64ad07f8d2b7db62f",
|
||||
"sha256:8060b32d8586e912a7b7dac2d15b28dbbd63a174ab32f5bc6d107a1c4143f40b",
|
||||
"sha256:80dcd3c938cbcac986c5c92779db8e8ce51a89a849c135172c88ecbdc8c056b7",
|
||||
"sha256:813720bd57e193391dfe26f4871186cf460848b83df7e23e6bef698a7624b4c9",
|
||||
"sha256:831d6f35037cf18ca5e80a737a27d822d87cd922521d18ed3dbc8a6967be50ce",
|
||||
"sha256:871b0a8835f9e9d461b7fdaa1b57e3492dd45398e87324c047469ce2fc9f516c",
|
||||
"sha256:952256c2bc5b4ee8df8dfc54fc4de330970bf5d79253c863fb5e6761f00dda35",
|
||||
"sha256:96d9ea57292f636ec851a9bb961a5cc0f9976900e16e5d5647f19aa36ba6366b",
|
||||
"sha256:9a812224a5fb17a538207e8cf8e86f517df2080c8ee0f8c1ed2bdaccd18f38f4",
|
||||
"sha256:9adbd8ecf097e34ada8efde9b6fec4dd2a903b1e98037adf72d12993a1c80b51",
|
||||
"sha256:9de687479faec7db5b198cc365bc34addd256b0028956501f4d4d5e9ca2e240a",
|
||||
"sha256:a048293392d4e058298710a54dfaefcefdf49d287cd33fb1f7d63d55426e4355",
|
||||
"sha256:aa15a2ec737cb609ed48902b45c5e4ff6044feb5dcdfcf6fa8482379190330d7",
|
||||
"sha256:abe1ef3d780de56defd0c77c5ba95e152f4e4c4e12d7e11dd8447d338b85a625",
|
||||
"sha256:ad6fb737e46b8bd63156b8f59ba6cdef46fe2b7db0c5804388a2d0519b8ddb99",
|
||||
"sha256:b1660a15a446206c8545edc292ab5c48b91ff732f91b3d3b30d9a915d5ec4779",
|
||||
"sha256:b505fcfc26f4148551826a96f7317e02c400665fa0883fe505d4fcaab1dabfdd",
|
||||
"sha256:b822fab253ac0f330ee807e7485769e3ac85d5eef827ca224feaaefa462dc0d0",
|
||||
"sha256:bdd696947cd695924aecb3870660b7545a19851f93b9d327ef8236bfc49be705",
|
||||
"sha256:bdfaeecf8cc705d35d8e6de324bf58427d7eafb55f67050d8f28053a3d57118c",
|
||||
"sha256:be557119bf467d37a8099d91fbf11b2de5eb1fd5fc5b91598407574848dc910f",
|
||||
"sha256:c6b5ce7f40f0e2f8b88c28e6691ca6806814157ff05e794cdd161be928550f4c",
|
||||
"sha256:c94e4e924d09b5a3e37b853fe5924a95eac058cb6f6fb437ebb588b7eda79870",
|
||||
"sha256:cc3e2679ea13b4de79bdc44b25a0c4fcd5e94e21b8f290791744ac42d34a0353",
|
||||
"sha256:d1e22c22f7826096ad503e9bb681b05b8c1f5a8138469b255eb91f26a76634f2",
|
||||
"sha256:d5539f6da3418c3dc002739cb2bb8d169056aa66e0c83f6bacae0cd3ac26b423",
|
||||
"sha256:d55db1db455c59b46f794346efce896e754b8942817f46a1bada2d29446e305a",
|
||||
"sha256:e09dea87cc91aea5500262993cbd484b41edf8af74f976719dd83fe724644cd6",
|
||||
"sha256:e52a712c38e5fb4fd68e00dc3caf00b60cb65634d50e32281a9d6431b33b4af1",
|
||||
"sha256:e693e759e172fa1c2c90d35dea4acbdd1d609b6936115d3739148d5e4cd11947",
|
||||
"sha256:ecf94aa539e97a8411b5ea52fc6ccd8371be9550c4041011a091eb8b3ca1d810",
|
||||
"sha256:f351479a6914fd81a55c8e68963609f792d9b067fb8a60a042c585a621e0de4f",
|
||||
"sha256:f47932c434a3c8d3c86d865443fadc1fbf574e9b11d6650b656e602b1797908a"
|
||||
"sha256:0a02d259510b3630f330c86557331a3b0e0c79dac3d166e449a39363beaae174",
|
||||
"sha256:0b6f9f8ca7093fd4433472fd99b5650f8a26dcd8ba410e14094c1e44cd3ceddd",
|
||||
"sha256:100f78a29707ca1525ea47388cec8a049405147719f47ebf3895e7509c6446aa",
|
||||
"sha256:1757936efea16e3f03db20efd0cd50a1c86b06734f9f7338a90c4ba85ec2ad5a",
|
||||
"sha256:19075157a10055759066854a973b3d1325d964d498a805bb68a1f9af4aaef8ec",
|
||||
"sha256:19bbdf1cce0346ef7341705d71e2ecf6f41a35c311137f29b8a2dc2341374565",
|
||||
"sha256:20107edf7c2c3644c67c12205dc60b1bb11d26b2610b276f97d666110d1b511d",
|
||||
"sha256:22f79120a24aeeae2b4471c711dcf4f8c736a2bb2fabad2a67ac9a55ea72523c",
|
||||
"sha256:2847e5d7beedb8d614186962c3d774d40d3374d580d2cbdab7f184580a39d234",
|
||||
"sha256:28e89e232c7593d33cac35425b58950789962011cc274aa43ef8865f2e11f46d",
|
||||
"sha256:329c5a2e5a0ee942f2992c5e3ff40be03e75f745f48847f118a3cfece7a28546",
|
||||
"sha256:337322096d92808f76ad26061a8f5fccb22b0809bea39212cd6c406f6a7060d2",
|
||||
"sha256:3fcc780ae8edbb1d050d920ab44790201f027d59fdbd21362340a85c79066a74",
|
||||
"sha256:41bdeeb552d814bcd7fb52172b304898a35818107cc8778b5101423c9017b3de",
|
||||
"sha256:4eddd98afc726f8aee1948858aed9e6feeb1758889dfd869072d4465973f6bfd",
|
||||
"sha256:52e93b28db27ae7d208748f45d2db8a7b6a380e0d703f099c949d0f0d80b70e9",
|
||||
"sha256:55d62807f1c5a1682075c62436702aaba941daa316e9161e4b6ccebbbf38bda3",
|
||||
"sha256:5805e71e5b570d490938d55552f5a9e10f477c19400c38bf1d5190d760691846",
|
||||
"sha256:599daf06ea59bfedbec564b1692b0166a0045f32b6f0933b0dd4df59a854caf2",
|
||||
"sha256:60d5772e8195f4e9ebf74046a9121bbb90090f6550f81d8956a05387ba139353",
|
||||
"sha256:696d8e7d82398e810f2b3622b24e87906763b6ebfd90e361e88eb85b0e554dc8",
|
||||
"sha256:6e6061bf1e9565c29002e3c601cf68569c450be7fc3f7336671af7ddb4657166",
|
||||
"sha256:80ac992f25d10aaebe1ee15df45ca0d7571d0f70b645c08ec68733fb7a020206",
|
||||
"sha256:816bd9488a94cba78d93e1abb58000e8266fa9cc2aa9ccdd6eb0696acb24005b",
|
||||
"sha256:85d2b77e7c9382f004b41d9c72c85537fac834fb141b0296942d52bf03fe4a3d",
|
||||
"sha256:87c8ceb0cf8a5a51b8008b643844b7f4a8264a2c13fcbcd8a8316161725383fe",
|
||||
"sha256:89ee2e967bd7ff85d84a2de09df10e021c9b38c7d91dead95b406ed6350c6997",
|
||||
"sha256:8bef097455dea90ffe855286926ae02d8faa335ed8e4067326257cb571fc1445",
|
||||
"sha256:8d11ebbd679e927593978aa44c10fc2092bc454b7d13fdc958d3e9d508aba7d0",
|
||||
"sha256:91e6c7db42638dc45cf2e13c73be16bf83179f7859b07cfc139518941320be96",
|
||||
"sha256:97e7ac860d64e2dcba5c5944cfc8fa9ea185cd84061c623536154d5a89237884",
|
||||
"sha256:990066bff27c4fcf3b69382b86f4c99b3652bab2a7e685d968cd4d0cfc6f67c6",
|
||||
"sha256:9fbc5b8f3dfe24784cee8ce0be3da2d8a79e46a276593db6868382d9c50d97b1",
|
||||
"sha256:ac4a39d1abae48184d420aa8e5e63efd1b75c8444dd95daa3e03f6c6310e9619",
|
||||
"sha256:b2c02d2ad98116e914d4f3155ffc905fd0c025d901ead3f6ed07385e19122c94",
|
||||
"sha256:b2d3337dcfaa99698aa2377c81c9ca72fcd89c07e7eb62ece3f23a3fe89b2ce4",
|
||||
"sha256:b489c36d1327868d207002391f662a1d163bdc8daf10ab2e5f6e41b9b96de3b1",
|
||||
"sha256:b641161c302efbb860ae6b081f406839a8b7d5573f20a455539823802c655f63",
|
||||
"sha256:b8ba29306c5de7717b5761b9ea74f9c72b9e2b834e24aa984da99cbfc70157fd",
|
||||
"sha256:b9934adbd0f6e476f0ecff3c94626529f344f57b38c9a541f87098710b18af0a",
|
||||
"sha256:ce85c43ae54845272f6f9cd8320d034d7a946e9773c693b27d620edec825e376",
|
||||
"sha256:cf868e08690cb89360eebc73ba4be7fb461cfbc6168dd88e2fbbe6f31812cd57",
|
||||
"sha256:d2905ce1df400360463c772b55d8e2518d0e488a87cdea13dd2c71dcb2a1fa16",
|
||||
"sha256:d57e20ba591727da0c230ab2c3f200ac9d6d333860d85348816e1dca4cc4792e",
|
||||
"sha256:d6a8c9d4f8692917a3dc7eb25a6fb337bff86909febe2f793ec1928cd97bedfc",
|
||||
"sha256:d923ff276f1c1f9680d32832f8d6c040fe9306cbfb5d161b0911e9634be9ef0a",
|
||||
"sha256:daa7197b43c707462f06d2c693ffdbb5991cbb8b80b5b984007de431493a319c",
|
||||
"sha256:dbd4c177afb8a8d9ba348d925b0b67246147af806f0b104af4d24f144d461cd5",
|
||||
"sha256:dc4d815b794fd8868c4d67602692c21bf5293a75e4b607bb92a11e821e2b859a",
|
||||
"sha256:e9d21aaa84557d64209af04ff48e0ad5e28c5cca67ce43444e939579d085da72",
|
||||
"sha256:ea6b8aa9e08eea388c5f7a276fabb1d4b6b9d6e4ceb12cc477c3d352001768a9",
|
||||
"sha256:eabe7090db68c981fca689299c2d116400b553f4b713266b130cfc9e2aa9c5a9",
|
||||
"sha256:f2f6d303f3dee132b322a14cd8765287b8f86cdc10d2cb6a6fae234ea488888e",
|
||||
"sha256:f33f3258aae89da191c6ebaa3bc517c6c4cbc9b9f689e5d8452f7aedbb913fa8",
|
||||
"sha256:f7bfb769f7efa0eefcd039dd19d843a4fbfbac52f1878b1da2ed5793ec9b1a65",
|
||||
"sha256:f89e21afe925fcfa655965ca8ea10f24773a1791400989ff32f467badfe4a064",
|
||||
"sha256:fa24255ae3c0ab67e613556375a4341af04a084bd58764731972bcbc8baeba36"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==3.0.0"
|
||||
"version": "==3.0.1"
|
||||
},
|
||||
"gunicorn": {
|
||||
"hashes": [
|
||||
|
@ -741,10 +745,10 @@
|
|||
},
|
||||
"phonenumberslite": {
|
||||
"hashes": [
|
||||
"sha256:7c719e35ef551a895459382e9faf592f52647312dd90b543b06460aa0e1c49c4",
|
||||
"sha256:cf6cf56c889c6787ec6b30b5791693f6dd678f633358f4aeea1fddf98d4cadcb"
|
||||
"sha256:1e03f7076ab2f010088b1b8041ebdc42acd3b797e8f45997ab1861cdaea76851",
|
||||
"sha256:adce353ee15b75f2deccf0eff77bada2a3d036f49ccfb30b8c172dd814fd51e9"
|
||||
],
|
||||
"version": "==8.13.23"
|
||||
"version": "==8.13.24"
|
||||
},
|
||||
"psycopg2-binary": {
|
||||
"hashes": [
|
||||
|
@ -775,6 +779,7 @@
|
|||
"sha256:4686818798f9194d03c9129a4d9a702d9e113a89cb03bffe08c6cf799e053291",
|
||||
"sha256:57fede879f08d23c85140a360c6a77709113efd1c993923c59fde17aa27599fe",
|
||||
"sha256:60989127da422b74a04345096c10d416c2b41bd7bf2a380eb541059e4e999980",
|
||||
"sha256:64cf30263844fa208851ebb13b0732ce674d8ec6a0c86a4e160495d299ba3c93",
|
||||
"sha256:68fc1f1ba168724771e38bee37d940d2865cb0f562380a1fb1ffb428b75cb692",
|
||||
"sha256:6e6f98446430fdf41bd36d4faa6cb409f5140c1c2cf58ce0bbdaf16af7d3f119",
|
||||
"sha256:729177eaf0aefca0994ce4cffe96ad3c75e377c7b6f4efa59ebf003b6d398716",
|
||||
|
@ -784,6 +789,7 @@
|
|||
"sha256:78151aa3ec21dccd5cdef6c74c3e73386dcdfaf19bced944169697d7ac7482fc",
|
||||
"sha256:7f01846810177d829c7692f1f5ada8096762d9172af1b1a28d4ab5b77c923c1c",
|
||||
"sha256:804d99b24ad523a1fe18cc707bf741670332f7c7412e9d49cb5eab67e886b9b5",
|
||||
"sha256:81ff62668af011f9a48787564ab7eded4e9fb17a4a6a74af5ffa6a457400d2ab",
|
||||
"sha256:8359bf4791968c5a78c56103702000105501adb557f3cf772b2c207284273984",
|
||||
"sha256:83791a65b51ad6ee6cf0845634859d69a038ea9b03d7b26e703f94c7e93dbcf9",
|
||||
"sha256:8532fd6e6e2dc57bcb3bc90b079c60de896d2128c5d9d6f24a63875a95a088cf",
|
||||
|
@ -796,6 +802,7 @@
|
|||
"sha256:a148c5d507bb9b4f2030a2025c545fccb0e1ef317393eaba42e7eabd28eb6041",
|
||||
"sha256:a6cdcc3ede532f4a4b96000b6362099591ab4a3e913d70bcbac2b56c872446f7",
|
||||
"sha256:ac05fb791acf5e1a3e39402641827780fe44d27e72567a000412c648a85ba860",
|
||||
"sha256:b0605eaed3eb239e87df0d5e3c6489daae3f7388d455d0c0b4df899519c6a38d",
|
||||
"sha256:b58b4710c7f4161b5e9dcbe73bb7c62d65670a87df7bcce9e1faaad43e715245",
|
||||
"sha256:b6356793b84728d9d50ead16ab43c187673831e9d4019013f1402c41b1db9b27",
|
||||
"sha256:b76bedd166805480ab069612119ea636f5ab8f8771e640ae103e05a4aae3e417",
|
||||
|
@ -1165,45 +1172,45 @@
|
|||
},
|
||||
"black": {
|
||||
"hashes": [
|
||||
"sha256:0e232f24a337fed7a82c1185ae46c56c4a6167fb0fe37411b43e876892c76699",
|
||||
"sha256:30b78ac9b54cf87bcb9910ee3d499d2bc893afd52495066c49d9ee6b21eee06e",
|
||||
"sha256:31946ec6f9c54ed7ba431c38bc81d758970dd734b96b8e8c2b17a367d7908171",
|
||||
"sha256:31b9f87b277a68d0e99d2905edae08807c007973eaa609da5f0c62def6b7c0bd",
|
||||
"sha256:47c4510f70ec2e8f9135ba490811c071419c115e46f143e4dce2ac45afdcf4c9",
|
||||
"sha256:481167c60cd3e6b1cb8ef2aac0f76165843a374346aeeaa9d86765fe0dd0318b",
|
||||
"sha256:6901631b937acbee93c75537e74f69463adaf34379a04eef32425b88aca88a23",
|
||||
"sha256:76baba9281e5e5b230c9b7f83a96daf67a95e919c2dfc240d9e6295eab7b9204",
|
||||
"sha256:7fb5fc36bb65160df21498d5a3dd330af8b6401be3f25af60c6ebfe23753f747",
|
||||
"sha256:960c21555be135c4b37b7018d63d6248bdae8514e5c55b71e994ad37407f45b8",
|
||||
"sha256:a3c2ddb35f71976a4cfeca558848c2f2f89abc86b06e8dd89b5a65c1e6c0f22a",
|
||||
"sha256:c870bee76ad5f7a5ea7bd01dc646028d05568d33b0b09b7ecfc8ec0da3f3f39c",
|
||||
"sha256:d3d9129ce05b0829730323bdcb00f928a448a124af5acf90aa94d9aba6969604",
|
||||
"sha256:db451a3363b1e765c172c3fd86213a4ce63fb8524c938ebd82919bf2a6e28c6a",
|
||||
"sha256:e223b731a0e025f8ef427dd79d8cd69c167da807f5710add30cdf131f13dd62e",
|
||||
"sha256:f20ff03f3fdd2fd4460b4f631663813e57dc277e37fb216463f3b907aa5a9bdd",
|
||||
"sha256:f74892b4b836e5162aa0452393112a574dac85e13902c57dfbaaf388e4eda37c",
|
||||
"sha256:f8dc7d50d94063cdfd13c82368afd8588bac4ce360e4224ac399e769d6704e98"
|
||||
"sha256:037e9b4664cafda5f025a1728c50a9e9aedb99a759c89f760bd83730e76ba884",
|
||||
"sha256:1b917a2aa020ca600483a7b340c165970b26e9029067f019e3755b56e8dd5916",
|
||||
"sha256:1f8ce316753428ff68749c65a5f7844631aa18c8679dfd3ca9dc1a289979c258",
|
||||
"sha256:33d40f5b06be80c1bbce17b173cda17994fbad096ce60eb22054da021bf933d1",
|
||||
"sha256:3f157a8945a7b2d424da3335f7ace89c14a3b0625e6593d21139c2d8214d55ce",
|
||||
"sha256:5ed45ac9a613fb52dad3b61c8dea2ec9510bf3108d4db88422bacc7d1ba1243d",
|
||||
"sha256:6d23d7822140e3fef190734216cefb262521789367fbdc0b3f22af6744058982",
|
||||
"sha256:7670242e90dc129c539e9ca17665e39a146a761e681805c54fbd86015c7c84f7",
|
||||
"sha256:7b4d10b0f016616a0d93d24a448100adf1699712fb7a4efd0e2c32bbb219b173",
|
||||
"sha256:7cb5936e686e782fddb1c73f8aa6f459e1ad38a6a7b0e54b403f1f05a1507ee9",
|
||||
"sha256:7d56124b7a61d092cb52cce34182a5280e160e6aff3137172a68c2c2c4b76bcb",
|
||||
"sha256:840015166dbdfbc47992871325799fd2dc0dcf9395e401ada6d88fe11498abad",
|
||||
"sha256:9c74de4c77b849e6359c6f01987e94873c707098322b91490d24296f66d067dc",
|
||||
"sha256:b15b75fc53a2fbcac8a87d3e20f69874d161beef13954747e053bca7a1ce53a0",
|
||||
"sha256:cfcce6f0a384d0da692119f2d72d79ed07c7159879d0bb1bb32d2e443382bf3a",
|
||||
"sha256:d431e6739f727bb2e0495df64a6c7a5310758e87505f5f8cde9ff6c0f2d7e4fe",
|
||||
"sha256:e293e4c2f4a992b980032bbd62df07c1bcff82d6964d6c9496f2cd726e246ace",
|
||||
"sha256:ec3f8e6234c4e46ff9e16d9ae96f4ef69fa328bb4ad08198c8cee45bb1f08c69"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==23.10.0"
|
||||
"version": "==23.10.1"
|
||||
},
|
||||
"blinker": {
|
||||
"hashes": [
|
||||
"sha256:152090d27c1c5c722ee7e48504b02d76502811ce02e1523553b4cf8c8b3d3a8d",
|
||||
"sha256:296320d6c28b006eb5e32d4712202dbcdcbf5dc482da298c2f44881c43884aaa"
|
||||
"sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9",
|
||||
"sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.6.3"
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==1.7.0"
|
||||
},
|
||||
"boto3": {
|
||||
"hashes": [
|
||||
"sha256:38658585791f47cca3fc6aad03838de0136778b533e8c71c6a9590aedc60fbde",
|
||||
"sha256:a8228522c7db33694c0746dec8b48c05473671626359dd62ab6829eb7871eddc"
|
||||
"sha256:02ce7dcad2d3b054cd99e7ca6df7a708e016a31b1c98b46d8df3b3891070c121",
|
||||
"sha256:b8acb57a124434284d6ab69c61d32d70e84e13e2c27c33b4ad3c32f15ad407d3"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.28.66"
|
||||
"version": "==1.28.79"
|
||||
},
|
||||
"boto3-mocking": {
|
||||
"hashes": [
|
||||
|
@ -1216,28 +1223,28 @@
|
|||
},
|
||||
"boto3-stubs": {
|
||||
"hashes": [
|
||||
"sha256:06e696ce8529f899a2ba388d6604ca8ed8ba367dd53898e27b4ce49e8b3fd2aa",
|
||||
"sha256:b85689c50a6768bb0fcb85e06394d7898b330b82f34cec26c36d912e6a41280d"
|
||||
"sha256:621e229ef9b394cd1f6cd5caa58a17347440b14423b01435d9f2a50031a427fc",
|
||||
"sha256:f5986d1b09d516f58780100a3a86bfa75114370dd5dd0bdea67bfe8cda255723"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.28.66"
|
||||
"version": "==1.28.79"
|
||||
},
|
||||
"botocore": {
|
||||
"hashes": [
|
||||
"sha256:70e94a5f9bd46b26b63a41fb441ad35f2ae8862ad9d90765b6fa31ccc02c0a19",
|
||||
"sha256:8d161a97a25eb381721b4b7251d5126ef4ec57e452114250b3e51ba5e4ff45a4"
|
||||
"sha256:07ecb93833475dde68e5c0e02a7ccf8ca22caf68cdc892651c300529894133e1",
|
||||
"sha256:6f1fc49e9e12f9772b4fef577837670bc84d772a7c946b4d08fe2890e34a4305"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==1.31.66"
|
||||
"version": "==1.31.79"
|
||||
},
|
||||
"botocore-stubs": {
|
||||
"hashes": [
|
||||
"sha256:5ea5f4af18ee654cf510d69b3bc7c1ed3236b50fcd4e3eb98c11d28033ff05c3",
|
||||
"sha256:b65fa3ff36e8a70518a143b5025559918a68d7a20b85c88f8a1f067f6620a205"
|
||||
"sha256:64488b9f38905f8a60041998f9dc945754222d900a3345b449059667890c2c17",
|
||||
"sha256:e4d8e782d774f45dbfc36d922a0a0edfffbacca2ce66bccaba02a893a38359f2"
|
||||
],
|
||||
"markers": "python_version >= '3.7' and python_version < '4.0'",
|
||||
"version": "==1.31.66"
|
||||
"version": "==1.31.79"
|
||||
},
|
||||
"click": {
|
||||
"hashes": [
|
||||
|
@ -1249,12 +1256,12 @@
|
|||
},
|
||||
"django": {
|
||||
"hashes": [
|
||||
"sha256:08f41f468b63335aea0d904c5729e0250300f6a1907bf293a65499496cdbc68f",
|
||||
"sha256:a64d2487cdb00ad7461434320ccc38e60af9c404773a2f95ab0093b4453a3215"
|
||||
"sha256:8e0f1c2c2786b5c0e39fe1afce24c926040fad47c8ea8ad30aaf1188df29fc41",
|
||||
"sha256:e1d37c51ad26186de355cbcec16613ebdabfa9689bbade9c538835205a8abbe9"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==4.2.6"
|
||||
"version": "==4.2.7"
|
||||
},
|
||||
"django-debug-toolbar": {
|
||||
"hashes": [
|
||||
|
@ -1274,12 +1281,12 @@
|
|||
},
|
||||
"django-stubs": {
|
||||
"hashes": [
|
||||
"sha256:5a23cf622f1426a0b0c48bd6e2ef709a66275d72073baf6fdf5ac36fc4cce736",
|
||||
"sha256:706b2456bd0e56c468dfd8f27b0e7dde001c5c7cd3010d67fcbda9d95467e050"
|
||||
"sha256:2fcd257884a68dfa02de41ee5410ec805264d9b07d9b5b119e4dea82c7b8345e",
|
||||
"sha256:e60b43de662a199db4b15c803c06669e0ac5035614af291cbd3b91591f7dcc94"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==4.2.5"
|
||||
"version": "==4.2.6"
|
||||
},
|
||||
"django-stubs-ext": {
|
||||
"hashes": [
|
||||
|
@ -1308,11 +1315,11 @@
|
|||
},
|
||||
"gitdb": {
|
||||
"hashes": [
|
||||
"sha256:6eb990b69df4e15bad899ea868dc46572c3f75339735663b81de79b06f17eb9a",
|
||||
"sha256:c286cf298426064079ed96a9e4a9d39e7f3e9bf15ba60701e95f5492f28415c7"
|
||||
"sha256:81a3407ddd2ee8df444cbacea00e2d038e40150acfa3001696fe0dcf1d3adfa4",
|
||||
"sha256:bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b"
|
||||
],
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==4.0.10"
|
||||
"version": "==4.0.11"
|
||||
},
|
||||
"gitpython": {
|
||||
"hashes": [
|
||||
|
@ -1422,11 +1429,11 @@
|
|||
},
|
||||
"pbr": {
|
||||
"hashes": [
|
||||
"sha256:567f09558bae2b3ab53cb3c1e2e33e726ff3338e7bae3db5dc954b3a44eef12b",
|
||||
"sha256:aefc51675b0b533d56bb5fd1c8c6c0522fe31896679882e1c4c63d5e4a0fccb3"
|
||||
"sha256:4a7317d5e3b17a3dccb6a8cfe67dab65b20551404c52c8ed41279fa4f0cb4cda",
|
||||
"sha256:d1377122a5a00e2f940ee482999518efe16d745d423a670c27773dfbc3c9a7d9"
|
||||
],
|
||||
"markers": "python_version >= '2.6'",
|
||||
"version": "==5.11.1"
|
||||
"version": "==6.0.0"
|
||||
},
|
||||
"platformdirs": {
|
||||
"hashes": [
|
||||
|
@ -1590,19 +1597,20 @@
|
|||
},
|
||||
"types-awscrt": {
|
||||
"hashes": [
|
||||
"sha256:7b55f5a12ccd4407bc8f1e35c69bb40c931f8513ce1ad81a4527fce3989003fd",
|
||||
"sha256:9a21caac4287c113dd52665707785c45bb1d3242b7a2b8aeb57c49e9e749a330"
|
||||
"sha256:4eb4f3bd0c41a2710cacda13098374da9faa76c5a0fb901aa5659e0fd48ceda1",
|
||||
"sha256:a2d534b7017c3476ee69a44bd8aeaf3b588c42baa8322473d100a45ee67510d7"
|
||||
],
|
||||
"markers": "python_version >= '3.7' and python_version < '4.0'",
|
||||
"version": "==0.19.3"
|
||||
"version": "==0.19.8"
|
||||
},
|
||||
"types-cachetools": {
|
||||
"hashes": [
|
||||
"sha256:595f0342d246c8ba534f5a762cf4c2f60ecb61e8002b8b2277fd5cf791d4e851",
|
||||
"sha256:f7f8a25bfe306f2e6bc2ad0a2f949d9e72f2d91036d509c36d3810bf728bc6e1"
|
||||
"sha256:27c982cdb9cf3fead8b0089ee6b895715ecc99dac90ec29e2cab56eb1aaf4199",
|
||||
"sha256:98c069dc7fc087b1b061703369c80751b0a0fc561f6fb072b554e5eee23773a0"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==5.3.0.6"
|
||||
"markers": "python_version >= '3.7'",
|
||||
"version": "==5.3.0.7"
|
||||
},
|
||||
"types-pytz": {
|
||||
"hashes": [
|
||||
|
|
8
src/migrationdata/README.md
Normal file
8
src/migrationdata/README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
## Purpose
|
||||
Use this folder for storing files for the migration process. Should otherwise be empty on local dev environments unless necessary. This folder must exist due to the nature of how data is stored on cloud.gov and the nature of the data we want to send.
|
||||
|
||||
## How do I migrate registrar data?
|
||||
This process is detailed in [data_migration.md](../../docs/operations/data_migration.md)
|
||||
|
||||
## What kind of files can I store here?
|
||||
The intent is for PII data or otherwise, but this can exist in any format. Do note that the data contained in this file will be temporary, so after the app is restaged it will lose it. This is ideal for migration files as they write to our DB, but not for something you need to permanently hold onto.
|
|
@ -187,7 +187,7 @@ h1, h2, h3 {
|
|||
.object-tools li a,
|
||||
.object-tools p a {
|
||||
font-family: "Source Sans Pro Web", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
text-transform: capitalize!important;
|
||||
text-transform: none!important;
|
||||
font-size: 14px!important;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,11 @@
|
|||
font-size: units(3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.usa-alert__text.measure-none {
|
||||
max-width: measure(none);
|
||||
}
|
||||
|
||||
// The icon was off center for some reason
|
||||
// Fixes that issue
|
||||
@media (min-width: 64em){
|
||||
|
|
|
@ -119,6 +119,8 @@ INSTALLED_APPS = [
|
|||
"api",
|
||||
# Only for generating documentation, uncomment to run manage.py generate_puml
|
||||
# "puml_generator",
|
||||
# supports necessary headers for Django cross origin
|
||||
"corsheaders",
|
||||
]
|
||||
|
||||
# Middleware are routines for processing web requests.
|
||||
|
@ -127,6 +129,8 @@ INSTALLED_APPS = [
|
|||
MIDDLEWARE = [
|
||||
# django-allow-cidr: enable use of CIDR IP ranges in ALLOWED_HOSTS
|
||||
"allow_cidr.middleware.AllowCIDRMiddleware",
|
||||
# django-cors-headers: listen to cors responses
|
||||
"corsheaders.middleware.CorsMiddleware",
|
||||
# serve static assets in production
|
||||
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||
# provide security enhancements to the request/response cycle
|
||||
|
@ -292,6 +296,11 @@ CSP_DEFAULT_SRC = allowed_sources
|
|||
CSP_FRAME_ANCESTORS = allowed_sources
|
||||
CSP_FORM_ACTION = allowed_sources
|
||||
|
||||
# Cross-Origin Resource Sharing (CORS) configuration
|
||||
# Sets clients that allow access control to manage.get.gov
|
||||
# TODO: remove :8080 to see if we can have all localhost access
|
||||
CORS_ALLOWED_ORIGINS = ["http://localhost:8080", "https://beta.get.gov"]
|
||||
|
||||
|
||||
# Content-Length header is set by django.middleware.common.CommonMiddleware
|
||||
|
||||
|
|
|
@ -53,6 +53,11 @@ class DomainNameserverForm(forms.Form):
|
|||
cleaned_data = super().clean()
|
||||
self.clean_empty_strings(cleaned_data)
|
||||
server = cleaned_data.get("server", "")
|
||||
# remove ANY spaces in the server field
|
||||
server = server.replace(" ", "")
|
||||
# lowercase the server
|
||||
server = server.lower()
|
||||
cleaned_data["server"] = server
|
||||
ip = cleaned_data.get("ip", None)
|
||||
# remove ANY spaces in the ip field
|
||||
ip = ip.replace(" ", "")
|
||||
|
@ -60,9 +65,8 @@ class DomainNameserverForm(forms.Form):
|
|||
|
||||
ip_list = self.extract_ip_list(ip)
|
||||
|
||||
if ip and not server and ip_list:
|
||||
self.add_error("server", NameserverError(code=nsErrorCodes.MISSING_HOST))
|
||||
elif server:
|
||||
# validate if the form has a server or an ip
|
||||
if (ip and ip_list) or server:
|
||||
self.validate_nameserver_ip_combo(domain, server, ip_list)
|
||||
|
||||
return cleaned_data
|
||||
|
@ -95,6 +99,20 @@ class DomainNameserverForm(forms.Form):
|
|||
code=nsErrorCodes.MISSING_IP, nameserver=domain, ip=ip_list
|
||||
),
|
||||
)
|
||||
elif e.code == nsErrorCodes.MISSING_HOST:
|
||||
self.add_error(
|
||||
"server",
|
||||
NameserverError(
|
||||
code=nsErrorCodes.MISSING_HOST, nameserver=domain, ip=ip_list
|
||||
),
|
||||
)
|
||||
elif e.code == nsErrorCodes.INVALID_HOST:
|
||||
self.add_error(
|
||||
"server",
|
||||
NameserverError(
|
||||
code=nsErrorCodes.INVALID_HOST, nameserver=server, ip=ip_list
|
||||
),
|
||||
)
|
||||
else:
|
||||
self.add_error("ip", str(e))
|
||||
|
||||
|
|
56
src/registrar/management/commands/cat_files_into_getgov.py
Normal file
56
src/registrar/management/commands/cat_files_into_getgov.py
Normal file
|
@ -0,0 +1,56 @@
|
|||
"""Loads files from /tmp into our sandboxes"""
|
||||
import glob
|
||||
import logging
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from django.core.management import BaseCommand
|
||||
|
||||
from registrar.management.commands.utility.terminal_helper import TerminalHelper
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Runs the cat command on files from /tmp into the getgov directory."
|
||||
|
||||
def add_arguments(self, parser):
|
||||
"""Add our two filename arguments."""
|
||||
parser.add_argument(
|
||||
"--file_extension",
|
||||
default="txt",
|
||||
help="What file extensions to look for, like txt or gz",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--directory", default="migrationdata", help="Desired directory"
|
||||
)
|
||||
|
||||
def handle(self, **options):
|
||||
file_extension: str = options.get("file_extension").lstrip(".")
|
||||
directory = options.get("directory")
|
||||
helper = TerminalHelper()
|
||||
|
||||
# file_extension is always coerced as str, Truthy is OK to use here.
|
||||
if not file_extension or not isinstance(file_extension, str):
|
||||
raise ValueError(f"Invalid file extension '{file_extension}'")
|
||||
|
||||
matching_files = glob.glob(f"../tmp/*.{file_extension}")
|
||||
if not matching_files:
|
||||
logger.error(f"No files with the extension {file_extension} found")
|
||||
return None
|
||||
|
||||
for src_file_path in matching_files:
|
||||
filename = os.path.basename(src_file_path)
|
||||
|
||||
desired_file_path = os.path.join(directory, filename)
|
||||
if os.path.exists(desired_file_path):
|
||||
# For linter
|
||||
prompt = "Do you want to replace it?"
|
||||
replace = f"{desired_file_path} already exists. {prompt}"
|
||||
if not helper.query_yes_no(replace):
|
||||
continue
|
||||
|
||||
src_file_path = f"../tmp/{filename}"
|
||||
shutil.copy(src_file_path, desired_file_path)
|
|
@ -9,56 +9,14 @@ from django.core.management import BaseCommand
|
|||
|
||||
from registrar.models import TransitionDomain
|
||||
|
||||
from registrar.management.commands.utility.terminal_helper import (
|
||||
TerminalColors,
|
||||
TerminalHelper,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class termColors:
|
||||
"""Colors for terminal outputs
|
||||
(makes reading the logs WAY easier)"""
|
||||
|
||||
HEADER = "\033[95m"
|
||||
OKBLUE = "\033[94m"
|
||||
OKCYAN = "\033[96m"
|
||||
OKGREEN = "\033[92m"
|
||||
YELLOW = "\033[93m"
|
||||
FAIL = "\033[91m"
|
||||
ENDC = "\033[0m"
|
||||
BOLD = "\033[1m"
|
||||
UNDERLINE = "\033[4m"
|
||||
BackgroundLightYellow = "\033[103m"
|
||||
|
||||
|
||||
def query_yes_no(question: str, default="yes") -> bool:
|
||||
"""Ask a yes/no question via raw_input() and return their answer.
|
||||
|
||||
"question" is a string that is presented to the user.
|
||||
"default" is the presumed answer if the user just hits <Enter>.
|
||||
It must be "yes" (the default), "no" or None (meaning
|
||||
an answer is required of the user).
|
||||
|
||||
The "answer" return value is True for "yes" or False for "no".
|
||||
"""
|
||||
valid = {"yes": True, "y": True, "ye": True, "no": False, "n": False}
|
||||
if default is None:
|
||||
prompt = " [y/n] "
|
||||
elif default == "yes":
|
||||
prompt = " [Y/n] "
|
||||
elif default == "no":
|
||||
prompt = " [y/N] "
|
||||
else:
|
||||
raise ValueError("invalid default answer: '%s'" % default)
|
||||
|
||||
while True:
|
||||
logger.info(question + prompt)
|
||||
choice = input().lower()
|
||||
if default is not None and choice == "":
|
||||
return valid[default]
|
||||
elif choice in valid:
|
||||
return valid[choice]
|
||||
else:
|
||||
logger.info("Please respond with 'yes' or 'no' " "(or 'y' or 'n').\n")
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = """Loads data for domains that are in transition
|
||||
(populates transition_domain model objects)."""
|
||||
|
@ -110,20 +68,20 @@ class Command(BaseCommand):
|
|||
or --limitParse are in use"""
|
||||
if debug_on:
|
||||
logger.info(
|
||||
f"""{termColors.OKCYAN}
|
||||
f"""{TerminalColors.OKCYAN}
|
||||
----------DEBUG MODE ON----------
|
||||
Detailed print statements activated.
|
||||
{termColors.ENDC}
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
if debug_max_entries_to_parse > 0:
|
||||
logger.info(
|
||||
f"""{termColors.OKCYAN}
|
||||
f"""{TerminalColors.OKCYAN}
|
||||
----------LIMITER ON----------
|
||||
Parsing of entries will be limited to
|
||||
{debug_max_entries_to_parse} lines per file.")
|
||||
Detailed print statements activated.
|
||||
{termColors.ENDC}
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
|
||||
|
@ -146,7 +104,7 @@ class Command(BaseCommand):
|
|||
) -> defaultdict[str, str]:
|
||||
"""Creates mapping of userId -> emails"""
|
||||
user_emails_dictionary = defaultdict(str)
|
||||
logger.info("Reading domain-contacts data file %s", contacts_filename)
|
||||
logger.info("Reading contacts data file %s", contacts_filename)
|
||||
with open(contacts_filename, "r") as contacts_file:
|
||||
for row in csv.reader(contacts_file, delimiter=sep):
|
||||
user_id = row[0]
|
||||
|
@ -195,7 +153,7 @@ class Command(BaseCommand):
|
|||
", ".join(map(str, duplicate_domain_user_combos))
|
||||
)
|
||||
logger.warning(
|
||||
f"{termColors.YELLOW} No e-mails found for users: {users_without_email_as_string}" # noqa
|
||||
f"{TerminalColors.YELLOW} No e-mails found for users: {users_without_email_as_string}" # noqa
|
||||
)
|
||||
if total_duplicate_pairs > 0 or total_duplicate_domains > 0:
|
||||
duplicate_pairs_as_string = "{}".format(
|
||||
|
@ -205,7 +163,7 @@ class Command(BaseCommand):
|
|||
", ".join(map(str, duplicate_domains))
|
||||
)
|
||||
logger.warning(
|
||||
f"""{termColors.YELLOW}
|
||||
f"""{TerminalColors.YELLOW}
|
||||
|
||||
----DUPLICATES FOUND-----
|
||||
|
||||
|
@ -218,7 +176,7 @@ class Command(BaseCommand):
|
|||
the supplied data files;
|
||||
|
||||
{duplicate_domains_as_string}
|
||||
{termColors.ENDC}"""
|
||||
{TerminalColors.ENDC}"""
|
||||
)
|
||||
|
||||
def print_summary_status_findings(
|
||||
|
@ -237,7 +195,7 @@ class Command(BaseCommand):
|
|||
", ".join(map(str, domains_without_status))
|
||||
)
|
||||
logger.warning(
|
||||
f"""{termColors.YELLOW}
|
||||
f"""{TerminalColors.YELLOW}
|
||||
|
||||
--------------------------------------------
|
||||
Found {total_domains_without_status} domains
|
||||
|
@ -245,7 +203,7 @@ class Command(BaseCommand):
|
|||
---------------------------------------------
|
||||
|
||||
{domains_without_status_as_string}
|
||||
{termColors.ENDC}"""
|
||||
{TerminalColors.ENDC}"""
|
||||
)
|
||||
|
||||
if total_outlier_statuses > 0:
|
||||
|
@ -253,7 +211,7 @@ class Command(BaseCommand):
|
|||
", ".join(map(str, outlier_statuses))
|
||||
) # noqa
|
||||
logger.warning(
|
||||
f"""{termColors.YELLOW}
|
||||
f"""{TerminalColors.YELLOW}
|
||||
|
||||
--------------------------------------------
|
||||
Found {total_outlier_statuses} unaccounted
|
||||
|
@ -264,36 +222,27 @@ class Command(BaseCommand):
|
|||
(defaulted to Ready):
|
||||
|
||||
{domains_without_status_as_string}
|
||||
{termColors.ENDC}"""
|
||||
{TerminalColors.ENDC}"""
|
||||
)
|
||||
|
||||
def print_debug(self, print_condition: bool, print_statement: str):
|
||||
"""This function reduces complexity of debug statements
|
||||
in other functions.
|
||||
It uses the logger to write the given print_statement to the
|
||||
terminal if print_condition is TRUE"""
|
||||
# DEBUG:
|
||||
if print_condition:
|
||||
logger.info(print_statement)
|
||||
|
||||
def prompt_table_reset(self):
|
||||
"""Brings up a prompt in the terminal asking
|
||||
if the user wishes to delete data in the
|
||||
TransitionDomain table. If the user confirms,
|
||||
deletes all the data in the TransitionDomain table"""
|
||||
confirm_reset = query_yes_no(
|
||||
confirm_reset = TerminalHelper.query_yes_no(
|
||||
f"""
|
||||
{termColors.FAIL}
|
||||
{TerminalColors.FAIL}
|
||||
WARNING: Resetting the table will permanently delete all
|
||||
the data!
|
||||
Are you sure you want to continue?{termColors.ENDC}"""
|
||||
Are you sure you want to continue?{TerminalColors.ENDC}"""
|
||||
)
|
||||
if confirm_reset:
|
||||
logger.info(
|
||||
f"""{termColors.YELLOW}
|
||||
f"""{TerminalColors.YELLOW}
|
||||
----------Clearing Table Data----------
|
||||
(please wait)
|
||||
{termColors.ENDC}"""
|
||||
{TerminalColors.ENDC}"""
|
||||
)
|
||||
TransitionDomain.objects.all().delete()
|
||||
|
||||
|
@ -428,18 +377,18 @@ class Command(BaseCommand):
|
|||
)
|
||||
if existing_domain is not None:
|
||||
# DEBUG:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"{termColors.YELLOW} DUPLICATE file entries found for domain: {new_entry_domain_name} {termColors.ENDC}", # noqa
|
||||
f"{TerminalColors.YELLOW} DUPLICATE file entries found for domain: {new_entry_domain_name} {TerminalColors.ENDC}", # noqa
|
||||
)
|
||||
if new_entry_domain_name not in duplicate_domains:
|
||||
duplicate_domains.append(new_entry_domain_name)
|
||||
if existing_domain_user_pair is not None:
|
||||
# DEBUG:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{termColors.YELLOW} DUPLICATE file entries found for domain - user {termColors.BackgroundLightYellow} PAIR {termColors.ENDC}{termColors.YELLOW}:
|
||||
{new_entry_domain_name} - {new_entry_email} {termColors.ENDC}""", # noqa
|
||||
f"""{TerminalColors.YELLOW} DUPLICATE file entries found for domain - user {TerminalColors.BackgroundLightYellow} PAIR {TerminalColors.ENDC}{TerminalColors.YELLOW}:
|
||||
{new_entry_domain_name} - {new_entry_email} {TerminalColors.ENDC}""", # noqa
|
||||
)
|
||||
if existing_domain_user_pair not in duplicate_domain_user_combos:
|
||||
duplicate_domain_user_combos.append(existing_domain_user_pair)
|
||||
|
@ -456,20 +405,20 @@ class Command(BaseCommand):
|
|||
|
||||
if existing_entry.status != new_entry_status:
|
||||
# DEBUG:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"{termColors.OKCYAN}"
|
||||
f"{TerminalColors.OKCYAN}"
|
||||
f"Updating entry: {existing_entry}"
|
||||
f"Status: {existing_entry.status} > {new_entry_status}" # noqa
|
||||
f"Email Sent: {existing_entry.email_sent} > {new_entry_emailSent}" # noqa
|
||||
f"{termColors.ENDC}",
|
||||
f"{TerminalColors.ENDC}",
|
||||
)
|
||||
existing_entry.status = new_entry_status
|
||||
existing_entry.email_sent = new_entry_emailSent
|
||||
existing_entry.save()
|
||||
except TransitionDomain.MultipleObjectsReturned:
|
||||
logger.info(
|
||||
f"{termColors.FAIL}"
|
||||
f"{TerminalColors.FAIL}"
|
||||
f"!!! ERROR: duplicate entries exist in the"
|
||||
f"transtion_domain table for domain:"
|
||||
f"{new_entry_domain_name}"
|
||||
|
@ -488,9 +437,9 @@ class Command(BaseCommand):
|
|||
total_new_entries += 1
|
||||
|
||||
# DEBUG:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"{termColors.OKCYAN} Adding entry {total_new_entries}: {new_entry} {termColors.ENDC}", # noqa
|
||||
f"{TerminalColors.OKCYAN} Adding entry {total_new_entries}: {new_entry} {TerminalColors.ENDC}", # noqa
|
||||
)
|
||||
|
||||
# Check Parse limit and exit loop if needed
|
||||
|
@ -499,20 +448,20 @@ class Command(BaseCommand):
|
|||
and debug_max_entries_to_parse != 0
|
||||
):
|
||||
logger.info(
|
||||
f"{termColors.YELLOW}"
|
||||
f"{TerminalColors.YELLOW}"
|
||||
f"----PARSE LIMIT REACHED. HALTING PARSER.----"
|
||||
f"{termColors.ENDC}"
|
||||
f"{TerminalColors.ENDC}"
|
||||
)
|
||||
break
|
||||
|
||||
TransitionDomain.objects.bulk_create(to_create)
|
||||
|
||||
logger.info(
|
||||
f"""{termColors.OKGREEN}
|
||||
f"""{TerminalColors.OKGREEN}
|
||||
============= FINISHED ===============
|
||||
Created {total_new_entries} transition domain entries,
|
||||
updated {total_updated_domain_entries} transition domain entries
|
||||
{termColors.ENDC}
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
|
||||
|
|
540
src/registrar/management/commands/master_domain_migrations.py
Normal file
540
src/registrar/management/commands/master_domain_migrations.py
Normal file
|
@ -0,0 +1,540 @@
|
|||
"""Data migration:
|
||||
1 - generates a report of data integrity across all
|
||||
transition domain related tables
|
||||
2 - allows users to run all migration scripts for
|
||||
transition domain data
|
||||
"""
|
||||
|
||||
import logging
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from django.core.management import BaseCommand
|
||||
from django.core.management import call_command
|
||||
|
||||
from registrar.models import (
|
||||
Domain,
|
||||
DomainInformation,
|
||||
DomainInvitation,
|
||||
TransitionDomain,
|
||||
)
|
||||
|
||||
from registrar.management.commands.utility.terminal_helper import (
|
||||
TerminalColors,
|
||||
TerminalHelper,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = """ """
|
||||
|
||||
def add_arguments(self, parser):
|
||||
"""
|
||||
OPTIONAL ARGUMENTS:
|
||||
--runMigrations
|
||||
Triggers running all scripts (in sequence)
|
||||
for transition domain migrations
|
||||
|
||||
--migrationDirectory
|
||||
The location of the files used for load_transition_domain migration script
|
||||
EXAMPLE USAGE:
|
||||
> --migrationDirectory /app/tmp
|
||||
|
||||
--migrationFilenames
|
||||
The files used for load_transition_domain migration script.
|
||||
Must appear IN ORDER and comma-delimiteds:
|
||||
EXAMPLE USAGE:
|
||||
> --migrationFilenames domain_contacts_filename.txt,contacts_filename.txt,domain_statuses_filename.txt
|
||||
where...
|
||||
- domain_contacts_filename is the Data file with domain contact information
|
||||
- contacts_filename is the Data file with contact information
|
||||
- domain_statuses_filename is the Data file with domain status information
|
||||
|
||||
--sep
|
||||
Delimiter for the migration scripts to correctly parse the given text files.
|
||||
(usually this can remain at default value of |)
|
||||
|
||||
--debug
|
||||
Activates additional print statements
|
||||
|
||||
--prompt
|
||||
Activates terminal prompts that allows
|
||||
the user to step through each portion of this
|
||||
script.
|
||||
|
||||
--limitParse
|
||||
Used by the migration scripts (load_transition_domain) to set the limit for the
|
||||
number of data entries to insert. Set to 0 (or just don't use this
|
||||
argument) to parse every entry. This was provided primarily for testing
|
||||
purposes
|
||||
|
||||
--resetTable
|
||||
Used by the migration scripts to trigger a prompt for deleting all table entries.
|
||||
Useful for testing purposes, but USE WITH CAUTION
|
||||
""" # noqa - line length, impacts readability
|
||||
|
||||
parser.add_argument(
|
||||
"--runMigrations",
|
||||
help="Runs all scripts (in sequence) for transition domain migrations",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
)
|
||||
|
||||
# --triggerLogins
|
||||
# A boolean (default to true), which triggers running
|
||||
# simulations of user logins for each user in domain invitation
|
||||
parser.add_argument(
|
||||
"--triggerLogins",
|
||||
help="Simulates a user login for each user in domain invitation",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
)
|
||||
|
||||
# The following file arguments have default values for running in the sandbox
|
||||
parser.add_argument(
|
||||
"--migrationDirectory",
|
||||
default="migrationdata",
|
||||
help=(
|
||||
"The location of the files used for"
|
||||
"load_transition_domain migration script"
|
||||
),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--migrationFilenames",
|
||||
default="escrow_domain_contacts.daily.gov.GOV.txt,"
|
||||
"escrow_contacts.daily.gov.GOV.txt,"
|
||||
"escrow_domain_statuses.daily.gov.GOV.txt",
|
||||
help="""The files used for load_transition_domain migration script.
|
||||
Must appear IN ORDER and separated by commas:
|
||||
domain_contacts_filename.txt,contacts_filename.txt,domain_statuses_filename.txt
|
||||
|
||||
where...
|
||||
- domain_contacts_filename is the Data file with domain contact
|
||||
information
|
||||
- contacts_filename is the Data file with contact information
|
||||
- domain_statuses_filename is the Data file with domain status
|
||||
information""",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--sep", default="|", help="Delimiter character for the migration files"
|
||||
)
|
||||
|
||||
parser.add_argument("--debug", action=argparse.BooleanOptionalAction)
|
||||
|
||||
parser.add_argument("--prompt", action=argparse.BooleanOptionalAction)
|
||||
|
||||
parser.add_argument(
|
||||
"--limitParse", default=0, help="Sets max number of entries to load"
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--resetTable",
|
||||
help="Deletes all data in the TransitionDomain table",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
)
|
||||
|
||||
def compare_tables(self, debug_on: bool):
|
||||
"""Does a diff between the transition_domain and the following tables:
|
||||
domain, domain_information and the domain_invitation.
|
||||
|
||||
Produces the following report (printed to the terminal):
|
||||
#1 - Print any domains that exist in the transition_domain table
|
||||
but not in their corresponding domain, domain information or
|
||||
domain invitation tables.
|
||||
#2 - Print which table this domain is missing from
|
||||
#3- Check for duplicate entries in domain or
|
||||
domain_information tables and print which are
|
||||
duplicates and in which tables
|
||||
"""
|
||||
|
||||
logger.info(
|
||||
f"""{TerminalColors.OKCYAN}
|
||||
============= BEGINNING ANALYSIS ===============
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
|
||||
# TODO: would filteredRelation be faster?
|
||||
|
||||
missing_domains = []
|
||||
duplicate_domains = []
|
||||
missing_domain_informations = []
|
||||
missing_domain_invites = []
|
||||
for transition_domain in TransitionDomain.objects.all(): # DEBUG:
|
||||
transition_domain_name = transition_domain.domain_name
|
||||
transition_domain_email = transition_domain.username
|
||||
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"{TerminalColors.OKCYAN}Checking: {transition_domain_name} {TerminalColors.ENDC}", # noqa
|
||||
)
|
||||
|
||||
# Check Domain table
|
||||
matching_domains = Domain.objects.filter(name=transition_domain_name)
|
||||
# Check Domain Information table
|
||||
matching_domain_informations = DomainInformation.objects.filter(
|
||||
domain__name=transition_domain_name
|
||||
)
|
||||
# Check Domain Invitation table
|
||||
matching_domain_invitations = DomainInvitation.objects.filter(
|
||||
email=transition_domain_email.lower(),
|
||||
domain__name=transition_domain_name,
|
||||
)
|
||||
|
||||
if len(matching_domains) == 0:
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{TerminalColors.YELLOW}Missing Domain{TerminalColors.ENDC}""",
|
||||
)
|
||||
missing_domains.append(transition_domain_name)
|
||||
elif len(matching_domains) > 1:
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{TerminalColors.YELLOW}Duplicate Domain{TerminalColors.ENDC}""",
|
||||
)
|
||||
duplicate_domains.append(transition_domain_name)
|
||||
if len(matching_domain_informations) == 0:
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{TerminalColors.YELLOW}Missing Domain Information
|
||||
{TerminalColors.ENDC}""",
|
||||
)
|
||||
missing_domain_informations.append(transition_domain_name)
|
||||
if len(matching_domain_invitations) == 0:
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{TerminalColors.YELLOW}Missing Domain Invitation
|
||||
{TerminalColors.ENDC}""",
|
||||
)
|
||||
missing_domain_invites.append(transition_domain_name)
|
||||
|
||||
total_missing_domains = len(missing_domains)
|
||||
total_duplicate_domains = len(duplicate_domains)
|
||||
total_missing_domain_informations = len(missing_domain_informations)
|
||||
total_missing_domain_invitations = len(missing_domain_invites)
|
||||
|
||||
missing_domains_as_string = "{}".format(", ".join(map(str, missing_domains)))
|
||||
duplicate_domains_as_string = "{}".format(
|
||||
", ".join(map(str, duplicate_domains))
|
||||
)
|
||||
missing_domain_informations_as_string = "{}".format(
|
||||
", ".join(map(str, missing_domain_informations))
|
||||
)
|
||||
missing_domain_invites_as_string = "{}".format(
|
||||
", ".join(map(str, missing_domain_invites))
|
||||
)
|
||||
|
||||
logger.info(
|
||||
f"""{TerminalColors.OKGREEN}
|
||||
============= FINISHED ANALYSIS ===============
|
||||
|
||||
{total_missing_domains} Missing Domains:
|
||||
(These are transition domains that are missing from the Domain Table)
|
||||
{TerminalColors.YELLOW}{missing_domains_as_string}
|
||||
{TerminalColors.OKGREEN}
|
||||
{total_duplicate_domains} Duplicate Domains:
|
||||
(These are transition domains which have duplicate
|
||||
entries in the Domain Table)
|
||||
{TerminalColors.YELLOW}{duplicate_domains_as_string}
|
||||
{TerminalColors.OKGREEN}
|
||||
{total_missing_domain_informations} Domain Information Entries missing:
|
||||
(These are transition domains which have no entries
|
||||
in the Domain Information Table)
|
||||
{TerminalColors.YELLOW}{missing_domain_informations_as_string}
|
||||
{TerminalColors.OKGREEN}
|
||||
{total_missing_domain_invitations} Domain Invitations missing:
|
||||
(These are transition domains which have no entires in
|
||||
the Domain Invitation Table)
|
||||
{TerminalColors.YELLOW}{missing_domain_invites_as_string}
|
||||
{TerminalColors.OKGREEN}
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
|
||||
def run_load_transition_domain_script(
|
||||
self,
|
||||
file_location: str,
|
||||
domain_contacts_filename: str,
|
||||
contacts_filename: str,
|
||||
domain_statuses_filename: str,
|
||||
sep: str,
|
||||
reset_table: bool,
|
||||
debug_on: bool,
|
||||
prompts_enabled: bool,
|
||||
debug_max_entries_to_parse: int,
|
||||
):
|
||||
"""Runs the load_transition_domain script"""
|
||||
# Create the command string
|
||||
command_script = "load_transition_domain"
|
||||
command_string = (
|
||||
f"./manage.py {command_script} "
|
||||
f"{file_location+domain_contacts_filename} "
|
||||
f"{file_location+contacts_filename} "
|
||||
f"{file_location+domain_statuses_filename} "
|
||||
)
|
||||
if sep is not None and sep != "|":
|
||||
command_string += f"--sep {sep} "
|
||||
if reset_table:
|
||||
command_string += "--resetTable "
|
||||
if debug_on:
|
||||
command_string += "--debug "
|
||||
if debug_max_entries_to_parse > 0:
|
||||
command_string += f"--limitParse {debug_max_entries_to_parse} "
|
||||
|
||||
# Execute the command string
|
||||
if prompts_enabled:
|
||||
system_exit_on_terminate = True
|
||||
TerminalHelper.prompt_for_execution(
|
||||
system_exit_on_terminate,
|
||||
command_string,
|
||||
"Running load_transition_domain script",
|
||||
)
|
||||
|
||||
# TODO: make this somehow run inside TerminalHelper prompt
|
||||
call_command(
|
||||
command_script,
|
||||
f"{file_location+domain_contacts_filename}",
|
||||
f"{file_location+contacts_filename}",
|
||||
f"{file_location+domain_statuses_filename}",
|
||||
sep=sep,
|
||||
resetTable=reset_table,
|
||||
debug=debug_on,
|
||||
limitParse=debug_max_entries_to_parse,
|
||||
)
|
||||
|
||||
def run_transfer_script(self, debug_on: bool, prompts_enabled: bool):
|
||||
"""Runs the transfer_transition_domains_to_domains script"""
|
||||
# Create the command string
|
||||
command_script = "transfer_transition_domains_to_domains"
|
||||
command_string = f"./manage.py {command_script}"
|
||||
if debug_on:
|
||||
command_string += "--debug "
|
||||
# Execute the command string
|
||||
if prompts_enabled:
|
||||
system_exit_on_terminate = True
|
||||
TerminalHelper.prompt_for_execution(
|
||||
system_exit_on_terminate,
|
||||
command_string,
|
||||
"Running transfer_transition_domains_to_domains script",
|
||||
)
|
||||
|
||||
# TODO: make this somehow run inside TerminalHelper prompt
|
||||
call_command(command_script)
|
||||
|
||||
def run_send_invites_script(self, debug_on: bool, prompts_enabled: bool):
|
||||
"""Runs the send_domain_invitations script"""
|
||||
# Create the command string...
|
||||
command_script = "send_domain_invitations"
|
||||
command_string = f"./manage.py {command_script} -s"
|
||||
# Execute the command string
|
||||
if prompts_enabled:
|
||||
system_exit_on_terminate = True
|
||||
TerminalHelper.prompt_for_execution(
|
||||
system_exit_on_terminate,
|
||||
command_string,
|
||||
"Running send_domain_invitations script",
|
||||
)
|
||||
|
||||
# TODO: make this somehow run inside TerminalHelper prompt
|
||||
call_command(command_script, send_emails=True)
|
||||
|
||||
def run_migration_scripts(
|
||||
self,
|
||||
file_location,
|
||||
domain_contacts_filename,
|
||||
contacts_filename,
|
||||
domain_statuses_filename,
|
||||
sep,
|
||||
reset_table,
|
||||
debug_on,
|
||||
prompts_enabled,
|
||||
debug_max_entries_to_parse,
|
||||
):
|
||||
"""Runs the following migration scripts (in order):
|
||||
1 - imports for trans domains
|
||||
2 - transfer to domain & domain invitation"""
|
||||
|
||||
if prompts_enabled:
|
||||
# Allow the user to inspect the filepath
|
||||
# data given in the arguments, and prompt
|
||||
# the user to verify this info before proceeding
|
||||
files_are_correct = TerminalHelper.query_yes_no(
|
||||
f"""
|
||||
{TerminalColors.OKCYAN}
|
||||
*** IMPORTANT: VERIFY THE FOLLOWING ***
|
||||
|
||||
The migration scripts are looking in directory....
|
||||
{file_location}
|
||||
|
||||
....for the following files:
|
||||
- domain contacts: {domain_contacts_filename}
|
||||
- contacts: {contacts_filename}
|
||||
- domain statuses: {domain_statuses_filename}
|
||||
|
||||
{TerminalColors.FAIL}
|
||||
Does this look correct?{TerminalColors.ENDC}"""
|
||||
)
|
||||
|
||||
# If the user rejected the filepath information
|
||||
# as incorrect, prompt the user to provide
|
||||
# correct file inputs in their original command
|
||||
# prompt and exit this subroutine
|
||||
if not files_are_correct:
|
||||
logger.info(
|
||||
f"""
|
||||
{TerminalColors.YELLOW}
|
||||
PLEASE Re-Run the script with the correct
|
||||
file location and filenames:
|
||||
"""
|
||||
)
|
||||
return
|
||||
|
||||
# Proceed executing the migration scripts
|
||||
self.run_load_transition_domain_script(
|
||||
file_location,
|
||||
domain_contacts_filename,
|
||||
contacts_filename,
|
||||
domain_statuses_filename,
|
||||
sep,
|
||||
reset_table,
|
||||
debug_on,
|
||||
prompts_enabled,
|
||||
debug_max_entries_to_parse,
|
||||
)
|
||||
self.run_transfer_script(debug_on, prompts_enabled)
|
||||
|
||||
def handle(
|
||||
self,
|
||||
**options,
|
||||
):
|
||||
"""
|
||||
Does the following;
|
||||
1 - run migration scripts
|
||||
2 - simulate logins
|
||||
3 - send domain invitations (Emails should be sent to the appropriate users
|
||||
note that all moved domains should now be accessible
|
||||
on django admin for an analyst)
|
||||
4 - analyze the data for transition domains
|
||||
and generate a report
|
||||
"""
|
||||
|
||||
# SETUP
|
||||
# Grab all arguments relevant to
|
||||
# orchestrating which parts of this script
|
||||
# should execute. Print some indicators to
|
||||
# the terminal so the user knows what is
|
||||
# enabled.
|
||||
|
||||
# Get arguments
|
||||
debug_on = options.get("debug")
|
||||
prompts_enabled = options.get("prompt")
|
||||
run_migrations_enabled = options.get("runMigrations")
|
||||
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{TerminalColors.OKCYAN}
|
||||
----------DEBUG MODE ON----------
|
||||
Detailed print statements activated.
|
||||
{TerminalColors.ENDC}
|
||||
""",
|
||||
)
|
||||
TerminalHelper.print_conditional(
|
||||
run_migrations_enabled,
|
||||
f"""{TerminalColors.OKCYAN}
|
||||
----------RUNNING MIGRATIONS ON----------
|
||||
All migration scripts will be run before
|
||||
analyzing the data.
|
||||
{TerminalColors.ENDC}
|
||||
""",
|
||||
)
|
||||
TerminalHelper.print_conditional(
|
||||
run_migrations_enabled,
|
||||
f"""{TerminalColors.OKCYAN}
|
||||
----------TRIGGER LOGINS ON----------
|
||||
Will be simulating user logins
|
||||
{TerminalColors.ENDC}
|
||||
""",
|
||||
)
|
||||
|
||||
# If a user decides to run all migration
|
||||
# scripts, they may or may not wish to
|
||||
# proceed with analysis of the data depending
|
||||
# on the results of the migration.
|
||||
# Provide a breakpoint for them to decide
|
||||
# whether to continue or not.
|
||||
# The same will happen if simulating user
|
||||
# logins (to allow users to run only that
|
||||
# portion of the script if desired)
|
||||
prompt_continuation_of_analysis = False
|
||||
|
||||
# STEP 1 -- RUN MIGRATIONS
|
||||
# Run migration scripts if specified by user
|
||||
if run_migrations_enabled:
|
||||
# grab arguments for running migrations
|
||||
sep = options.get("sep")
|
||||
reset_table = options.get("resetTable")
|
||||
debug_max_entries_to_parse = int(options.get("limitParse"))
|
||||
|
||||
# Grab filepath information from the arguments
|
||||
file_location = options.get("migrationDirectory") + "/"
|
||||
filenames = options.get("migrationFilenames").split(",")
|
||||
if len(filenames) < 3:
|
||||
filenames_as_string = "{}".format(", ".join(map(str, filenames)))
|
||||
logger.info(
|
||||
f"""
|
||||
{TerminalColors.FAIL}
|
||||
--migrationFilenames expected 3 filenames to follow it,
|
||||
but only {len(filenames)} were given:
|
||||
{filenames_as_string}
|
||||
|
||||
PLEASE MODIFY THE SCRIPT AND TRY RUNNING IT AGAIN
|
||||
============= TERMINATING =============
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
sys.exit()
|
||||
domain_contacts_filename = filenames[0]
|
||||
contacts_filename = filenames[1]
|
||||
domain_statuses_filename = filenames[2]
|
||||
|
||||
# Run migration scripts
|
||||
self.run_migration_scripts(
|
||||
file_location,
|
||||
domain_contacts_filename,
|
||||
contacts_filename,
|
||||
domain_statuses_filename,
|
||||
sep,
|
||||
reset_table,
|
||||
debug_on,
|
||||
prompts_enabled,
|
||||
debug_max_entries_to_parse,
|
||||
)
|
||||
prompt_continuation_of_analysis = True
|
||||
|
||||
# STEP 2 -- SEND INVITES
|
||||
proceed_with_sending_invites = run_migrations_enabled
|
||||
if prompts_enabled and run_migrations_enabled:
|
||||
proceed_with_sending_invites = TerminalHelper.query_yes_no(
|
||||
f"""{TerminalColors.FAIL}
|
||||
Proceed with sending user invites for all transition domains?
|
||||
(Y = proceed, N = skip)
|
||||
{TerminalColors.ENDC}"""
|
||||
)
|
||||
if proceed_with_sending_invites:
|
||||
self.run_send_invites_script(debug_on, prompts_enabled)
|
||||
prompt_continuation_of_analysis = True
|
||||
|
||||
# STEP 3 -- ANALYZE TABLES & GENERATE REPORT
|
||||
# Analyze tables for corrupt data...
|
||||
if prompt_continuation_of_analysis and prompts_enabled:
|
||||
# ^ (only prompt if we ran steps 1 and/or 2)
|
||||
analyze_tables = TerminalHelper.query_yes_no(
|
||||
f"""{TerminalColors.FAIL}
|
||||
Proceed with table analysis?
|
||||
(Y = proceed, N = exit)
|
||||
{TerminalColors.ENDC}"""
|
||||
)
|
||||
if not analyze_tables:
|
||||
return
|
||||
self.compare_tables(debug_on)
|
|
@ -45,8 +45,10 @@ class Command(BaseCommand):
|
|||
self.transition_domains = TransitionDomain.objects.filter(
|
||||
email_sent=False,
|
||||
).order_by("username")
|
||||
logger.info("Found %d transition domains", len(self.transition_domains))
|
||||
|
||||
self.build_emails_to_send_array()
|
||||
logger.info("Prepared %d emails to send", len(self.emails_to_send))
|
||||
|
||||
if options["send_emails"]:
|
||||
logger.info("about to send emails")
|
||||
|
@ -58,6 +60,12 @@ class Command(BaseCommand):
|
|||
logger.info("done sending emails and updating transition_domains")
|
||||
else:
|
||||
logger.info("not sending emails")
|
||||
for email_context in self.emails_to_send:
|
||||
logger.info(
|
||||
"would send email to %s for %s",
|
||||
email_context["email"],
|
||||
email_context["domains"],
|
||||
)
|
||||
|
||||
def build_emails_to_send_array(self):
|
||||
"""this method sends emails to distinct usernames"""
|
||||
|
|
|
@ -10,25 +10,14 @@ from registrar.models import TransitionDomain
|
|||
from registrar.models import Domain
|
||||
from registrar.models import DomainInvitation
|
||||
|
||||
from registrar.management.commands.utility.terminal_helper import (
|
||||
TerminalColors,
|
||||
TerminalHelper,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class termColors:
|
||||
"""Colors for terminal outputs
|
||||
(makes reading the logs WAY easier)"""
|
||||
|
||||
HEADER = "\033[95m"
|
||||
OKBLUE = "\033[94m"
|
||||
OKCYAN = "\033[96m"
|
||||
OKGREEN = "\033[92m"
|
||||
YELLOW = "\033[93m"
|
||||
FAIL = "\033[91m"
|
||||
ENDC = "\033[0m"
|
||||
BOLD = "\033[1m"
|
||||
UNDERLINE = "\033[4m"
|
||||
BackgroundLightYellow = "\033[103m"
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = """Load data from transition domain tables
|
||||
into main domain tables. Also create domain invitation
|
||||
|
@ -49,34 +38,25 @@ class Command(BaseCommand):
|
|||
):
|
||||
"""Prints additional terminal statements to indicate if --debug
|
||||
or --limitParse are in use"""
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{termColors.OKCYAN}
|
||||
f"""{TerminalColors.OKCYAN}
|
||||
----------DEBUG MODE ON----------
|
||||
Detailed print statements activated.
|
||||
{termColors.ENDC}
|
||||
{TerminalColors.ENDC}
|
||||
""",
|
||||
)
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_max_entries_to_parse > 0,
|
||||
f"""{termColors.OKCYAN}
|
||||
f"""{TerminalColors.OKCYAN}
|
||||
----------LIMITER ON----------
|
||||
Parsing of entries will be limited to
|
||||
{debug_max_entries_to_parse} lines per file.")
|
||||
Detailed print statements activated.
|
||||
{termColors.ENDC}
|
||||
{TerminalColors.ENDC}
|
||||
""",
|
||||
)
|
||||
|
||||
def print_debug(self, print_condition: bool, print_statement: str):
|
||||
"""This function reduces complexity of debug statements
|
||||
in other functions.
|
||||
It uses the logger to write the given print_statement to the
|
||||
terminal if print_condition is TRUE"""
|
||||
# DEBUG:
|
||||
if print_condition:
|
||||
logger.info(print_statement)
|
||||
|
||||
def update_domain_status(
|
||||
self, transition_domain: TransitionDomain, target_domain: Domain, debug_on: bool
|
||||
) -> bool:
|
||||
|
@ -96,13 +76,13 @@ class Command(BaseCommand):
|
|||
target_domain.save()
|
||||
|
||||
# DEBUG:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{termColors.YELLOW}
|
||||
f"""{TerminalColors.YELLOW}
|
||||
>> Updated {target_domain.name} state from
|
||||
'{existing_status}' to '{target_domain.state}'
|
||||
(no domain invitation entry added)
|
||||
{termColors.ENDC}""",
|
||||
{TerminalColors.ENDC}""",
|
||||
)
|
||||
return True
|
||||
return False
|
||||
|
@ -123,22 +103,22 @@ class Command(BaseCommand):
|
|||
total_domain_invitation_entries = len(domain_invitations_to_create)
|
||||
|
||||
logger.info(
|
||||
f"""{termColors.OKGREEN}
|
||||
f"""{TerminalColors.OKGREEN}
|
||||
============= FINISHED ===============
|
||||
Created {total_new_entries} transition domain entries,
|
||||
Updated {total_updated_domain_entries} transition domain entries
|
||||
Created {total_new_entries} domain entries,
|
||||
Updated {total_updated_domain_entries} domain entries
|
||||
|
||||
Created {total_domain_invitation_entries} domain invitation entries
|
||||
(NOTE: no invitations are SENT in this script)
|
||||
{termColors.ENDC}
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
if len(skipped_domain_entries) > 0:
|
||||
logger.info(
|
||||
f"""{termColors.FAIL}
|
||||
f"""{TerminalColors.FAIL}
|
||||
============= SKIPPED DOMAINS (ERRORS) ===============
|
||||
{skipped_domain_entries}
|
||||
{termColors.ENDC}
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
|
||||
|
@ -151,25 +131,25 @@ class Command(BaseCommand):
|
|||
skipped_domain_invitations.remove(domain_invite.domain)
|
||||
if len(skipped_domain_invitations) > 0:
|
||||
logger.info(
|
||||
f"""{termColors.FAIL}
|
||||
f"""{TerminalColors.FAIL}
|
||||
============= SKIPPED DOMAIN INVITATIONS (ERRORS) ===============
|
||||
{skipped_domain_invitations}
|
||||
{termColors.ENDC}
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
|
||||
# DEBUG:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{termColors.YELLOW}
|
||||
|
||||
f"""{TerminalColors.YELLOW}
|
||||
======= DEBUG OUTPUT =======
|
||||
Created Domains:
|
||||
{domains_to_create}
|
||||
|
||||
Updated Domains:
|
||||
{updated_domain_entries}
|
||||
|
||||
{termColors.ENDC}
|
||||
{TerminalColors.ENDC}
|
||||
""",
|
||||
)
|
||||
|
||||
|
@ -184,7 +164,7 @@ class Command(BaseCommand):
|
|||
if associated_domain is None:
|
||||
logger.warning(
|
||||
f"""
|
||||
{termColors.FAIL}
|
||||
{TerminalColors.FAIL}
|
||||
!!! ERROR: Domain cannot be null for a
|
||||
Domain Invitation object!
|
||||
|
||||
|
@ -241,11 +221,11 @@ class Command(BaseCommand):
|
|||
total_rows_parsed = 0
|
||||
|
||||
logger.info(
|
||||
f"""{termColors.OKGREEN}
|
||||
f"""{TerminalColors.OKGREEN}
|
||||
==========================
|
||||
Beginning Data Transfer
|
||||
==========================
|
||||
{termColors.ENDC}"""
|
||||
{TerminalColors.ENDC}"""
|
||||
)
|
||||
|
||||
for transition_domain in TransitionDomain.objects.all():
|
||||
|
@ -254,11 +234,11 @@ class Command(BaseCommand):
|
|||
transition_domain_email = transition_domain.username
|
||||
|
||||
# DEBUG:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{termColors.OKCYAN}
|
||||
f"""{TerminalColors.OKCYAN}
|
||||
Processing Transition Domain: {transition_domain_name}, {transition_domain_status}, {transition_domain_email}
|
||||
{termColors.ENDC}""", # noqa
|
||||
{TerminalColors.ENDC}""", # noqa
|
||||
)
|
||||
|
||||
new_domain_invitation = None
|
||||
|
@ -269,11 +249,11 @@ class Command(BaseCommand):
|
|||
# get the existing domain
|
||||
domain_to_update = Domain.objects.get(name=transition_domain_name)
|
||||
# DEBUG:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{termColors.YELLOW}
|
||||
f"""{TerminalColors.YELLOW}
|
||||
> Found existing entry in Domain table for: {transition_domain_name}, {domain_to_update.state}
|
||||
{termColors.ENDC}""", # noqa
|
||||
{TerminalColors.ENDC}""", # noqa
|
||||
)
|
||||
|
||||
# for existing entry, update the status to
|
||||
|
@ -300,7 +280,7 @@ class Command(BaseCommand):
|
|||
# immediate attention.
|
||||
logger.warning(
|
||||
f"""
|
||||
{termColors.FAIL}
|
||||
{TerminalColors.FAIL}
|
||||
!!! ERROR: duplicate entries already exist in the
|
||||
Domain table for the following domain:
|
||||
{transition_domain_name}
|
||||
|
@ -316,7 +296,7 @@ class Command(BaseCommand):
|
|||
except TransitionNotAllowed as err:
|
||||
skipped_domain_entries.append(transition_domain_name)
|
||||
logger.warning(
|
||||
f"""{termColors.FAIL}
|
||||
f"""{TerminalColors.FAIL}
|
||||
Unable to change state for {transition_domain_name}
|
||||
|
||||
RECOMMENDATION:
|
||||
|
@ -343,15 +323,15 @@ class Command(BaseCommand):
|
|||
None,
|
||||
)
|
||||
if existing_domain_in_to_create is not None:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"""{termColors.YELLOW}
|
||||
f"""{TerminalColors.YELLOW}
|
||||
Duplicate Detected: {transition_domain_name}.
|
||||
Cannot add duplicate entry for another username.
|
||||
Violates Unique Key constraint.
|
||||
|
||||
Checking for unique user e-mail for Domain Invitations...
|
||||
{termColors.ENDC}""",
|
||||
{TerminalColors.ENDC}""",
|
||||
)
|
||||
new_domain_invitation = self.try_add_domain_invitation(
|
||||
transition_domain_email, existing_domain_in_to_create
|
||||
|
@ -363,9 +343,9 @@ class Command(BaseCommand):
|
|||
)
|
||||
domains_to_create.append(new_domain)
|
||||
# DEBUG:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"{termColors.OKCYAN} Adding domain: {new_domain} {termColors.ENDC}", # noqa
|
||||
f"{TerminalColors.OKCYAN} Adding domain: {new_domain} {TerminalColors.ENDC}", # noqa
|
||||
)
|
||||
new_domain_invitation = self.try_add_domain_invitation(
|
||||
transition_domain_email, new_domain
|
||||
|
@ -373,14 +353,14 @@ class Command(BaseCommand):
|
|||
|
||||
if new_domain_invitation is None:
|
||||
logger.info(
|
||||
f"{termColors.YELLOW} ! No new e-mail detected !" # noqa
|
||||
f"(SKIPPED ADDING DOMAIN INVITATION){termColors.ENDC}"
|
||||
f"{TerminalColors.YELLOW} ! No new e-mail detected !" # noqa
|
||||
f"(SKIPPED ADDING DOMAIN INVITATION){TerminalColors.ENDC}"
|
||||
)
|
||||
else:
|
||||
# DEBUG:
|
||||
self.print_debug(
|
||||
TerminalHelper.print_conditional(
|
||||
debug_on,
|
||||
f"{termColors.OKCYAN} Adding domain invitation: {new_domain_invitation} {termColors.ENDC}", # noqa
|
||||
f"{TerminalColors.OKCYAN} Adding domain invitation: {new_domain_invitation} {TerminalColors.ENDC}", # noqa
|
||||
)
|
||||
domain_invitations_to_create.append(new_domain_invitation)
|
||||
|
||||
|
@ -390,9 +370,9 @@ class Command(BaseCommand):
|
|||
and total_rows_parsed >= debug_max_entries_to_parse
|
||||
):
|
||||
logger.info(
|
||||
f"""{termColors.YELLOW}
|
||||
f"""{TerminalColors.YELLOW}
|
||||
----PARSE LIMIT REACHED. HALTING PARSER.----
|
||||
{termColors.ENDC}
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
break
|
||||
|
|
102
src/registrar/management/commands/utility/terminal_helper.py
Normal file
102
src/registrar/management/commands/utility/terminal_helper.py
Normal file
|
@ -0,0 +1,102 @@
|
|||
import logging
|
||||
import sys
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TerminalColors:
|
||||
"""Colors for terminal outputs
|
||||
(makes reading the logs WAY easier)"""
|
||||
|
||||
HEADER = "\033[95m"
|
||||
OKBLUE = "\033[94m"
|
||||
OKCYAN = "\033[96m"
|
||||
OKGREEN = "\033[92m"
|
||||
YELLOW = "\033[93m"
|
||||
MAGENTA = "\033[35m"
|
||||
FAIL = "\033[91m"
|
||||
ENDC = "\033[0m"
|
||||
BOLD = "\033[1m"
|
||||
UNDERLINE = "\033[4m"
|
||||
BackgroundLightYellow = "\033[103m"
|
||||
|
||||
|
||||
class TerminalHelper:
|
||||
@staticmethod
|
||||
def query_yes_no(question: str, default="yes") -> bool:
|
||||
"""Ask a yes/no question via raw_input() and return their answer.
|
||||
|
||||
"question" is a string that is presented to the user.
|
||||
"default" is the presumed answer if the user just hits <Enter>.
|
||||
It must be "yes" (the default), "no" or None (meaning
|
||||
an answer is required of the user).
|
||||
|
||||
The "answer" return value is True for "yes" or False for "no".
|
||||
"""
|
||||
valid = {"yes": True, "y": True, "ye": True, "no": False, "n": False}
|
||||
if default is None:
|
||||
prompt = " [y/n] "
|
||||
elif default == "yes":
|
||||
prompt = " [Y/n] "
|
||||
elif default == "no":
|
||||
prompt = " [y/N] "
|
||||
else:
|
||||
raise ValueError("invalid default answer: '%s'" % default)
|
||||
|
||||
while True:
|
||||
logger.info(question + prompt)
|
||||
choice = input().lower()
|
||||
if default is not None and choice == "":
|
||||
return valid[default]
|
||||
elif choice in valid:
|
||||
return valid[choice]
|
||||
else:
|
||||
logger.info("Please respond with 'yes' or 'no' " "(or 'y' or 'n').\n")
|
||||
|
||||
@staticmethod
|
||||
def print_conditional(print_condition: bool, print_statement: str):
|
||||
"""This function reduces complexity of debug statements
|
||||
in other functions.
|
||||
It uses the logger to write the given print_statement to the
|
||||
terminal if print_condition is TRUE"""
|
||||
# DEBUG:
|
||||
if print_condition:
|
||||
logger.info(print_statement)
|
||||
|
||||
@staticmethod
|
||||
def prompt_for_execution(
|
||||
system_exit_on_terminate: bool, info_to_inspect: str, prompt_title: str
|
||||
) -> bool:
|
||||
"""Create to reduce code complexity.
|
||||
Prompts the user to inspect the given string
|
||||
and asks if they wish to proceed.
|
||||
Returns true if the user responds (y),
|
||||
Returns false if the user responds (n)"""
|
||||
|
||||
action_description_for_selecting_no = "skip"
|
||||
if system_exit_on_terminate:
|
||||
action_description_for_selecting_no = "exit"
|
||||
|
||||
# Allow the user to inspect the command string
|
||||
# and ask if they wish to proceed
|
||||
proceed_execution = TerminalHelper.query_yes_no(
|
||||
f"""{TerminalColors.OKCYAN}
|
||||
=====================================================
|
||||
{prompt_title}
|
||||
=====================================================
|
||||
*** IMPORTANT: VERIFY THE FOLLOWING LOOKS CORRECT ***
|
||||
|
||||
{info_to_inspect}
|
||||
{TerminalColors.FAIL}
|
||||
Proceed? (Y = proceed, N = {action_description_for_selecting_no})
|
||||
{TerminalColors.ENDC}"""
|
||||
)
|
||||
|
||||
# If the user decided to proceed return true.
|
||||
# Otherwise, either return false or exit this subroutine.
|
||||
if not proceed_execution:
|
||||
if system_exit_on_terminate:
|
||||
sys.exit()
|
||||
return False
|
||||
|
||||
return True
|
|
@ -3,7 +3,6 @@ import logging
|
|||
import ipaddress
|
||||
import re
|
||||
from datetime import date
|
||||
from string import digits
|
||||
from typing import Optional
|
||||
|
||||
from django_fsm import FSMField, transition, TransitionNotAllowed # type: ignore
|
||||
|
@ -277,7 +276,12 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
return response.code
|
||||
except RegistryError as e:
|
||||
logger.error("Error _create_host, code was %s error was %s" % (e.code, e))
|
||||
raise e
|
||||
# OBJECT_EXISTS is an expected error code that should not raise
|
||||
# an exception, rather return the code to be handled separately
|
||||
if e.code == ErrorCode.OBJECT_EXISTS:
|
||||
return e.code
|
||||
else:
|
||||
raise e
|
||||
|
||||
def _convert_list_to_dict(self, listToConvert: list[tuple[str, list]]):
|
||||
"""converts a list of hosts into a dictionary
|
||||
|
@ -304,6 +308,31 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
regex = re.compile(full_pattern)
|
||||
return bool(regex.match(nameserver))
|
||||
|
||||
@classmethod
|
||||
def isValidHost(cls, nameserver: str):
|
||||
"""Checks for validity of nameserver string based on these rules:
|
||||
- first character is alpha or digit
|
||||
- first and last character in each label is alpha or digit
|
||||
- all characters alpha (lowercase), digit, -, or .
|
||||
- each label has a min length of 1 and a max length of 63
|
||||
- total host name has a max length of 253
|
||||
"""
|
||||
# pattern to test for valid domain
|
||||
# label pattern for each section of the host name, separated by .
|
||||
labelpattern = r"[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?"
|
||||
# lookahead pattern ensures first character not - and total length < 254
|
||||
lookaheadpatterns = r"^((?!-))(?=.{1,253}\.?$)"
|
||||
# pattern assembles lookaheadpatterns and ensures there are at least
|
||||
# 3 labels in the host name
|
||||
pattern = lookaheadpatterns + labelpattern + r"(\." + labelpattern + r"){2,}$"
|
||||
|
||||
# attempt to match the pattern
|
||||
match = re.match(pattern, nameserver)
|
||||
|
||||
# return true if nameserver matches
|
||||
# otherwise false
|
||||
return bool(match)
|
||||
|
||||
@classmethod
|
||||
def checkHostIPCombo(cls, name: str, nameserver: str, ip: list[str]):
|
||||
"""Checks the parameters past for a valid combination
|
||||
|
@ -311,6 +340,8 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
- nameserver is a subdomain but is missing ip
|
||||
- nameserver is not a subdomain but has ip
|
||||
- nameserver is a subdomain but an ip passed is invalid
|
||||
- nameserver is not a valid domain
|
||||
- ip is provided but is missing domain
|
||||
|
||||
Args:
|
||||
hostname (str)- nameserver or subdomain
|
||||
|
@ -319,7 +350,11 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
NameserverError (if exception hit)
|
||||
Returns:
|
||||
None"""
|
||||
if cls.isSubdomain(name, nameserver) and (ip is None or ip == []):
|
||||
if ip and not nameserver:
|
||||
raise NameserverError(code=nsErrorCodes.MISSING_HOST)
|
||||
elif nameserver and not cls.isValidHost(nameserver):
|
||||
raise NameserverError(code=nsErrorCodes.INVALID_HOST, nameserver=nameserver)
|
||||
elif cls.isSubdomain(name, nameserver) and (ip is None or ip == []):
|
||||
raise NameserverError(code=nsErrorCodes.MISSING_IP, nameserver=nameserver)
|
||||
|
||||
elif not cls.isSubdomain(name, nameserver) and (ip is not None and ip != []):
|
||||
|
@ -330,7 +365,7 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
for addr in ip:
|
||||
if not cls._valid_ip_addr(addr):
|
||||
raise NameserverError(
|
||||
code=nsErrorCodes.INVALID_IP, nameserver=nameserver, ip=ip
|
||||
code=nsErrorCodes.INVALID_IP, nameserver=nameserver[:40], ip=ip
|
||||
)
|
||||
return None
|
||||
|
||||
|
@ -1196,34 +1231,6 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
# ForeignKey on DomainInvitation creates an "invitations" member for
|
||||
# all of the invitations that have been sent for this domain
|
||||
|
||||
def _validate_host_tuples(self, hosts: list[tuple[str]]):
|
||||
"""
|
||||
Helper function. Validate hostnames and IP addresses.
|
||||
|
||||
Raises:
|
||||
ValueError if hostname or IP address appears invalid or mismatched.
|
||||
"""
|
||||
for host in hosts:
|
||||
hostname = host[0].lower()
|
||||
addresses: tuple[str] = host[1:] # type: ignore
|
||||
if not bool(Domain.HOST_REGEX.match(hostname)):
|
||||
raise ValueError("Invalid hostname: %s." % hostname)
|
||||
if len(hostname) > Domain.MAX_LENGTH:
|
||||
raise ValueError("Too long hostname: %s" % hostname)
|
||||
|
||||
is_subordinate = hostname.split(".", 1)[-1] == self.name
|
||||
if is_subordinate and len(addresses) == 0:
|
||||
raise ValueError(
|
||||
"Must supply IP addresses for subordinate host %s" % hostname
|
||||
)
|
||||
if not is_subordinate and len(addresses) > 0:
|
||||
raise ValueError("Must not supply IP addresses for %s" % hostname)
|
||||
|
||||
for address in addresses:
|
||||
allow = set(":." + digits)
|
||||
if any(c not in allow for c in address):
|
||||
raise ValueError("Invalid IP address: %s." % address)
|
||||
|
||||
def _get_or_create_domain(self):
|
||||
"""Try to fetch info about this domain. Create it if it does not exist."""
|
||||
already_tried_to_create = False
|
||||
|
@ -1593,7 +1600,12 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
return response.code
|
||||
except RegistryError as e:
|
||||
logger.error("Error _update_host, code was %s error was %s" % (e.code, e))
|
||||
raise e
|
||||
# OBJECT_EXISTS is an expected error code that should not raise
|
||||
# an exception, rather return the code to be handled separately
|
||||
if e.code == ErrorCode.OBJECT_EXISTS:
|
||||
return e.code
|
||||
else:
|
||||
raise e
|
||||
|
||||
def addAndRemoveHostsFromDomain(
|
||||
self, hostsToAdd: list[str], hostsToDelete: list[str]
|
||||
|
|
|
@ -11,10 +11,6 @@ class DomainHelper:
|
|||
# begin or end with a hyphen, followed by a TLD of 2-6 alphabetic characters
|
||||
DOMAIN_REGEX = re.compile(r"^(?!-)[A-Za-z0-9-]{1,63}(?<!-)\.[A-Za-z]{2,6}$")
|
||||
|
||||
# a domain name is alphanumeric or hyphen, has at least 2 dots, doesn't
|
||||
# begin or end with a hyphen, followed by a TLD of 2-6 alphabetic characters
|
||||
HOST_REGEX = re.compile(r"^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\.){2,}([A-Za-z]){2,6}$")
|
||||
|
||||
# a domain can be no longer than 253 characters in total
|
||||
MAX_LENGTH = 253
|
||||
|
||||
|
|
|
@ -62,10 +62,11 @@
|
|||
|
||||
{% if IS_DEMO_SITE %}
|
||||
<section aria-label="Alert" >
|
||||
<div class="usa-alert usa-alert--warning usa-alert--no-icon">
|
||||
<div class="usa-alert usa-alert--info">
|
||||
<div class="usa-alert__body">
|
||||
<p class="usa-alert__text">
|
||||
<strong>BETA SITE:</strong> We’re building a new way to get a .gov. Take a look around, but don’t rely on this site yet. This site is for testing purposes only. Don’t enter real data into any form on this site. To learn about requesting a .gov domain, visit <a href="https://get.gov" class="usa-link">get.gov</a>
|
||||
<h4 class="usa-alert__heading">New domain requests are paused</h4>
|
||||
<p class="usa-alert__text measure-none">
|
||||
This is the new registrar for managing .gov domains. Note that we’re not accepting requests for new .gov domains until January 2024. Follow .gov updates at <a href="https://get.gov/updates/" class="usa-link">get.gov/updates/</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
{% if has_add_permission %}
|
||||
<li>
|
||||
<a href="{% url 'admin:registrar_domain_add' %}" class="addlink">
|
||||
Add Domain
|
||||
Add domain
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<div class="usa-alert usa-alert--slim usa-alert--info">
|
||||
<div class="usa-alert__body">
|
||||
<p class="margin-top-0">Add an IP address only when your name server's address includes your domain name (e.g., if your domain name is "example.gov" and your name server is "ns1.example.gov,” then an IP address is required.) To add multiple IP addresses, separate them with commas.</p>
|
||||
<p class="margin-top-0">Add an IP address only when your name server's address includes your domain name (e.g., if your domain name is “example.gov” and your name server is “ns1.example.gov,” then an IP address is required.) To add multiple IP addresses, separate them with commas.</p>
|
||||
<p class="margin-bottom-0">This step is uncommon unless you self-host your DNS or use custom addresses for your nameserver.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
7
src/registrar/tests/data/test_contacts.txt
Normal file
7
src/registrar/tests/data/test_contacts.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
TESTUSER|12363_CONTACT|123-123-1234||918-000-0000||testuser@gmail.com|GSA|SOMECOMPANY|ctldbatch|2021-06-30T17:58:09Z|SOMECOMPANY|ctldbatch|2021-06-30T18:18:09Z|
|
||||
USER1|12345_CONTACT|123-123-1234||918-000-0000||agustina.wyman7@test.com|GSA|SOMECOMPANY|ctldbatch|2021-06-29T18:53:09Z|SOMECOMPANY|ctldbatch|2021-06-29T18:58:08Z|
|
||||
USER2|12355_CONTACT|123-123-1234||918-000-0000||susy.martin4@test.com|GSA|SOMECOMPANY|ctldbatch|2021-06-30T15:23:10Z|SOMECOMPANY|ctldbatch|2021-06-30T15:38:10Z|
|
||||
USER3|12356_CONTACT|123-123-1234||918-000-0000||stephania.winters4@test.com|GSA|SOMECOMPANY|ctldbatch|2021-06-30T15:23:10Z|SOMECOMPANY|ctldbatch|2021-06-30T18:28:09Z|
|
||||
USER4|12357_CONTACT|123-123-1234||918-000-0000||alexandra.bobbitt5@test.com|GSA|SOMECOMPANY|ctldbatch|2021-06-30T15:23:10Z|SOMECOMPANY|ctldbatch|2021-08-02T22:13:09Z|
|
||||
USER5|12362_CONTACT|123-123-1234||918-000-0000||jospeh.mcdowell3@test.com|GSA|SOMECOMPANY|ctldbatch|2021-06-30T17:58:09Z|SOMECOMPANY|ctldbatch|2021-06-30T18:33:09Z|
|
||||
USER6|12363_CONTACT|123-123-1234||918-000-0000||reginald.ratcliff4@test.com|GSA|SOMECOMPANY|ctldbatch|2021-06-30T17:58:09Z|SOMECOMPANY|ctldbatch|2021-06-30T18:18:09Z|
|
8
src/registrar/tests/data/test_domain_contacts.txt
Normal file
8
src/registrar/tests/data/test_domain_contacts.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
Anomaly.gov|ANOMALY|tech
|
||||
TestDomain.gov|TESTUSER|admin
|
||||
FakeWebsite1|USER1|admin
|
||||
FakeWebsite1|USER2|tech
|
||||
FakeWebsite1|USER3|billing
|
||||
FakeWebsite2.GOV|USER4|admin
|
||||
FakeWebsite2.GOV|USER5|billing
|
||||
FakeWebsite2.GOV|USER6|tech
|
4
src/registrar/tests/data/test_domain_statuses.txt
Normal file
4
src/registrar/tests/data/test_domain_statuses.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Anomaly.gov|muahaha|
|
||||
TestDomain.gov|ok|
|
||||
FakeWebsite1.GOV|serverHold|
|
||||
FakeWebsite2.GOV|Hold|
|
|
@ -1630,6 +1630,56 @@ class TestRegistrantNameservers(MockEppLib):
|
|||
return super().tearDown()
|
||||
|
||||
|
||||
class TestNameserverValidation(TestCase):
|
||||
"""Test the isValidDomain method which validates nameservers"""
|
||||
|
||||
def test_255_chars_is_too_long(self):
|
||||
"""Test that domain of 255 chars or longer is invalid"""
|
||||
domain_too_long = (
|
||||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
".bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
||||
".bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
||||
".bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
||||
".bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
||||
".bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.gov"
|
||||
)
|
||||
self.assertFalse(Domain.isValidHost(domain_too_long))
|
||||
|
||||
def test_64_char_label_too_long(self):
|
||||
"""Test that label of 64 characters or longer is invalid"""
|
||||
label_too_long = (
|
||||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
||||
)
|
||||
domain_label_too_long = "www." + label_too_long + ".gov"
|
||||
self.assertFalse(Domain.isValidHost(domain_label_too_long))
|
||||
|
||||
def test_only_tld_and_sld(self):
|
||||
"""Test that host with only a tld and sld is invalid"""
|
||||
tld = "gov"
|
||||
sld = "example"
|
||||
domain_with_sld_and_tld = sld + "." + tld
|
||||
self.assertFalse(Domain.isValidHost(domain_with_sld_and_tld))
|
||||
|
||||
def test_improper_chars_in_nameserver(self):
|
||||
"""Test that host with improper chars is invalid"""
|
||||
invalid_chars = "*&^"
|
||||
domain_with_invalid_chars = "www.bad--" + invalid_chars + ".gov"
|
||||
self.assertFalse(Domain.isValidHost(domain_with_invalid_chars))
|
||||
|
||||
def test_misplaced_dashes(self):
|
||||
"""Test that misplaced dashes are invalid"""
|
||||
self.assertFalse(Domain.isValidHost("-www.example.gov"))
|
||||
self.assertFalse(Domain.isValidHost("www.example-.gov"))
|
||||
self.assertTrue(Domain.isValidHost("www.ex-ample.gov"))
|
||||
|
||||
def test_valid_hostname(self):
|
||||
"""Test that valid hostnames are valid"""
|
||||
self.assertTrue(Domain.isValidHost("www.tld.sld.gov"))
|
||||
self.assertTrue(Domain.isValidHost("www.valid.c"))
|
||||
self.assertTrue(Domain.isValidHost("2ww.valid.gov"))
|
||||
self.assertTrue(Domain.isValidHost("w.t.g"))
|
||||
|
||||
|
||||
class TestRegistrantDNSSEC(MockEppLib):
|
||||
"""Rule: Registrants may modify their secure DNS data"""
|
||||
|
||||
|
|
261
src/registrar/tests/test_transition_domain_migrations.py
Normal file
261
src/registrar/tests/test_transition_domain_migrations.py
Normal file
|
@ -0,0 +1,261 @@
|
|||
from django.test import TestCase
|
||||
|
||||
from registrar.models import (
|
||||
User,
|
||||
Domain,
|
||||
DomainInvitation,
|
||||
TransitionDomain,
|
||||
DomainInformation,
|
||||
UserDomainRole,
|
||||
)
|
||||
|
||||
from django.core.management import call_command
|
||||
|
||||
|
||||
class TestLogins(TestCase):
|
||||
|
||||
""" """
|
||||
|
||||
def setUp(self):
|
||||
""" """
|
||||
# self.load_transition_domain_script = "load_transition_domain",
|
||||
# self.transfer_script = "transfer_transition_domains_to_domains",
|
||||
# self.master_script = "load_transition_domain",
|
||||
|
||||
self.test_data_file_location = "/app/registrar/tests/data"
|
||||
self.test_domain_contact_filename = "test_domain_contacts.txt"
|
||||
self.test_contact_filename = "test_contacts.txt"
|
||||
self.test_domain_status_filename = "test_domain_statuses.txt"
|
||||
|
||||
def tearDown(self):
|
||||
super().tearDown()
|
||||
TransitionDomain.objects.all().delete()
|
||||
Domain.objects.all().delete()
|
||||
DomainInvitation.objects.all().delete()
|
||||
DomainInformation.objects.all().delete()
|
||||
User.objects.all().delete()
|
||||
UserDomainRole.objects.all().delete()
|
||||
|
||||
def run_load_domains(self):
|
||||
call_command(
|
||||
"load_transition_domain",
|
||||
f"{self.test_data_file_location}/{self.test_domain_contact_filename}",
|
||||
f"{self.test_data_file_location}/{self.test_contact_filename}",
|
||||
f"{self.test_data_file_location}/{self.test_domain_status_filename}",
|
||||
)
|
||||
|
||||
def run_transfer_domains(self):
|
||||
call_command("transfer_transition_domains_to_domains")
|
||||
|
||||
def run_master_script(self):
|
||||
call_command(
|
||||
"master_domain_migrations",
|
||||
runMigrations=True,
|
||||
migrationDirectory=f"{self.test_data_file_location}",
|
||||
migrationFilenames=(
|
||||
f"{self.test_domain_contact_filename},"
|
||||
f"{self.test_contact_filename},"
|
||||
f"{self.test_domain_status_filename}"
|
||||
),
|
||||
)
|
||||
|
||||
def compare_tables(
|
||||
self,
|
||||
expected_total_transition_domains,
|
||||
expected_total_domains,
|
||||
expected_total_domain_informations,
|
||||
expected_total_domain_invitations,
|
||||
expected_missing_domains,
|
||||
expected_duplicate_domains,
|
||||
expected_missing_domain_informations,
|
||||
expected_missing_domain_invitations,
|
||||
):
|
||||
"""Does a diff between the transition_domain and the following tables:
|
||||
domain, domain_information and the domain_invitation.
|
||||
Verifies that the data loaded correctly."""
|
||||
|
||||
missing_domains = []
|
||||
duplicate_domains = []
|
||||
missing_domain_informations = []
|
||||
missing_domain_invites = []
|
||||
for transition_domain in TransitionDomain.objects.all(): # DEBUG:
|
||||
transition_domain_name = transition_domain.domain_name
|
||||
transition_domain_email = transition_domain.username
|
||||
|
||||
# Check Domain table
|
||||
matching_domains = Domain.objects.filter(name=transition_domain_name)
|
||||
# Check Domain Information table
|
||||
matching_domain_informations = DomainInformation.objects.filter(
|
||||
domain__name=transition_domain_name
|
||||
)
|
||||
# Check Domain Invitation table
|
||||
matching_domain_invitations = DomainInvitation.objects.filter(
|
||||
email=transition_domain_email.lower(),
|
||||
domain__name=transition_domain_name,
|
||||
)
|
||||
|
||||
if len(matching_domains) == 0:
|
||||
missing_domains.append(transition_domain_name)
|
||||
elif len(matching_domains) > 1:
|
||||
duplicate_domains.append(transition_domain_name)
|
||||
if len(matching_domain_informations) == 0:
|
||||
missing_domain_informations.append(transition_domain_name)
|
||||
if len(matching_domain_invitations) == 0:
|
||||
missing_domain_invites.append(transition_domain_name)
|
||||
|
||||
total_missing_domains = len(missing_domains)
|
||||
total_duplicate_domains = len(duplicate_domains)
|
||||
total_missing_domain_informations = len(missing_domain_informations)
|
||||
total_missing_domain_invitations = len(missing_domain_invites)
|
||||
|
||||
total_transition_domains = len(TransitionDomain.objects.all())
|
||||
total_domains = len(Domain.objects.all())
|
||||
total_domain_informations = len(DomainInformation.objects.all())
|
||||
total_domain_invitations = len(DomainInvitation.objects.all())
|
||||
|
||||
print(
|
||||
f"""
|
||||
total_missing_domains = {len(missing_domains)}
|
||||
total_duplicate_domains = {len(duplicate_domains)}
|
||||
total_missing_domain_informations = {len(missing_domain_informations)}
|
||||
total_missing_domain_invitations = {len(missing_domain_invites)}
|
||||
|
||||
total_transition_domains = {len(TransitionDomain.objects.all())}
|
||||
total_domains = {len(Domain.objects.all())}
|
||||
total_domain_informations = {len(DomainInformation.objects.all())}
|
||||
total_domain_invitations = {len(DomainInvitation.objects.all())}
|
||||
"""
|
||||
)
|
||||
|
||||
self.assertTrue(total_missing_domains == expected_missing_domains)
|
||||
self.assertTrue(total_duplicate_domains == expected_duplicate_domains)
|
||||
self.assertTrue(
|
||||
total_missing_domain_informations == expected_missing_domain_informations
|
||||
)
|
||||
self.assertTrue(
|
||||
total_missing_domain_invitations == expected_missing_domain_invitations
|
||||
)
|
||||
|
||||
self.assertTrue(total_transition_domains == expected_total_transition_domains)
|
||||
self.assertTrue(total_domains == expected_total_domains)
|
||||
self.assertTrue(total_domain_informations == expected_total_domain_informations)
|
||||
self.assertTrue(total_domain_invitations == expected_total_domain_invitations)
|
||||
|
||||
def test_master_migration_functions(self):
|
||||
"""Run the full master migration script using local test data.
|
||||
NOTE: This is more of an integration test and so far does not
|
||||
follow best practice of limiting the number of assertions per test.
|
||||
But for now, this will double-check that the script
|
||||
works as intended."""
|
||||
|
||||
self.run_master_script()
|
||||
|
||||
# STEP 2: (analyze the tables just like the
|
||||
# migration script does, but add assert statements)
|
||||
expected_total_transition_domains = 8
|
||||
expected_total_domains = 4
|
||||
expected_total_domain_informations = 0
|
||||
expected_total_domain_invitations = 7
|
||||
|
||||
expected_missing_domains = 0
|
||||
expected_duplicate_domains = 0
|
||||
# we expect 8 missing domain invites since the
|
||||
# migration does not auto-login new users
|
||||
expected_missing_domain_informations = 8
|
||||
# we expect 1 missing invite from anomaly.gov (an injected error)
|
||||
expected_missing_domain_invitations = 1
|
||||
self.compare_tables(
|
||||
expected_total_transition_domains,
|
||||
expected_total_domains,
|
||||
expected_total_domain_informations,
|
||||
expected_total_domain_invitations,
|
||||
expected_missing_domains,
|
||||
expected_duplicate_domains,
|
||||
expected_missing_domain_informations,
|
||||
expected_missing_domain_invitations,
|
||||
)
|
||||
|
||||
def test_load_transition_domain(self):
|
||||
self.run_load_domains()
|
||||
|
||||
# STEP 2: (analyze the tables just like the migration
|
||||
# script does, but add assert statements)
|
||||
expected_total_transition_domains = 8
|
||||
expected_total_domains = 0
|
||||
expected_total_domain_informations = 0
|
||||
expected_total_domain_invitations = 0
|
||||
|
||||
expected_missing_domains = 8
|
||||
expected_duplicate_domains = 0
|
||||
expected_missing_domain_informations = 8
|
||||
expected_missing_domain_invitations = 8
|
||||
self.compare_tables(
|
||||
expected_total_transition_domains,
|
||||
expected_total_domains,
|
||||
expected_total_domain_informations,
|
||||
expected_total_domain_invitations,
|
||||
expected_missing_domains,
|
||||
expected_duplicate_domains,
|
||||
expected_missing_domain_informations,
|
||||
expected_missing_domain_invitations,
|
||||
)
|
||||
|
||||
def test_transfer_transition_domains_to_domains(self):
|
||||
# TODO: setup manually instead of calling other script
|
||||
self.run_load_domains()
|
||||
self.run_transfer_domains()
|
||||
|
||||
# Analyze the tables
|
||||
expected_total_transition_domains = 8
|
||||
expected_total_domains = 4
|
||||
expected_total_domain_informations = 0
|
||||
expected_total_domain_invitations = 7
|
||||
|
||||
expected_missing_domains = 0
|
||||
expected_duplicate_domains = 0
|
||||
expected_missing_domain_informations = 8
|
||||
expected_missing_domain_invitations = 1
|
||||
self.compare_tables(
|
||||
expected_total_transition_domains,
|
||||
expected_total_domains,
|
||||
expected_total_domain_informations,
|
||||
expected_total_domain_invitations,
|
||||
expected_missing_domains,
|
||||
expected_duplicate_domains,
|
||||
expected_missing_domain_informations,
|
||||
expected_missing_domain_invitations,
|
||||
)
|
||||
|
||||
def test_logins(self):
|
||||
# TODO: setup manually instead of calling other scripts
|
||||
self.run_load_domains()
|
||||
self.run_transfer_domains()
|
||||
|
||||
# Simluate Logins
|
||||
for invite in DomainInvitation.objects.all():
|
||||
# get a user with this email address
|
||||
user, user_created = User.objects.get_or_create(
|
||||
email=invite.email, username=invite.email
|
||||
)
|
||||
user.first_login()
|
||||
|
||||
# Analyze the tables
|
||||
expected_total_transition_domains = 8
|
||||
expected_total_domains = 4
|
||||
expected_total_domain_informations = 3
|
||||
expected_total_domain_invitations = 7
|
||||
|
||||
expected_missing_domains = 0
|
||||
expected_duplicate_domains = 0
|
||||
expected_missing_domain_informations = 1
|
||||
expected_missing_domain_invitations = 1
|
||||
self.compare_tables(
|
||||
expected_total_transition_domains,
|
||||
expected_total_domains,
|
||||
expected_total_domain_informations,
|
||||
expected_total_domain_invitations,
|
||||
expected_missing_domains,
|
||||
expected_duplicate_domains,
|
||||
expected_missing_domain_informations,
|
||||
expected_missing_domain_invitations,
|
||||
)
|
|
@ -1589,6 +1589,39 @@ class TestDomainNameservers(TestDomainOverview):
|
|||
status_code=200,
|
||||
)
|
||||
|
||||
def test_domain_nameservers_form_submit_invalid_host(self):
|
||||
"""Nameserver form catches invalid host on submission.
|
||||
|
||||
Uses self.app WebTest because we need to interact with forms.
|
||||
"""
|
||||
nameserver = "invalid-nameserver.gov"
|
||||
valid_ip = "123.2.45.111"
|
||||
# initial nameservers page has one server with two ips
|
||||
nameservers_page = self.app.get(
|
||||
reverse("domain-dns-nameservers", kwargs={"pk": self.domain.id})
|
||||
)
|
||||
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
|
||||
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
|
||||
# attempt to submit the form without two hosts, both subdomains,
|
||||
# only one has ips
|
||||
nameservers_page.form["form-1-server"] = nameserver
|
||||
nameservers_page.form["form-1-ip"] = valid_ip
|
||||
with less_console_noise(): # swallow log warning message
|
||||
result = nameservers_page.form.submit()
|
||||
# form submission was a post with an error, response should be a 200
|
||||
# error text appears twice, once at the top of the page, once around
|
||||
# the required field. nameserver has invalid host
|
||||
self.assertContains(
|
||||
result,
|
||||
str(
|
||||
NameserverError(
|
||||
code=NameserverErrorCodes.INVALID_HOST, nameserver=nameserver
|
||||
)
|
||||
),
|
||||
count=2,
|
||||
status_code=200,
|
||||
)
|
||||
|
||||
def test_domain_nameservers_form_submits_successfully(self):
|
||||
"""Nameserver form submits successfully with valid input.
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ import csv
|
|||
from registrar.models.domain import Domain
|
||||
from registrar.models.domain_information import DomainInformation
|
||||
from registrar.models.public_contact import PublicContact
|
||||
from django.db.models import Value
|
||||
from django.db.models.functions import Coalesce
|
||||
|
||||
|
||||
def export_domains_to_writer(writer, columns, sort_fields, filter_condition):
|
||||
|
@ -61,7 +63,13 @@ def export_data_type_to_csv(csv_file):
|
|||
"Status",
|
||||
"Expiration Date",
|
||||
]
|
||||
sort_fields = ["domain__name"]
|
||||
# Coalesce is used to replace federal_type of None with ZZZZZ
|
||||
sort_fields = [
|
||||
"organization_type",
|
||||
Coalesce("federal_type", Value("ZZZZZ")),
|
||||
"federal_agency",
|
||||
"domain__name",
|
||||
]
|
||||
filter_condition = {
|
||||
"domain__state__in": [
|
||||
Domain.State.READY,
|
||||
|
@ -84,7 +92,13 @@ def export_data_full_to_csv(csv_file):
|
|||
"State",
|
||||
"Security Contact Email",
|
||||
]
|
||||
sort_fields = ["domain__name", "federal_agency", "organization_type"]
|
||||
# Coalesce is used to replace federal_type of None with ZZZZZ
|
||||
sort_fields = [
|
||||
"organization_type",
|
||||
Coalesce("federal_type", Value("ZZZZZ")),
|
||||
"federal_agency",
|
||||
"domain__name",
|
||||
]
|
||||
filter_condition = {
|
||||
"domain__state__in": [
|
||||
Domain.State.READY,
|
||||
|
@ -107,7 +121,13 @@ def export_data_federal_to_csv(csv_file):
|
|||
"State",
|
||||
"Security Contact Email",
|
||||
]
|
||||
sort_fields = ["domain__name", "federal_agency", "organization_type"]
|
||||
# Coalesce is used to replace federal_type of None with ZZZZZ
|
||||
sort_fields = [
|
||||
"organization_type",
|
||||
Coalesce("federal_type", Value("ZZZZZ")),
|
||||
"federal_agency",
|
||||
"domain__name",
|
||||
]
|
||||
filter_condition = {
|
||||
"organization_type__icontains": "federal",
|
||||
"domain__state__in": [
|
||||
|
|
|
@ -68,6 +68,7 @@ class NameserverErrorCodes(IntEnum):
|
|||
- 4 TOO_MANY_HOSTS more than the max allowed host values
|
||||
- 5 UNABLE_TO_UPDATE_DOMAIN unable to update the domain
|
||||
- 6 MISSING_HOST host is missing for a nameserver
|
||||
- 7 INVALID_HOST host is invalid for a nameserver
|
||||
"""
|
||||
|
||||
MISSING_IP = 1
|
||||
|
@ -76,6 +77,7 @@ class NameserverErrorCodes(IntEnum):
|
|||
TOO_MANY_HOSTS = 4
|
||||
UNABLE_TO_UPDATE_DOMAIN = 5
|
||||
MISSING_HOST = 6
|
||||
INVALID_HOST = 7
|
||||
|
||||
|
||||
class NameserverError(Exception):
|
||||
|
@ -104,6 +106,9 @@ class NameserverError(Exception):
|
|||
NameserverErrorCodes.MISSING_HOST: (
|
||||
"Name server must be provided to enter IP address."
|
||||
),
|
||||
NameserverErrorCodes.INVALID_HOST: (
|
||||
"Enter a name server in the required format, like ns1.example.com"
|
||||
),
|
||||
}
|
||||
|
||||
def __init__(self, *args, code=None, nameserver=None, ip=None, **kwargs):
|
||||
|
|
|
@ -1,34 +1,35 @@
|
|||
-i https://pypi.python.org/simple
|
||||
annotated-types==0.6.0; python_version >= '3.8'
|
||||
asgiref==3.7.2; python_version >= '3.7'
|
||||
boto3==1.28.66; python_version >= '3.7'
|
||||
botocore==1.31.66; python_version >= '3.7'
|
||||
cachetools==5.3.1; python_version >= '3.7'
|
||||
boto3==1.28.79; python_version >= '3.7'
|
||||
botocore==1.31.79; python_version >= '3.7'
|
||||
cachetools==5.3.2; python_version >= '3.7'
|
||||
certifi==2023.7.22; python_version >= '3.6'
|
||||
cfenv==0.5.3
|
||||
cffi==1.16.0; python_version >= '3.8'
|
||||
charset-normalizer==3.3.0; python_full_version >= '3.7.0'
|
||||
cryptography==41.0.4; python_version >= '3.7'
|
||||
charset-normalizer==3.3.2; python_full_version >= '3.7.0'
|
||||
cryptography==41.0.5; python_version >= '3.7'
|
||||
defusedxml==0.7.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
|
||||
dj-database-url==2.1.0
|
||||
dj-email-url==1.0.6
|
||||
django==4.2.6; python_version >= '3.8'
|
||||
django==4.2.7; python_version >= '3.8'
|
||||
django-allow-cidr==0.7.1
|
||||
django-auditlog==2.3.0; python_version >= '3.7'
|
||||
django-cache-url==3.4.4
|
||||
django-cors-headers==4.3.0; python_version >= '3.8'
|
||||
django-csp==3.7
|
||||
django-fsm==2.8.1
|
||||
django-login-required-middleware==0.9.0
|
||||
django-phonenumber-field[phonenumberslite]==7.2.0; python_version >= '3.8'
|
||||
django-widget-tweaks==1.5.0; python_version >= '3.8'
|
||||
environs[django]==9.5.0; python_version >= '3.6'
|
||||
faker==19.11.0; python_version >= '3.8'
|
||||
faker==19.13.0; python_version >= '3.8'
|
||||
fred-epplib@ git+https://github.com/cisagov/epplib.git@d56d183f1664f34c40ca9716a3a9a345f0ef561c
|
||||
furl==2.1.3
|
||||
future==0.18.3; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
|
||||
gevent==23.9.1; python_version >= '3.8'
|
||||
geventconnpool@ git+https://github.com/rasky/geventconnpool.git@1bbb93a714a331a069adf27265fe582d9ba7ecd4
|
||||
greenlet==3.0.0; python_version >= '3.7'
|
||||
greenlet==3.0.1; python_version >= '3.7'
|
||||
gunicorn==21.2.0; python_version >= '3.5'
|
||||
idna==3.4; python_version >= '3.5'
|
||||
jmespath==1.0.1; python_version >= '3.7'
|
||||
|
@ -39,7 +40,7 @@ marshmallow==3.20.1; python_version >= '3.8'
|
|||
oic==1.6.1; python_version ~= '3.7'
|
||||
orderedmultidict==1.0.1
|
||||
packaging==23.2; python_version >= '3.7'
|
||||
phonenumberslite==8.13.23
|
||||
phonenumberslite==8.13.24
|
||||
psycopg2-binary==2.9.9; python_version >= '3.7'
|
||||
pycparser==2.21
|
||||
pycryptodomex==3.19.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue