You have two Google Cloud projects, named Project A and Project B. You need to deploy a Cloud Function in Project A that stores its output in a Cloud Storage bucket located in Project B while adhering to the principle of least privilege. How should you configure this setup?