The 403 Forbidden error you are encountering when using SignTool with Azure Trusted Signing can be caused by several factors. Here are some common troubleshooting steps you can take:
- Check Azure Subscription Status: Ensure that your Azure subscription is in the "Registered" state. If it's not, you may need to register it.
- Role Assignment: Verify that the identity you are using to sign the file has the Trusted Signing Certificate Profile Signer role assigned correctly. Ensure that the role is assigned to the correct user or service principal.
- Endpoint and Profile Configuration: Double-check the values in your metadata JSON file. Ensure that the
Endpoint,CodeSigningAccountName, andCertificateProfileNameare all correct and correspond to the resources you have set up in Azure. - Network Issues: If you are accessing the Trusted Signing endpoint from a virtual machine or computer, ensure that there are no network issues preventing access. You might want to try executing the action from a different machine.
- Identity Validation: Confirm that the identity validation status is Completed and that the Certificate Profile is active.
- Check for Excluded Credentials: Since you have excluded
ManagedIdentityCredentialandWorkloadIdentityCredential, ensure that these are not required for your signing operation. If your environment requires these credentials, consider removing them from the exclusion list. - Service Principal Authentication: If you are using service principal authentication, ensure that the environment variables are set correctly as per the requirements for service principal with certificate-based authentication.
If you have checked all of the above and are still facing issues, consider reviewing the Azure documentation for more detailed troubleshooting steps or reaching out to Azure support for assistance.
References: