@@ -463,22 +463,22 @@ pub fn gate_eids_by_consent<T>(
463463}
464464
465465// ---------------------------------------------------------------------------
466- // SSC consent gating
466+ // EC consent gating
467467// ---------------------------------------------------------------------------
468468
469- /// Determines whether SSC (Synthetic Session Cookie) creation is permitted
470- /// based on the user's consent and detected jurisdiction.
469+ /// Determines whether Edge Cookie (EC ) creation is permitted based on the
470+ /// user's consent and detected jurisdiction.
471471///
472472/// The decision follows the jurisdiction's consent model:
473473///
474474/// - **GDPR (EU/UK)**: opt-in required — TCF Purpose 1 (store/access
475475/// information on a device) must be explicitly consented. If no TCF data is
476- /// available under GDPR, consent is assumed absent and SSC is blocked.
477- /// - **US state privacy**: opt-out model — SSC is allowed unless the user has
476+ /// available under GDPR, consent is assumed absent and EC is blocked.
477+ /// - **US state privacy**: opt-out model — EC is allowed unless the user has
478478/// explicitly opted out via the US Privacy string or Global Privacy Control.
479- /// - **Non-regulated / Unknown**: SSC is allowed (no consent requirement).
479+ /// - **Non-regulated / Unknown**: EC is allowed (no consent requirement).
480480#[ must_use]
481- pub fn allows_ssc_creation ( ctx : & ConsentContext ) -> bool {
481+ pub fn allows_ec_creation ( ctx : & ConsentContext ) -> bool {
482482 match & ctx. jurisdiction {
483483 jurisdiction:: Jurisdiction :: Gdpr => {
484484 // EU/UK: explicit opt-in required (TCF Purpose 1 = store/access device).
@@ -610,7 +610,7 @@ mod tests {
610610 use fastly:: Request ;
611611
612612 use super :: {
613- allows_ssc_creation , apply_expiration_check, apply_tcf_conflict_resolution,
613+ allows_ec_creation , apply_expiration_check, apply_tcf_conflict_resolution,
614614 build_consent_context, build_context_from_signals, should_try_kv_fallback,
615615 ConsentPipelineInput ,
616616 } ;
@@ -882,7 +882,7 @@ mod tests {
882882 }
883883
884884 // -----------------------------------------------------------------------
885- // allows_ssc_creation tests
885+ // allows_ec_creation tests
886886 // -----------------------------------------------------------------------
887887
888888 /// Helper: builds a TCF consent with configurable Purpose 1 (storage).
@@ -891,35 +891,35 @@ mod tests {
891891 }
892892
893893 #[ test]
894- fn ssc_allowed_gdpr_with_storage_consent ( ) {
894+ fn ec_allowed_gdpr_with_storage_consent ( ) {
895895 let ctx = ConsentContext {
896896 jurisdiction : Jurisdiction :: Gdpr ,
897897 tcf : Some ( make_tcf_with_storage ( true ) ) ,
898898 gdpr_applies : true ,
899899 ..ConsentContext :: default ( )
900900 } ;
901901 assert ! (
902- allows_ssc_creation ( & ctx) ,
903- "GDPR + TCF Purpose 1 consented should allow SSC "
902+ allows_ec_creation ( & ctx) ,
903+ "GDPR + TCF Purpose 1 consented should allow EC "
904904 ) ;
905905 }
906906
907907 #[ test]
908- fn ssc_blocked_gdpr_without_storage_consent ( ) {
908+ fn ec_blocked_gdpr_without_storage_consent ( ) {
909909 let ctx = ConsentContext {
910910 jurisdiction : Jurisdiction :: Gdpr ,
911911 tcf : Some ( make_tcf_with_storage ( false ) ) ,
912912 gdpr_applies : true ,
913913 ..ConsentContext :: default ( )
914914 } ;
915915 assert ! (
916- !allows_ssc_creation ( & ctx) ,
917- "GDPR + TCF Purpose 1 not consented should block SSC "
916+ !allows_ec_creation ( & ctx) ,
917+ "GDPR + TCF Purpose 1 not consented should block EC "
918918 ) ;
919919 }
920920
921921 #[ test]
922- fn ssc_blocked_gdpr_no_tcf_data ( ) {
922+ fn ec_blocked_gdpr_no_tcf_data ( ) {
923923 let ctx = ConsentContext {
924924 jurisdiction : Jurisdiction :: Gdpr ,
925925 tcf : None ,
@@ -928,13 +928,13 @@ mod tests {
928928 ..ConsentContext :: default ( )
929929 } ;
930930 assert ! (
931- !allows_ssc_creation ( & ctx) ,
932- "GDPR with no TCF data should block SSC "
931+ !allows_ec_creation ( & ctx) ,
932+ "GDPR with no TCF data should block EC "
933933 ) ;
934934 }
935935
936936 #[ test]
937- fn ssc_allowed_gdpr_via_gpp_embedded_tcf ( ) {
937+ fn ec_allowed_gdpr_via_gpp_embedded_tcf ( ) {
938938 let ctx = ConsentContext {
939939 jurisdiction : Jurisdiction :: Gdpr ,
940940 tcf : None ,
@@ -947,13 +947,13 @@ mod tests {
947947 ..ConsentContext :: default ( )
948948 } ;
949949 assert ! (
950- allows_ssc_creation ( & ctx) ,
951- "GDPR + GPP embedded TCF with P1 consent should allow SSC "
950+ allows_ec_creation ( & ctx) ,
951+ "GDPR + GPP embedded TCF with P1 consent should allow EC "
952952 ) ;
953953 }
954954
955955 #[ test]
956- fn ssc_allowed_us_state_no_optout ( ) {
956+ fn ec_allowed_us_state_no_optout ( ) {
957957 let ctx = ConsentContext {
958958 jurisdiction : Jurisdiction :: UsState ( "CA" . to_owned ( ) ) ,
959959 us_privacy : Some ( UsPrivacy {
@@ -965,13 +965,13 @@ mod tests {
965965 ..ConsentContext :: default ( )
966966 } ;
967967 assert ! (
968- allows_ssc_creation ( & ctx) ,
969- "US state + no opt-out should allow SSC "
968+ allows_ec_creation ( & ctx) ,
969+ "US state + no opt-out should allow EC "
970970 ) ;
971971 }
972972
973973 #[ test]
974- fn ssc_blocked_us_state_opted_out ( ) {
974+ fn ec_blocked_us_state_opted_out ( ) {
975975 let ctx = ConsentContext {
976976 jurisdiction : Jurisdiction :: UsState ( "CA" . to_owned ( ) ) ,
977977 us_privacy : Some ( UsPrivacy {
@@ -983,65 +983,65 @@ mod tests {
983983 ..ConsentContext :: default ( )
984984 } ;
985985 assert ! (
986- !allows_ssc_creation ( & ctx) ,
987- "US state + opt-out should block SSC "
986+ !allows_ec_creation ( & ctx) ,
987+ "US state + opt-out should block EC "
988988 ) ;
989989 }
990990
991991 #[ test]
992- fn ssc_blocked_us_state_gpc_implies_optout ( ) {
992+ fn ec_blocked_us_state_gpc_implies_optout ( ) {
993993 let ctx = ConsentContext {
994994 jurisdiction : Jurisdiction :: UsState ( "CA" . to_owned ( ) ) ,
995995 us_privacy : None ,
996996 gpc : true ,
997997 ..ConsentContext :: default ( )
998998 } ;
999999 assert ! (
1000- !allows_ssc_creation ( & ctx) ,
1001- "US state + GPC=true with no US Privacy string should block SSC "
1000+ !allows_ec_creation ( & ctx) ,
1001+ "US state + GPC=true with no US Privacy string should block EC "
10021002 ) ;
10031003 }
10041004
10051005 #[ test]
1006- fn ssc_allowed_us_state_no_signals ( ) {
1006+ fn ec_allowed_us_state_no_signals ( ) {
10071007 let ctx = ConsentContext {
10081008 jurisdiction : Jurisdiction :: UsState ( "CA" . to_owned ( ) ) ,
10091009 us_privacy : None ,
10101010 gpc : false ,
10111011 ..ConsentContext :: default ( )
10121012 } ;
10131013 assert ! (
1014- allows_ssc_creation ( & ctx) ,
1015- "US state + no opt-out signals should allow SSC (opt-out model)"
1014+ allows_ec_creation ( & ctx) ,
1015+ "US state + no opt-out signals should allow EC (opt-out model)"
10161016 ) ;
10171017 }
10181018
10191019 #[ test]
1020- fn ssc_allowed_non_regulated ( ) {
1020+ fn ec_allowed_non_regulated ( ) {
10211021 let ctx = ConsentContext {
10221022 jurisdiction : Jurisdiction :: NonRegulated ,
10231023 ..ConsentContext :: default ( )
10241024 } ;
10251025 assert ! (
1026- allows_ssc_creation ( & ctx) ,
1027- "non-regulated jurisdiction should always allow SSC "
1026+ allows_ec_creation ( & ctx) ,
1027+ "non-regulated jurisdiction should always allow EC "
10281028 ) ;
10291029 }
10301030
10311031 #[ test]
1032- fn ssc_allowed_unknown_jurisdiction ( ) {
1032+ fn ec_allowed_unknown_jurisdiction ( ) {
10331033 let ctx = ConsentContext {
10341034 jurisdiction : Jurisdiction :: Unknown ,
10351035 ..ConsentContext :: default ( )
10361036 } ;
10371037 assert ! (
1038- allows_ssc_creation ( & ctx) ,
1039- "unknown jurisdiction should allow SSC (no geo data available)"
1038+ allows_ec_creation ( & ctx) ,
1039+ "unknown jurisdiction should allow EC (no geo data available)"
10401040 ) ;
10411041 }
10421042
10431043 #[ test]
1044- fn ssc_us_privacy_not_applicable_allows_ssc ( ) {
1044+ fn ec_us_privacy_not_applicable_allows_ec ( ) {
10451045 let ctx = ConsentContext {
10461046 jurisdiction : Jurisdiction :: UsState ( "VA" . to_owned ( ) ) ,
10471047 us_privacy : Some ( UsPrivacy {
@@ -1053,8 +1053,8 @@ mod tests {
10531053 ..ConsentContext :: default ( )
10541054 } ;
10551055 assert ! (
1056- allows_ssc_creation ( & ctx) ,
1057- "US Privacy with opt_out=N/A should allow SSC "
1056+ allows_ec_creation ( & ctx) ,
1057+ "US Privacy with opt_out=N/A should allow EC "
10581058 ) ;
10591059 }
10601060}
0 commit comments