Pre-AWS, we were able to verify incoming LSL HTTP requests by checking against the request IP to verify that it is in LL's IP blocks, now since everything is under AWS, it isn't possible anymore.
There isn't a reliable way to verify that a request is coming from SL, so that it can be fenced to Second Life requests only.
After researching and trying to come up with some feasible methods, I came across the fact it is perfectly fine for a TLS connection to send a client certificate.
This is for NodeJS, but it's the best thing I can find at the moment https://medium.com/@sevcsik/authentication-using-https-client-certificates-3c9d270e8326
It may be possible to sign outgoing requests with LL's global cert, so that if a request is incoming, a server can check if the certificate is actually LL's.
What I am unsure about is if this break existing requests? I'm under the impression that most servers will ignore the certificate by default, because they don't typically request a client certificate. If so, this can be added as a HTTP_REQUEST flag.
It looks like the specification goes as so (In this scenario, Client is a LSL script, server is a third party HTTP server):
  1. Client contacts server and says "Hello"
  2. Server replies "Hello", presents it's certificate.
  3. Server
    OPTIONALLY
    asks the client for their certificate, normally this is off.
  4. Client verifies server's certificate
  5. If asked, client presents it's own certificate
  6. Server checks the certificate,
    OPTIONALLY
    rejects the connection if it is untrusted
I'd like to be able to keep all my stuff open source, while also not telling people who want to modify stuff "Go make your own server if you want to edit the scripts", because that doesn't feel very open source to me. Being able to verify that a request is from one of LL's servers and trust the x-secondlife-owner key is vital for this.
This would allow people to verify LSL requests using the cert provided by https://github.com/secondlife/llca
Assuming Squidproxy is still used to proxy outgoing requests, both Squid-3 and Squid-4 both support signing outgoing requests: https://squid-users.squid-cache.narkive.com/ppuGVty2/using-client-certificate-for-all-connection#post6