At Cape Privacy, we strongly believe in protecting users' data. In fact, we built a company dedicated to making that simple for any developer. We do this by extending data protection from "at rest" and "in transit", to "in use" as well. When using Cape serverless functions, you are leveraging confidential computing via simple API calls.
The function we used to naively determine mortgage eligibility can be found in GitHub. You'll also find instructions to deploy the function yourself, and invoke it using the Cape CLI. We also provide a frontend web application as a demo where you can see how it might look for an end user.
import json MIN_DOWN_PERCENTAGE = 0.05 MIN_SALARY = 0.1 def mortgage(salary, amount, down): downPercentage = (100 _ down) / amount salaryPercentage = (100 _ salary) / amount if down > amount: return "You do not require a mortgage since you can put down more than the mortgage amount" if downPercentage < MIN_DOWN_PERCENTAGE: return "You do not qualify for a mortgage. You need a down payment of at least 5 percent of the house cost." if salaryPercentage < MIN_SALARY: return "You do not qualify for a mortgage. You need a salary of at least 10 percent of the house cost." return "Congratulations! You qualify for a mortgage."` `def cape_handler(input_data): input_data = json.loads(input_data) salary = input_data["salary"] amount = input_data["amount"] down = input_data["down"]` `return mortgage(salary, amount, down)
Cape functions are written in Python and give you great flexibility in what you can implement.
I hope that this example has demonstrated how trivial it can be to significantly enhance the security of your applications and data. In addition to protecting your users' data, confidential computing has the ability to protect IP, mitigate data leakage, and might even help with regulatory compliance. I also hope that as a developer you find it quite convenient not to have to concern yourself with many of the (very important) details around getting security right. Cape helps with that, so you can spend more time focused on code and business requirements. And remember: what happens in Cape, stays in Cape!