Palantir Foundry
Configuring a Palantir Foundry OAuth integration in Posit Connect involves two main steps, each performed by different administrators.
- Step 1: A Palantir Foundry administrator registers a Developer Console application.
- Step 2: A Posit Connect administrator creates an OAuth integration within Connect.
This guide walks through both steps of this process, providing the necessary information for each administrator role.
Currently, the only supported way to interact with Foundry is through the Palantir SDK, which is available in Python and TypeScript.
Step 1: Palantir Foundry administrator
Create a Developer Console application
The Palantiry Foundry administrator registers a new Developer Console application. Connect currently only supports integrations with Palantir Foundry applications that use confidential clients and viewer authentication.
Viewer Integration
The Palantir Foundry administrator adds a redirect URL for the OAuth application. Palantir Foundry sends the user credentials to the redurect URL at the end of the OAuth handshake, allowing Posit Connect to obtain a temporary access token and refresh token.
The OAuth application is configured with the following redirect URL (sometimes referred to as a callback URL): https://connect.example.org/__oauth__/integrations/callback. Replace connect.example.org with the address of the Connect server.
Transfer information to Connect administrator
The Palantir Foundry administrator shares the following information with the Posit Connect administrator:
| Field | Description | 
|---|---|
| foundry_hostname | The Palantir Foundry hostname | 
| client_id | The unique identifier of the application in Palantir Foundry. | 
| client_secret | The secret string configured under OAuth & Scopes. | 
Step 2: Posit Connect administrator
Using the information from the Palantir Foundry administrator, the Posit Connect administrator creates an integration through the dashboard’s System > Integrations settings. Once the OAuth integration has been created in Connect, it is available for use by all publishers.
Alternatively, the example below shows how to create a GitHub OAuth integration using curl and the Connect Server API. Replace connect.example.org with the address of the Connect server.
Terminal
curl -H "Authorization: Key ${CONNECT_API_KEY}" \
  -XPOST https://connect.example.org/__api__/v1/oauth/integrations \
  --data '{
    "template": "palantir-foundry",
    "name": "Palantir Foundry Application",
    "description": "A helpful description for publishers to use when choosing an OAuth integration for their content.",
    "config": {
      "foundry_hostname": "<foundry-hostname>"
      "client_id": "<client-id>",
      "client_secret": "<client-secret>"
    }
  }'
# 200 OK
# {"guid": "<oauth-integration-guid>", ... }