Azure Container Registry scan errors out (400 Bad Request).

Azure Container Registry scan errors out (400 Bad Request).

3697
Created On 01/17/23 07:18 AM - Last Modified 07/15/24 19:13 PM


Symptom


  • The addition of the registry information (Defend > Vulnerabilities > Images > Registry settings) does not trigger scans
  • The registry scans tend to fail with the "400 Bad Request" error as seen on the Console 'debug' logs
Screen Shot 2023-01-16 at 11.26.35 PM.png
  • Regardless of any changes made to the registry information except the credentials section, the scans fail or do not respond
  • Since the scans fail, no results are visible under Compute > Monitor > Vulnerabilities > Images > Registries


Environment


  • Prisma Cloud Compute - Self hosted & SaaS (all versions)
  • Azure container registries (ACR) - all versions


Cause


  • The cause of this issue is the use of incorrect credentials. The credentials used for the Azure container registry (ACR) must be checked to see if they are in accordance to the requirements mentioned in the documentation
  • The use of incorrect URL would still output no results, however for the specific error: 400 Bad Request, the use of incorrect "service key" or "temporary token" (imported from Azure credentials present in Prisma Cloud/CSPM) are the root cause
Screen Shot 2023-01-16 at 11.24.46 PM.png
 


Resolution


  • The issue is resolved when we use the correct credentials. The correct credentials in this case, means the use of "Service Key" to authenticate with the Azure container registry (ACR)
Screen Shot 2023-01-16 at 11.39.39 PM.png
  • As mentioned in the documentation, an "Azure Service Principal" must be created with an appropriate role according to the requirements of the user, the "contributor" role is suitable for use in Cloud Discovery + Azure Container Registry Scanning + Azure Function Apps Scanning while the "reader" role should be sufficient for use in Cloud Discovery + Azure Container Registry Scanning
Screen Shot 2023-01-16 at 11.47.23 PM.png
  • On completing the configuration as instructed above, the scans start to trigger and the results can be seen on the Prisma Compute Console as shown in the screenshot below
Screen Shot 2023-01-16 at 11.47.49 PM.png
 


Additional Information


Related documentation:

 



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000saTbCAI&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language