https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • d

    dave

    02/14/2023, 11:49 PM
    I could have sworn I saw somewhere that AWS IAM supported using mTLS or something now
  • b

    Brazilionaire

    02/14/2023, 11:51 PM
    nice, I guess I just need to make sure I can forward path, headers and stuff to Lambda via aws4fetch and making sure there's no significant overhead using that over API Gateway. But I'm guessing that's all fine
  • d

    dave

    02/14/2023, 11:55 PM
    I'm passing return headers already
  • d

    dave

    02/14/2023, 11:55 PM
    example
  • d

    dave

    02/14/2023, 11:56 PM
    the via and most of those headers are added by me in my Lambda, not by Amazon or CF.
  • b

    Brazilionaire

    02/14/2023, 11:56 PM
    I meant providing the exact same request to lambda. So forwarding request headers, path, qs, etc
  • b

    Brazilionaire

    02/14/2023, 11:57 PM
    but I can’t see that being an issue
  • d

    dave

    02/14/2023, 11:57 PM
    pretty sure it's exact, I use FastAPI and it was the same URLs and everything local vs Lambda
  • b

    Brazilionaire

    02/14/2023, 11:58 PM
    awesome
  • d

    dave

    02/14/2023, 11:59 PM
    I recommend at least adding the
    via
    header if you're gonna use multiple lambda function URLs
  • d

    dave

    02/14/2023, 11:59 PM
    so you can track down which endpoint is being buggy (or if all of them are) if you have issues in the future
  • d

    dave

    02/15/2023, 12:01 AM
    semi-related, is there any way aside from IAM access tokens and API gateway's mTLS, for a CF Worker to auth with AWS?
  • b

    Brazilionaire

    02/15/2023, 12:03 AM
    not sure, we were originally going to slap an api-token in the header and have API gateway verify it but decided on mTLS since it's more secure
  • d

    dave

    02/15/2023, 12:06 AM
    AWS Signature Version 4 should be reasonable secure.
  • d

    dave

    02/15/2023, 12:07 AM
    The only benefit I see to mTLS, is a compromised Worker would not be able to extract the key.
  • b

    Brazilionaire

    02/15/2023, 12:07 AM
    why not?
  • b

    Brazilionaire

    02/15/2023, 12:08 AM
    it's bound as an env var I think
  • k

    kian

    02/15/2023, 12:08 AM
    all you get is a object with a fetch method
  • b

    Brazilionaire

    02/15/2023, 12:08 AM
    ah I see
  • d

    dave

    02/15/2023, 12:09 AM
    If your CF account gets popped, you’re probably already having a very bad day.
  • k

    kian

    02/15/2023, 12:09 AM
    if they have write access then any secrets are moot anyways
  • k

    kian

    02/15/2023, 12:09 AM
    if it's just read, they can't view your secrets
  • k

    kian

    02/15/2023, 12:09 AM
  • d

    dave

    02/15/2023, 12:10 AM
    mTLS private keys can’t be downloaded though, right?
  • k

    kian

    02/15/2023, 12:10 AM
    nothing in wrangler to download them - so I assume not
  • k

    kian

    02/15/2023, 12:10 AM
    only upload/list/delete
  • k

    kian

    02/15/2023, 12:11 AM
    you can also bind cryptokeys to a worker which is pretty cool
  • k

    kian

    02/15/2023, 12:11 AM
    but that's an unstable api
  • d

    dave

    02/15/2023, 12:20 AM
    Oh right
  • d

    dave

    02/15/2023, 1:33 AM
    for service bindings, shouldn't
    yarn dev
    just work?
1...227222732274...2509Latest