Cross-origin fetches - HTTP 203

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 เม.ย. 2020
  • Do you know your cookies from your CSRF from your CORS from your CORB from your CORP from your COEP? In this episode, Jake and Surma dive into the world of cross-origin fetches, and how the web is still battling against some early design mistakes.
    Details on the SameSite rollback → blog.chromium.org/2020/04/tem...
    Other videos in the series → goo.gle/2wneQLl
    Subscribe to Google Chrome Developers here → goo.gle/ChromeDevs
    Also, if you enjoyed this, you might like the HTTP203 podcast! → goo.gle/2y0I5Uo
    Whoa, thanks for reading the description right to the end! Did you spot the secret message in this episode? There isn't one, but why not tell folks in the comments that you spotted it?
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 59

  • @lele_l
    @lele_l 4 ปีที่แล้ว +32

    Http 203 is easily one of my favourite shows on TH-cam :D

  • @driziiD
    @driziiD 3 ปีที่แล้ว +5

    when are we going to give these guys their golden globe award

  • @nonlogos
    @nonlogos 2 ปีที่แล้ว +3

    I need a 3 hr deep dive video on this

  • @driziiD
    @driziiD 3 ปีที่แล้ว +2

    thank you for explaining CORS. I can finally stop having recurring nightmares about it. my therapist will be pleased.

  • @CyberAcidPlanet
    @CyberAcidPlanet 4 ปีที่แล้ว +9

    I liked the plot progression in this episode, especially the reveal in the end. Felt like some super villain was defeated!

  • @wmhilton-old
    @wmhilton-old 4 ปีที่แล้ว +33

    I was with you up until CORP and then I got lost 😂. I'll have to rewatch and pause it.

    • @wmhilton-old
      @wmhilton-old 4 ปีที่แล้ว +1

      Alright, got it!

    • @brentgreeff1115
      @brentgreeff1115 4 ปีที่แล้ว +2

      Is it my imagination or has this vid been sped up by 10% or so?

    • @jakearchibald
      @jakearchibald 4 ปีที่แล้ว

      Nah, we just talk a bit too fast

    • @brentgreeff1115
      @brentgreeff1115 4 ปีที่แล้ว

      @@jakearchibald - I bet 10 Google Bucks its sped up = interesting vid though.

    • @jakearchibald
      @jakearchibald 4 ปีที่แล้ว +1

      ​@@brentgreeff1115​ you just lost 10 Google Bucks

  • @MaxCoplan
    @MaxCoplan 4 ปีที่แล้ว +3

    This was a fantastic episode. I learned a bunch, and now I want more! You should make a bonus episode with all the "boring" details you cut out

  • @Zolbat
    @Zolbat 4 ปีที่แล้ว +4

    The big try catch block to figure out the correct string to use depending on the version of browser the user has, really reminds me of iOS these days with all the switches depending on what kind of notch phone you have

  • @IanJamesPhotography
    @IanJamesPhotography 3 ปีที่แล้ว

    Waited 23 minutes for the dog promised by the video thumbnail.
    Worth it.

  • @DenisTRUFFAUT
    @DenisTRUFFAUT 4 ปีที่แล้ว +2

    Web workers gonna love Cross-Origin-Embedder-Policy !

  • @honmameiko1333
    @honmameiko1333 3 ปีที่แล้ว +1

    Glad to know the sameSite policy change has been resumed😂

  • @flightvision
    @flightvision 2 ปีที่แล้ว

    +1 for a whole episode about unwanted information sharing (tracking) ("Sad User" ;) ). Your topics are always very interesting it is just hard to follow along sometimes as a non-native speaker.

  • @danilaplee
    @danilaplee 4 ปีที่แล้ว +2

    omg this is such a hot topic!!!

  • @mustafwm
    @mustafwm 4 ปีที่แล้ว +5

    Thanks guys
    Just one request: If you can assume a bit less knowledge from us next time, that'd be great :)
    Some of those concepts/examples seemed a bit advanced and were just glanced over, it would have been more helpful if they were explained a bit more.
    Thanks again :)
    Looking forward to the tracking episode

    • @jakearchibald
      @jakearchibald 4 ปีที่แล้ว +2

      This is really good feedback, thanks. What kinds of things could have done with more detail? The first half of this episode ran longer than I intended, so I think I rushed the rest, sorry!

    • @mustafwm
      @mustafwm 4 ปีที่แล้ว +3

      @@jakearchibald Thanks for your reply.
      Actually it's first section that I wish it had more explanation .. those mistakes/risks of current cookies implementation...
      how sending someone to some form on your website can result in you reading their cookies and causing damage?
      having an onLoad event on avatar image load? what's potentially being leaked? how's sending the Origin header with POST can prevent that?
      PS: I really enjoyed the episode, and have learned a lot from you guys here & on twitter (don't mean to be critical here). Thanks :)

    • @TheNewton
      @TheNewton 4 ปีที่แล้ว

      ​@@jakearchibald With CORS's problems&solutions growing more mazelike, I'm not sure the discussion format alone can demystify it.
      I think it it has to be vid&handson maybe a walkthrough setup and pentest showing the problem, and not just a subtopic of other things like lab-fetch-api it's own focused lab on webfundamentals( or websecurityfundamentals even) .

    • @taskforce_kerim
      @taskforce_kerim 4 ปีที่แล้ว +1

      @@jakearchibald I think a more detailed explanation or examples of a bad situation would be good. For example, many times it's not exactly clear which site is the evil site. Is it example.com or the site fetching from example.com? If i t's the site fetching from example.com, how can it read the cookie content of example.com? Can site A intercept the get request to site B?

  • @shobhitchittora2267
    @shobhitchittora2267 4 ปีที่แล้ว

    Eye opening!

  • @finally_code
    @finally_code 4 ปีที่แล้ว +2

    Well, this turned into a reality show quickly ...

  • @googleplexer
    @googleplexer 4 ปีที่แล้ว

    «got me notes» - it’s awesome 😎 😂

  • @maistho
    @maistho 4 ปีที่แล้ว +1

    That's a lovely dog :)

  • @Dygear
    @Dygear 4 ปีที่แล้ว +1

    CORB-on-the-COB.

  • @nivoset
    @nivoset 4 ปีที่แล้ว +2

    Especially with micro front ends coming up. Something needs to be worked out

  • @jcestibariz
    @jcestibariz 4 ปีที่แล้ว +1

    Some reference material:
    CORP: developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Resource-Policy
    CORB: www.chromium.org/Home/chromium-security/corb-for-developers
    nosniff: developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
    COEP: wicg.github.io/cross-origin-embedder-policy/

  • @joshkramer2435
    @joshkramer2435 4 ปีที่แล้ว +3

    Already subscribed, but Watson got me to click the bell!

  • @nobodyz2700
    @nobodyz2700 3 ปีที่แล้ว +1

    yeah... 2020 is pretty bad for breaking changes...

  • @ancientelevator9
    @ancientelevator9 ปีที่แล้ว

    I feel like you should have introduced the class of problems at the beginning, as well as a walkthrough of some examples.

  • @frutiboy1
    @frutiboy1 3 ปีที่แล้ว

    This was hard to learn much from it :,-)

  • @TheNewton
    @TheNewton 4 ปีที่แล้ว

    1:50 pdfs, may be a competitor since mosaic could display them but AFAIK that may only been while on the file path so maybe not a pure sub resource except in however they programmed it to display in a html browser, and ummm actually there was no tag in the spec which probably also rules out any stylesheet prototypes.

    • @jakearchibald
      @jakearchibald 4 ปีที่แล้ว

      Yeah, I don't think it was a subresource, just a top-level navigation.

  • @albertodeagostini6143
    @albertodeagostini6143 4 ปีที่แล้ว

    You should show Watson more often

  • @kyay10
    @kyay10 4 ปีที่แล้ว +3

    Can you make a video explaining what Meltdown and Spectre is and how it worked and stuff like that? Cuz y'all keep mentioning it, and it honestly sounds pretty interesting!

    • @jakearchibald
      @jakearchibald 4 ปีที่แล้ว +3

      th-cam.com/video/dBuykrdhK-A/w-d-xo.html might do the trick

    • @MaxCoplan
      @MaxCoplan 4 ปีที่แล้ว

      @@jakearchibald When will I get my precious SharedArrayBuffers back in all the major browsers 😫? Shoutouts to Chrome at least for getting them back asap, but hard to invest a lot in them without support from WebKit. Cheers

  • @duncan-dean
    @duncan-dean 4 ปีที่แล้ว +1

    Wow nice secret in description.

  • @davidmaxwaterman
    @davidmaxwaterman 3 ปีที่แล้ว

    What about the problem with losing the cookies (eg sessionid) when your app is added to homescreen on iOS, where your index.html has been cached by the service worker...and/or you're now offline? It works in-browser, but not from homescreen.

  • @CardinalHijack
    @CardinalHijack 4 ปีที่แล้ว

    Hey Jake, I find it super interesting at 1:35 where you said you were not allowed on the internet, and "nobody knew what the internet was". So I wonder how you got into it? You often find that industry leaders like yourself started coding on a PC when they were around 9 (not that its necessary, but you tend to notice early introduction to tech), so I found it interesting that you seem to state the opposite.

    • @jakearchibald
      @jakearchibald 4 ปีที่แล้ว +1

      I tinkered around with bits of BASIC when I was 7 I guess, but I was more interested in graphical design & animation until I was in my late teens

    • @CardinalHijack
      @CardinalHijack 4 ปีที่แล้ว

      Jake Archibald interesting. Thanks for the reply

  • @danielni
    @danielni 4 ปีที่แล้ว +2

    So we should still implement CSRF tokens until all browsers support SameSite=Lax?

    • @jakearchibald
      @jakearchibald 4 ปีที่แล้ว +5

      If you're targeting browsers that don't support SameSite, then yes, you'll need an alternative. The Origin header can be simpler than tokens, but again it depends on browser support. Also, this stuff doesn't work if you have GET endpoints that perform actions, but y'know, you shouldn't have those.

  • @DavidElstob73
    @DavidElstob73 4 ปีที่แล้ว

    Guys, is it actually possible to Server Push self-hosted fonts?
    When I add crossorigin my push degrades to a preload. It's super annoying and I can't find a solution. You are my last hope. :)

    • @jakearchibald
      @jakearchibald 4 ปีที่แล้ว +1

      You might be being tripped up by jakearchibald.com/2017/h2-push-tougher-than-i-thought/#requests-without-credentials-use-a-separate-connection. Server push is generally bad.

  • @vengateshvaidyanathang550
    @vengateshvaidyanathang550 3 ปีที่แล้ว

    Guys please provide a gist of entire code at the final minutes..

  • @hobbyturystaSEO
    @hobbyturystaSEO 4 ปีที่แล้ว

    what about cors at firebase ?

  • @eduardoreis8500
    @eduardoreis8500 4 ปีที่แล้ว

    Would you share that presentation?

  • @Cookie_Wookie_7
    @Cookie_Wookie_7 3 ปีที่แล้ว

    When is the cross sure tracking episode

    • @jakearchibald
      @jakearchibald 3 ปีที่แล้ว

      Oh yeah, we haven't done this yet (although I've mentioned parts of it in other talks), although there's blog.google/products/ads-commerce/a-more-privacy-first-web if you want to know the latest

  • @gettingthingsdone
    @gettingthingsdone 4 ปีที่แล้ว +3

    caring about privacy on the web.
    working at Google. :D

  • @joshuvageorge1678
    @joshuvageorge1678 2 ปีที่แล้ว

    what is subresource? :

  • @aham3687
    @aham3687 4 ปีที่แล้ว

    Tongue twister

  • @davidmaxwaterman
    @davidmaxwaterman 3 ปีที่แล้ว

    I had to unsubscribe in order to subscribe....ditto for the bell.