3 ms·
I've had a _very interesting idea_ about public-code-execution that relies on leaking your AWS keys: 1. AWS Lambda is "verifiable infrastructure". You can fetc
by captn3m0 6y ago
I've had a _very interesting idea_ about public-code-execution that relies on leaking your AWS keys:
1. AWS Lambda is "verifiable infrastructure". You can fetch the code and verify that it's the same code as what you've provided elsewhere (as a reproducible build for eg)
2. Use the lambda for trusted-code-execution (say collecting hashes of your contact list, matching them against a bloom filter). The code isn't supposed to log these contacts, or save them in any way.
3. You create a AWS IAM keypair that has permissions to get each revision of the lambda code, validate the corresponding API endpoint.
4. Instead of using a custom-domain API Gateway, you instead use the AWS execute lambda endpoint. The request directly reaches the lambda - verifiably (I think).
5. Publish the keys for the AWS IAM keypair that was created above.
Anyone in the world can then call up the Lambda management API to validate the code at any time with these credentials. If you trust AWS Lambda and IAM, there is a verifiable trust in the code that is running on that lambda and that is processing your contacts.
This might be possible by setting up an IAM Assume Role against the * to allow any AWS user the same permissions, but I'm not sure if that's allowed?
Edit: Documented on my ideas repo https://github.com/captn3m0/ideas#verifiable-code-execution-on-aws-lambda https://github.com/captn3m0/ideas#verifiable-code-execution-... , if someone is interested in building this
- Znafon 6y agoThis is a funny idea, I imagine you could do this with other services as well, for example you could use an API Gateway as long as you give read only keys for API Gateway and Route53?
- captn3m0 6y agoYeah, but then you're auditing more pieces (is the gateway logging? is it mirroring traffic?). Route53 is also tricky, because you will need to prove the whole chain from your namesever. It won't even work for domains registered outside AWS, because you could have a second NS listed and that needs special treatment to catch. Using the Lambda execution endpoints (the ones that look like https://API-ID.execute-api.REGION.amazonaws.com/STAGE https://API-ID.execute-api.REGION.amazonaws.com/STAGE) avoids a lot of these concerns.