It sounds like you have set up the federated workload identity correctly, but there may be a few areas to check that could be causing the API request failure:
- Permissions: Ensure that the service principal (SP) in the CORP tenant has the appropriate permissions to access the resources in the repo. While you mentioned giving
genericReadpermissions, double-check that these permissions are correctly assigned and that there are no additional required permissions for the specific API call you are making. - Federated Identity Configuration: Verify that the federated workload identity is correctly configured in both the TORUS and CORP environments. Ensure that the issuer and subject claims are correctly set up and that the trust relationship is established properly.
- Token Acquisition: Check if the pipeline is successfully acquiring the token from the federated identity. If the token is not being issued correctly, it would lead to authentication failures when trying to access the repo.
- Network and Firewall Settings: Ensure that there are no network restrictions or firewall settings that might be blocking the API requests from the TORUS environment to the CORP resources.
- Error Logs: Look into the error logs for more specific information about the failure. The logs might provide insights into whether the issue is related to authentication, permissions, or something else.
By reviewing these areas, you should be able to identify the root cause of the API request failure in your pipeline.