diff --git a/.evergreen/spec-patch/PYTHON-6058.patch b/.evergreen/spec-patch/PYTHON-6058.patch new file mode 100644 index 0000000000..e119640db2 --- /dev/null +++ b/.evergreen/spec-patch/PYTHON-6058.patch @@ -0,0 +1,419 @@ +NEEDED UNTIL DRIVERS-3623 ADDS THE CREDENTIAL-DISCLOSURE CORPUS TO THE SPEC REPO +diff --git a/test/connection_string/test/credential-disclosure.json b/test/connection_string/test/credential-disclosure.json +deleted file mode 100644 +index de88a82..0000000 +--- a/test/connection_string/test/credential-disclosure.json ++++ /dev/null +@@ -1,412 +0,0 @@ +-{ +- "tests": [ +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-bare-1", +- "uri": "mongodb://testuser:SENTINELpassword1234:27017" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-bare-2", +- "uri": "mongodb://testuser:SENTINELpassword1234" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-bare-pctenc", +- "uri": "mongodb://testuser:%53%45%4E%54%49%4E%45%4C%70%61%73%73%77%6F%72%64%31%32%33%34" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-ipv6", +- "uri": "mongodb://testuser:[SENTINELpassword1234]" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-seedlist-first", +- "uri": "mongodb://testuser:SENTINELpassword1234,localhost:27017" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-seedlist-first-withdb", +- "uri": "mongodb://testuser:SENTINELpassword1234,localhost:27017/admin" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-seedlist-later", +- "uri": "mongodb://localhost:27017,testuser:SENTINELpassword1234" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-seedlist-later-withdb", +- "uri": "mongodb://localhost:27017,testuser:SENTINELpassword1234/admin" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-srv-withdb", +- "uri": "mongodb+srv://testuser:SENTINELpassword1234/admin" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-srv-withdb-pctenc", +- "uri": "mongodb+srv://testuser:%53%45%4E%54%49%4E%45%4C%70%61%73%73%77%6F%72%64%31%32%33%34/admin" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-withdb", +- "uri": "mongodb://testuser:SENTINELpassword1234/admin" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-withdb-pctenc", +- "uri": "mongodb://testuser:%53%45%4E%54%49%4E%45%4C%70%61%73%73%77%6F%72%64%31%32%33%34/admin" +- }, +- { +- "description": "credential present with no at-sign to delimit it from the host information: noat-withdb-withopts", +- "uri": "mongodb://testuser:SENTINELpassword1234/admin?tls=true" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-after-1", +- "uri": "mongodb://testuser:a@b/SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-after-2", +- "uri": "mongodb://testuser:x@@SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-after-3", +- "uri": "mongodb://testuser:x@SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-after-badport", +- "uri": "mongodb://testuser:a@b#SENTINELpassword1234@localhost:notaport/admin" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-after-badport-pctenc", +- "uri": "mongodb://testuser:a@b#%53%45%4E%54%49%4E%45%4C%70%61%73%73%77%6F%72%64%31%32%33%34@localhost:notaport/admin" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-after-pctenc-1", +- "uri": "mongodb://testuser:x@%53%45%4E%54%49%4E%45%4C%70%61%73%73%77%6F%72%64%31%32%33%34@localhost:27017/admin" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-after-pctenc-2", +- "uri": "mongodb://testuser:a@b/%53%45%4E%54%49%4E%45%4C%70%61%73%73%77%6F%72%64%31%32%33%34@localhost:27017/admin" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-before-1", +- "uri": "mongodb://testuser:SENTINELpassword1234@@localhost:27017/admin" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-before-2", +- "uri": "mongodb://testuser:SENTINELpassword1234@x@localhost:27017/admin" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-before-3", +- "uri": "mongodb://testuser:SENTINELpassword1234@localhost:notaport@x/admin" +- }, +- { +- "description": "unencoded at-sign in the password: pw-at-before-4", +- "uri": "mongodb://testuser:SENTINELpassword1234@extra@localhost:27017/admin" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-after", +- "uri": "mongodb://testuser:localhost/SENTINELpassword1234@localhost" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-after-badoptvalue", +- "uri": "mongodb://testuser:x/SENTINELpassword1234@localhost:27017/admin?connectTimeoutMS=notanumber" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-after-badport", +- "uri": "mongodb://testuser:x/SENTINELpassword1234@localhost:notaport/" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-after-empty-head", +- "uri": "mongodb://testuser:/SENTINELpassword1234@localhost" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-after-empty-head-badscheme", +- "uri": "mongodb:/testuser:SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-after-emptyhost-unixsocket", +- "uri": "mongodb://testuser:x/SENTINELpassword1234@/tmp/mongodb.sock/admin" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-after-numeric-head", +- "uri": "mongodb://testuser:12345/SENTINELpassword1234@localhost" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-after-numeric-head-srv", +- "uri": "mongodb+srv://testuser:12345/SENTINELpassword1234@localhost/admin" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-after-opt", +- "uri": "mongodb://testuser:x/SENTINELpassword1234@localhost:27017/admin?readPreference=notapref" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-after-srv", +- "uri": "mongodb+srv://testuser:x/SENTINELpassword1234@localhost/admin" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-before", +- "uri": "mongodb://testuser:SENTINELpassword1234/x@localhost:27017" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-before-ipv6", +- "uri": "mongodb://testuser:SENTINELpassword1234/x@[::1]:27017/admin" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-before-opt", +- "uri": "mongodb://testuser:SENTINELpassword1234/x@localhost:27017/admin?authSource=%" +- }, +- { +- "description": "unencoded slash in the password: pw-slash-before-srv", +- "uri": "mongodb+srv://testuser:SENTINELpassword1234/x@localhost/admin" +- }, +- { +- "description": "unencoded question mark in the password: pw-question-after", +- "uri": "mongodb://testuser:x?readPreference=SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "unencoded question mark in the password: pw-question-after-badoptvalue", +- "uri": "mongodb://testuser:x?SENTINELpassword1234@localhost:27017/admin?connectTimeoutMS=notanumber" +- }, +- { +- "description": "unencoded question mark in the password: pw-question-after-badport", +- "uri": "mongodb://testuser:x?SENTINELpassword1234@localhost:notaport/admin" +- }, +- { +- "description": "unencoded question mark in the password: pw-question-after-empty-head", +- "uri": "mongodb://testuser:?SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "unencoded question mark in the password: pw-question-after-numeric-head", +- "uri": "mongodb://testuser:12345?SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "unencoded question mark in the password: pw-question-after-numeric-head-srv", +- "uri": "mongodb+srv://testuser:12345?SENTINELpassword1234=1@localhost/admin" +- }, +- { +- "description": "unencoded question mark in the password: pw-question-after-opt", +- "uri": "mongodb://testuser:x?SENTINELpassword1234@localhost:27017?w=1" +- }, +- { +- "description": "unencoded question mark in the password: pw-question-after-srv", +- "uri": "mongodb+srv://testuser:x?SENTINELpassword1234@my.example.test:27017/admin" +- }, +- { +- "description": "unencoded question mark in the password: pw-question-after-unknownopt", +- "uri": "mongodb://testuser:x?SENTINELpassword1234@localhost:27017/admin?justakey" +- }, +- { +- "description": "unencoded question mark in the password: pw-question-before", +- "uri": "mongodb://testuser:SENTINELpassword1234?x@localhost:27017/admin" +- }, +- { +- "description": "invalid percent-escape in the password: pw-percent-after", +- "uri": "mongodb://testuser:x%SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "invalid percent-escape in the password: pw-percent-after-badport", +- "uri": "mongodb://testuser:mongodb%3A%2F%2FSENTINELpassword1234@localhost:notaport/admin" +- }, +- { +- "description": "invalid percent-escape in the password: pw-percent-after-empty-head", +- "uri": "mongodb://testuser:%zzSENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "invalid percent-escape in the password: pw-percent-after-empty-head-badport", +- "uri": "mongodb://testuser:%12345SENTINELpassword1234@localhost:notaport/admin" +- }, +- { +- "description": "invalid percent-escape in the password: pw-percent-after-empty-head-opt", +- "uri": "mongodb://testuser:%12345%12345%12345SENTINELpassword1234%12345F@localhost:27017/admin?bogus=1" +- }, +- { +- "description": "invalid percent-escape in the password: pw-percent-after-opt", +- "uri": "mongodb://testuser:mongodb%3A%2F%2FSENTINELpassword1234@localhost:27017/admin?zzz=1" +- }, +- { +- "description": "invalid percent-escape in the password: pw-percent-after-unknownopt", +- "uri": "mongodb://testuser:x%12345FSENTINELpassword1234@localhost:27017/admin?bogusOption=1" +- }, +- { +- "description": "invalid percent-escape in the password: pw-percent-before", +- "uri": "mongodb://testuser:SENTINELpassword1234%2Fx@localhost:27017/admin" +- }, +- { +- "description": "invalid percent-escape in the password: pw-percent-before-badport", +- "uri": "mongodb://testuser:SENTINELpassword1234%3A%2F%2Fhost@localhost:notaport/admin" +- }, +- { +- "description": "invalid percent-escape in the password: pw-percent-before-unknownopt", +- "uri": "mongodb://testuser:SENTINELpassword1234%2Fx@localhost:27017/admin?bogusOption=1" +- }, +- { +- "description": "unencoded delimiter in the password: pw-amp-after", +- "uri": "mongodb://testuser:x&SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "unencoded delimiter in the password: pw-amp-before", +- "uri": "mongodb://testuser:SENTINELpassword1234&x@localhost:27017/admin" +- }, +- { +- "description": "unencoded delimiter in the password: pw-colon-after", +- "uri": "mongodb://testuser:[::1]/SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "unencoded delimiter in the password: pw-colon-before", +- "uri": "mongodb://testuser:SENTINELpassword1234:x@localhost:27017/admin" +- }, +- { +- "description": "unencoded delimiter in the password: pw-comma-after", +- "uri": "mongodb://testuser:x,SENTINELpassword1234@localhost:notaport/admin" +- }, +- { +- "description": "unencoded delimiter in the password: pw-comma-before", +- "uri": "mongodb://testuser:SENTINELpassword1234,x@localhost:notaport/admin" +- }, +- { +- "description": "unencoded delimiter in the password: pw-equals-after", +- "uri": "mongodb://testuser:x=SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "unencoded delimiter in the password: pw-equals-before", +- "uri": "mongodb://testuser:SENTINELpassword1234=x@localhost:27017/admin" +- }, +- { +- "description": "unencoded delimiter in the password: pw-hash-after", +- "uri": "mongodb://testuser:x#SENTINELpassword1234@localhost:notaport/admin" +- }, +- { +- "description": "unencoded delimiter in the password: pw-hash-before", +- "uri": "mongodb://testuser:SENTINELpassword1234#x@localhost:notaport/admin" +- }, +- { +- "description": "unencoded delimiter in the password: pw-plus-after", +- "uri": "mongodb://testuser:x+SENTINELpassword1234@localhost:27017/admin?connectTimeoutMS=x" +- }, +- { +- "description": "unencoded delimiter in the password: pw-plus-before", +- "uri": "mongodb://testuser:SENTINELpassword1234+x@localhost:notaport/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean", +- "uri": "mongodb://testuser:SENTINELpassword1234@localhost:999999/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-badoptvalue", +- "uri": "mongodb://testuser:SENTINELpassword1234@LoCaLhOsT:27017/admin?connectTimeoutMS=notanumber" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-badoptvalue-unknownopt", +- "uri": "mongodb://testuser:SENTINELpassword1234@localhost:27017/admin?bogusOption=1&connectTimeoutMS=notanumber" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-badport", +- "uri": "mongodb://testuser:SENTINELpassword1234@localhost:notaport/admin?tls=notabool" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-badscheme", +- "uri": "mongod://testuser:SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-dbbadchar", +- "uri": "mongodb://testuser:SENTINELpassword1234@localhost:27017/ad min.db" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-dbbadchar-emptyhost-unixsocket", +- "uri": "mongodb://testuser:SENTINELpassword1234@/tmp/mongodb.sock/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-dbbadchar-unixsocket", +- "uri": "mongodb://testuser:SENTINELpassword1234@%2Ftmp%2Fmongo.sock/x/y.sock/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-emptyhost", +- "uri": "mongodb://testuser:SENTINELpassword1234@/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-emptyuser", +- "uri": "mongodb://:SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-ipv6", +- "uri": "mongodb://testuser:SENTINELpassword1234@[::1]:notaport/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-long", +- "uri": "mongodb://testuser:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-opt", +- "uri": "mongodb://testuser:SENTINELpassword1234@localhost:27017/admin?appname=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-portzero", +- "uri": "mongodb://testuser:SENTINELpassword1234@localhost:0/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-seedlist-other-badport", +- "uri": "mongodb://testuser:SENTINELpassword1234@localhost:27017,/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-seedlist-other-opt", +- "uri": "mongodb://testuser:SENTINELpassword1234@a.example.com,b.example.com/admin?directConnection=true" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-srv-badoptvalue", +- "uri": "mongodb+srv://testuser:SENTINELpassword1234@a.example.com/admin?connectTimeoutMS=notanumber" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-srv", +- "uri": "mongodb+srv://testuser:SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-srv-emptyhost", +- "uri": "mongodb+srv://testuser:SENTINELpassword1234@/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-srv-opt", +- "uri": "mongodb+srv://testuser:SENTINELpassword1234@a.example/admin?directConnection=true" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-srv-seedlist-other", +- "uri": "mongodb+srv://testuser:SENTINELpassword1234@a.example.com,b.example.com/admin" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-unixsocket-opt", +- "uri": "mongodb://testuser:SENTINELpassword1234@%2Ftmp%2Fmongodb.sock/admin?bogus=1" +- }, +- { +- "description": "correctly encoded password with an unrelated error elsewhere: pw-clean-unknownopt", +- "uri": "mongodb://testuser:SENTINELpassword1234@localhost:27017/admin?bogusOption=1" +- }, +- { +- "description": "sentinel carried in the username component of the userinfo: sentinel-in-username-1", +- "uri": "mongodb://testuser?SENTINELpassword1234@localhost:27017/admin" +- }, +- { +- "description": "sentinel carried in the username component of the userinfo: sentinel-in-username-2", +- "uri": "mongodb://SENTINELpassword1234%ZZ:pw@localhost:27017/admin" +- }, +- { +- "description": "sentinel carried in the username component of the userinfo: sentinel-in-username-3", +- "uri": "mongodb://SENTINELpassword1234/x@localhost:27017/admin" +- }, +- { +- "description": "sentinel carried in the username component of the userinfo: sentinel-in-username-srv", +- "uri": "mongodb+srv://testuser?SENTINELpassword1234@localhost/admin" +- }, +- { +- "description": "credential as the argument of an unrecognized option: optarg-unrecognized", +- "uri": "mongodb://localhost:27017/?notARealOption=SENTINELpassword1234" +- }, +- { +- "description": "credential as the argument of a sensitive option: optarg-sensitive", +- "uri": "mongodb://localhost:27017/?proxyPassword=SENTINELpassword1234" +- }, +- { +- "description": "credential merged into an option key by a missing equals sign: optkey-merged", +- "uri": "mongodb://localhost:27017/?proxyPasswordSENTINELpassword1234" +- }, +- { +- "description": "credential as the argument of a known integer option, where it fails integer conversion: optarg-known-integer-unparsable", +- "uri": "mongodb://localhost:27017/?connectTimeoutMS=SENTINELpassword1234" +- }, +- { +- "description": "credential as the argument of authMechanism, naming no mechanism the driver knows: optarg-unknown-mechanism", +- "uri": "mongodb://localhost:27017/?authMechanism=SENTINELpassword1234" +- } +- ] +-} diff --git a/test/discovery_and_monitoring/unified/rediscover-quickly-after-step-down.json b/test/discovery_and_monitoring/unified/rediscover-quickly-after-step-down.json index 3147a07a1e..8420e2fc6c 100644 --- a/test/discovery_and_monitoring/unified/rediscover-quickly-after-step-down.json +++ b/test/discovery_and_monitoring/unified/rediscover-quickly-after-step-down.json @@ -1,10 +1,11 @@ { "description": "rediscover-quickly-after-step-down", - "schemaVersion": "1.4", + "schemaVersion": "1.30", "runOnRequirements": [ { "minServerVersion": "4.4", "serverless": "forbid", + "dsc": "forbid", "topologies": [ "replicaset" ] diff --git a/test/transactions/unified/commit.json b/test/transactions/unified/commit.json index de3be30470..6233af695b 100644 --- a/test/transactions/unified/commit.json +++ b/test/transactions/unified/commit.json @@ -1,6 +1,6 @@ { "description": "commit", - "schemaVersion": "1.3", + "schemaVersion": "1.30", "runOnRequirements": [ { "minServerVersion": "4.0", @@ -536,6 +536,11 @@ }, { "description": "write concern error on commit", + "runOnRequirements": [ + { + "dsc": "forbid" + } + ], "operations": [ { "object": "session0", diff --git a/test/unified-test-format/invalid/runOnRequirement-dsc-enum.json b/test/unified-test-format/invalid/runOnRequirement-dsc-enum.json new file mode 100644 index 0000000000..7292da33ad --- /dev/null +++ b/test/unified-test-format/invalid/runOnRequirement-dsc-enum.json @@ -0,0 +1,15 @@ +{ + "description": "runOnRequirement-dsc-enum", + "schemaVersion": "1.30", + "runOnRequirements": [ + { + "dsc": "foo" + } + ], + "tests": [ + { + "description": "foo", + "operations": [] + } + ] +} diff --git a/test/unified-test-format/invalid/runOnRequirement-dsc-type.json b/test/unified-test-format/invalid/runOnRequirement-dsc-type.json new file mode 100644 index 0000000000..05071f31ff --- /dev/null +++ b/test/unified-test-format/invalid/runOnRequirement-dsc-type.json @@ -0,0 +1,15 @@ +{ + "description": "runOnRequirement-dsc-type", + "schemaVersion": "1.30", + "runOnRequirements": [ + { + "dsc": 1234 + } + ], + "tests": [ + { + "description": "foo", + "operations": [] + } + ] +}