Calling Foundry CI-Checks (Jemma/Gradle) — Authentication to External Systems and Foundry Serverless Functions?

Hi community,

We are building an integration where Foundry CI-Checks (Gradle/Jemma) needs to authenticate outbound calls as part of a custom Gradle check task. We have two paths we are exploring:

Primary Path — Foundry CI to External IP: Foundry CI-Checks needs to call an external system directly via global egress. The CI process needs a secure, automated way to authenticate these outbound calls without any user credentials or interactive authentication.

Secondary Path — Foundry CI to Foundry Serverless Function (Workaround): As a fallback, Foundry CI-Checks calls a Foundry Serverless Python Function which then communicates with the external system on its behalf. We know the CI TOKEN exists in the Jemma environment, but it does not appear to be scoped to invoke/execute a Foundry Serverless Function endpoint.

Our questions:

Has anyone managed to authenticate outbound calls from a Foundry CI Gradle check task to an external system?
Has anyone managed to authenticate a call from a Foundry CI Gradle check task to a Foundry Serverless Function?
Is there a way to scope the existing CI TOKEN to cover either of these?
Is there an alternative machine-managed token available in the Gradle check execution context?
Has anyone worked around this differently?

Thanks in advance!

Hi Aakash,

there won’t be any way to securely store a token to be used to authenticate with an external system or foundry itself. Reaching your own stack will probably be possible but you’ll need a token which you could only store within your source code which is not secure.

Reaching an external system is basically impossible unless you have a single tenant stack and perform network allowlisting on a backend setting which I assume Palantir won’t do anymore.

In summary, I would not recommend to make API calls from CI Checks and find other alternatives.

@shuvdeeo please stop AI slop, it doesn’t add any value.