@@ -734,23 +734,14 @@ def create_atlas_connect_variants():
734734
735735def create_aws_auth_variants ():
736736 variants = []
737- tasks = [
738- "aws-auth-test-4.4" ,
739- "aws-auth-test-5.0" ,
740- "aws-auth-test-6.0" ,
741- "aws-auth-test-7.0" ,
742- "aws-auth-test-8.0" ,
743- "aws-auth-test-rapid" ,
744- "aws-auth-test-latest" ,
745- ]
746737
747738 for host_name , python in product (["ubuntu20" , "win64" , "macos" ], MIN_MAX_PYTHON ):
748739 expansions = dict ()
749- if host_name != "ubuntu20" :
750- expansions ["skip_ECS_auth_test" ] = "true"
740+ tasks = [".auth-aws" ]
751741 if host_name == "macos" :
752- expansions ["skip_EC2_auth_test" ] = "true"
753- expansions ["skip_web_identity_auth_test" ] = "true"
742+ tasks = [".auth-aws !.auth-aws-web-identity !.auth-aws-ecs !.auth-aws-ec2" ]
743+ elif host_name == "win64" :
744+ tasks = [".auth-aws !.auth-aws-ecs" ]
754745 host = HOSTS [host_name ]
755746 variant = create_variant (
756747 tasks ,
@@ -804,20 +795,20 @@ def create_server_tasks():
804795 for topo , version , (auth , ssl ), sync in product (TOPOLOGIES , ALL_VERSIONS , AUTH_SSLS , SYNCS ):
805796 name = f"test-{ version } -{ topo } -{ auth } -{ ssl } -{ sync } " .lower ()
806797 tags = [version , topo , auth , ssl , sync ]
807- bootstrap_vars = dict (
798+ server_vars = dict (
808799 VERSION = version ,
809800 TOPOLOGY = topo if topo != "standalone" else "server" ,
810801 AUTH = auth ,
811802 SSL = ssl ,
812803 )
813- bootstrap_func = FunctionCall (func = "bootstrap mongo-orchestration " , vars = bootstrap_vars )
804+ server_func = FunctionCall (func = "run server " , vars = server_vars )
814805 test_vars = dict (AUTH = auth , SSL = ssl , SYNC = sync )
815806 if sync == "sync" :
816807 test_vars ["TEST_NAME" ] = "default_sync"
817808 elif sync == "async" :
818809 test_vars ["TEST_NAME" ] = "default_async"
819810 test_func = FunctionCall (func = "run tests" , vars = test_vars )
820- tasks .append (EvgTask (name = name , tags = tags , commands = [bootstrap_func , test_func ]))
811+ tasks .append (EvgTask (name = name , tags = tags , commands = [server_func , test_func ]))
821812 return tasks
822813
823814
@@ -826,11 +817,13 @@ def create_load_balancer_tasks():
826817 for auth , ssl in AUTH_SSLS :
827818 name = f"test-load-balancer-{ auth } -{ ssl } " .lower ()
828819 tags = ["load-balancer" , auth , ssl ]
829- bootstrap_vars = dict (TOPOLOGY = "sharded_cluster" , AUTH = auth , SSL = ssl , LOAD_BALANCER = "true" )
830- bootstrap_func = FunctionCall (func = "bootstrap mongo-orchestration" , vars = bootstrap_vars )
820+ server_vars = dict (
821+ TOPOLOGY = "sharded_cluster" , AUTH = auth , SSL = ssl , TEST_NAME = "load_balancer"
822+ )
823+ server_func = FunctionCall (func = "run server" , vars = server_vars )
831824 test_vars = dict (AUTH = auth , SSL = ssl , TEST_NAME = "load_balancer" )
832825 test_func = FunctionCall (func = "run tests" , vars = test_vars )
833- tasks .append (EvgTask (name = name , tags = tags , commands = [bootstrap_func , test_func ]))
826+ tasks .append (EvgTask (name = name , tags = tags , commands = [server_func , test_func ]))
834827
835828 return tasks
836829
@@ -846,14 +839,105 @@ def create_kms_tasks():
846839 sub_test_name += "-fail"
847840 commands = []
848841 if not success :
849- commands .append (FunctionCall (func = "bootstrap mongo-orchestration " ))
842+ commands .append (FunctionCall (func = "run server " ))
850843 test_vars = dict (TEST_NAME = "kms" , SUB_TEST_NAME = sub_test_name )
851844 test_func = FunctionCall (func = "run tests" , vars = test_vars )
852845 commands .append (test_func )
853846 tasks .append (EvgTask (name = name , commands = commands ))
854847 return tasks
855848
856849
850+ def create_aws_tasks ():
851+ tasks = []
852+ aws_test_types = [
853+ "regular" ,
854+ "assume-role" ,
855+ "ec2" ,
856+ "env-creds" ,
857+ "session-creds" ,
858+ "web-identity" ,
859+ "ecs" ,
860+ ]
861+ for version in get_versions_from ("4.4" ):
862+ base_name = f"test-auth-aws-{ version } "
863+ base_tags = ["auth-aws" ]
864+ server_vars = dict (AUTH_AWS = "1" , VERSION = version )
865+ server_func = FunctionCall (func = "run server" , vars = server_vars )
866+ assume_func = FunctionCall (func = "assume ec2 role" )
867+ for test_type in aws_test_types :
868+ tags = [* base_tags , f"auth-aws-{ test_type } " ]
869+ name = f"{ base_name } -{ test_type } "
870+ test_vars = dict (TEST_NAME = "auth_aws" , SUB_TEST_NAME = test_type )
871+ test_func = FunctionCall (func = "run tests" , vars = test_vars )
872+ funcs = [server_func , assume_func , test_func ]
873+ tasks .append (EvgTask (name = name , tags = tags , commands = funcs ))
874+
875+ tags = [* base_tags , "auth-aws-web-identity" ]
876+ name = f"{ base_name } -web-identity-session-name"
877+ test_vars = dict (
878+ TEST_NAME = "auth_aws" , SUB_TEST_NAME = "web-identity" , AWS_ROLE_SESSION_NAME = "test"
879+ )
880+ test_func = FunctionCall (func = "run tests" , vars = test_vars )
881+ funcs = [server_func , assume_func , test_func ]
882+ tasks .append (EvgTask (name = name , tags = tags , commands = funcs ))
883+
884+ return tasks
885+
886+
887+ def _create_ocsp_task (algo , variant , server_type , base_task_name ):
888+ file_name = f"{ algo } -basic-tls-ocsp-{ variant } .json"
889+
890+ vars = dict (TEST_NAME = "ocsp" , ORCHESTRATION_FILE = file_name )
891+ server_func = FunctionCall (func = "run server" , vars = vars )
892+
893+ vars = dict (ORCHESTRATION_FILE = file_name , OCSP_SERVER_TYPE = server_type , TEST_NAME = "ocsp" )
894+ test_func = FunctionCall (func = "run tests" , vars = vars )
895+
896+ tags = ["ocsp" , f"ocsp-{ algo } " ]
897+ if "disableStapling" not in variant :
898+ tags .append ("ocsp-staple" )
899+
900+ task_name = f"test-ocsp-{ algo } -{ base_task_name } "
901+ commands = [server_func , test_func ]
902+ return EvgTask (name = task_name , tags = tags , commands = commands )
903+
904+
905+ def create_ocsp_tasks ():
906+ tasks = []
907+ tests = [
908+ ("disableStapling" , "valid" , "valid-cert-server-does-not-staple" ),
909+ ("disableStapling" , "revoked" , "invalid-cert-server-does-not-staple" ),
910+ ("disableStapling" , "valid-delegate" , "delegate-valid-cert-server-does-not-staple" ),
911+ ("disableStapling" , "revoked-delegate" , "delegate-invalid-cert-server-does-not-staple" ),
912+ ("disableStapling" , "no-responder" , "soft-fail" ),
913+ ("mustStaple" , "valid" , "valid-cert-server-staples" ),
914+ ("mustStaple" , "revoked" , "invalid-cert-server-staples" ),
915+ ("mustStaple" , "valid-delegate" , "delegate-valid-cert-server-staples" ),
916+ ("mustStaple" , "revoked-delegate" , "delegate-invalid-cert-server-staples" ),
917+ (
918+ "mustStaple-disableStapling" ,
919+ "revoked" ,
920+ "malicious-invalid-cert-mustStaple-server-does-not-staple" ,
921+ ),
922+ (
923+ "mustStaple-disableStapling" ,
924+ "revoked-delegate" ,
925+ "delegate-malicious-invalid-cert-mustStaple-server-does-not-staple" ,
926+ ),
927+ (
928+ "mustStaple-disableStapling" ,
929+ "no-responder" ,
930+ "malicious-no-responder-mustStaple-server-does-not-staple" ,
931+ ),
932+ ]
933+ for algo in ["ecdsa" , "rsa" ]:
934+ for variant , server_type , base_task_name in tests :
935+ task = _create_ocsp_task (algo , variant , server_type , base_task_name )
936+ tasks .append (task )
937+
938+ return tasks
939+
940+
857941##################
858942# Generate Config
859943##################
0 commit comments