Prisma Cloud Application Security Gitlab integration - Endpoint request timed out - 504 Gateway Timeout
5732
Created On 02/10/23 03:28 AM - Last Modified 04/29/25 13:47 PM
Symptom
Based on the document for adding Gitlab Self Managed repository to Prisma Cloud Code security after Step 3 where the Authorize button is clicked, the page will redirect to Gitlab Self Managed Portal where another option to Authorize will be presented.
After this step the redirection back to the Cloud URL is done but results in a 504 Gateway Timeout with below message on the browser.
{"message": "Endpoint request timed out"}
Environment
- Adding Gitlab - Self managed Repositories for Code Security scan.
Cause
The most likely cause is the unreachability of the Cloud to the Gitlab Domain or IP.
During the Authorize process the below events happen.
- When the Authorize button the Prisma Cloud is clicked it redirects to the Gitlab portal.
- Once Authorize is clicked on the Gitlab Portal, a redirection happens to the Prisma Cloud with all the necessary information needed.
- Prisma Cloud will then create a refresh token and access the Gitlab domain or IP on HTTPS.
- This to list the Repositories so that the Integration can be completed.
At this step if the Prisma Cloud is unable to reach Gitlab, 504 Gateway time out will be received on the browser.
Resolution
- Make sure the Gitlab self-managed Repository is reachable from internet.
- The needed Prisma Cloud IPs are white listed .
- Pay attention to the extra IPs needed under each region for Code Security.
Additional Information
If direct access to Gitlab from Internet is not an option, then there is a new feature called Transporter.
Set Up a Network Tunnel (Transporter) to Connect Self-Hosted Repositories.