@@ -703,40 +703,44 @@ it.layer(NodeServices.layer)("EnvironmentAuth.layer", (it) => {
703703 ) ;
704704
705705 const rpc = yield * serverAuth . issueWebSocketTicket ( session , { use : "rpc" } ) ;
706- const bare = yield * Effect . flip ( upgrade ( rpc . ticket , "rpc" ) ) ;
706+ const bare = yield * Effect . flip ( upgrade ( Redacted . value ( rpc . ticket ) , "rpc" ) ) ;
707707 expect ( bare . _tag ) . toBe ( "ServerAuthInvalidCredentialError" ) ;
708708 const signed = yield * upgrade (
709- rpc . ticket ,
709+ Redacted . value ( rpc . ticket ) ,
710710 "rpc" ,
711- key . sign ( { method : "GET" , url : socketUrl , token : rpc . ticket , iat } ) ,
711+ key . sign ( { method : "GET" , url : socketUrl , token : Redacted . value ( rpc . ticket ) , iat } ) ,
712712 ) ;
713713 expect ( signed . sessionId ) . toBe ( session . sessionId ) ;
714714
715715 const wrongKey = yield * Effect . flip (
716716 upgrade (
717- rpc . ticket ,
717+ Redacted . value ( rpc . ticket ) ,
718718 "rpc" ,
719- other . sign ( { method : "GET" , url : socketUrl , token : rpc . ticket , iat } ) ,
719+ other . sign ( { method : "GET" , url : socketUrl , token : Redacted . value ( rpc . ticket ) , iat } ) ,
720720 ) ,
721721 ) ;
722722 expect ( wrongKey . _tag ) . toBe ( "ServerAuthInvalidCredentialError" ) ;
723723 const onMedia = yield * Effect . flip (
724724 upgrade (
725- rpc . ticket ,
725+ Redacted . value ( rpc . ticket ) ,
726726 "media" ,
727- key . sign ( { method : "GET" , url : socketUrl , token : rpc . ticket , iat } ) ,
727+ key . sign ( { method : "GET" , url : socketUrl , token : Redacted . value ( rpc . ticket ) , iat } ) ,
728728 ) ,
729729 ) ;
730730 expect ( onMedia . _tag ) . toBe ( "ServerAuthInvalidCredentialError" ) ;
731731
732732 const media = yield * serverAuth . issueWebSocketTicket ( session , { use : "media" } ) ;
733- expect ( ( yield * upgrade ( media . ticket , "media" ) ) . sessionId ) . toBe ( session . sessionId ) ;
734- const mediaOnRpc = yield * Effect . flip ( upgrade ( media . ticket , "rpc" ) ) ;
733+ expect ( ( yield * upgrade ( Redacted . value ( media . ticket ) , "media" ) ) . sessionId ) . toBe (
734+ session . sessionId ,
735+ ) ;
736+ const mediaOnRpc = yield * Effect . flip ( upgrade ( Redacted . value ( media . ticket ) , "rpc" ) ) ;
735737 expect ( mediaOnRpc . _tag ) . toBe ( "ServerAuthInvalidCredentialError" ) ;
736738
737739 // Clients that predate ticket binding still connect with the unbound ticket they mint.
738740 const legacy = yield * serverAuth . issueWebSocketTicket ( session ) ;
739- expect ( ( yield * upgrade ( legacy . ticket , "rpc" ) ) . sessionId ) . toBe ( session . sessionId ) ;
741+ expect ( ( yield * upgrade ( Redacted . value ( legacy . ticket ) , "rpc" ) ) . sessionId ) . toBe (
742+ session . sessionId ,
743+ ) ;
740744 } ) . pipe (
741745 Effect . provide ( layerEnvironmentAuth ( { desktopBootstrapToken : "desktop-bootstrap-token" } ) ) ,
742746 ) ,
@@ -757,10 +761,10 @@ it.layer(NodeServices.layer)("EnvironmentAuth.layer", (it) => {
757761 const rpc = yield * serverAuth . issueWebSocketTicket ( session , { use : "rpc" } ) ;
758762 const request = {
759763 method : "GET" ,
760- url : `/ws?wsTicket=${ rpc . ticket } &dpop=${ key . sign ( {
764+ url : `/ws?wsTicket=${ Redacted . value ( rpc . ticket ) } &dpop=${ key . sign ( {
761765 method : "GET" ,
762766 url : "http://192.168.1.50:3773/ws" ,
763- token : rpc . ticket ,
767+ token : Redacted . value ( rpc . ticket ) ,
764768 iat : Math . floor ( ( yield * DateTime . now ) . epochMilliseconds / 1_000 ) ,
765769 } ) } `,
766770 cookies : { } ,
0 commit comments