Client credentials OAuth2 flow with Data Connection REST

Hey all,

What’s the recommended way of sharing an external API connection that uses the client_credentials OAuth2 flow across Code Repositories?

Is the best option to use the workaround in the webhook documentation with Additional Secrets and manually do the flow in Python? Are there any plans to make this more first class like the other authentication methods?

Thanks!

You can create a REST data source that handles the credentials and import it to the respective code repository. For this, I think you must enable external transforms in the code repository and potentially have the permissions to add egress rules.

https://www.palantir.com/docs/foundry/administration/configure-outbound-applications

Unfortunately Outbound Apps are currently unsupported in code repositories for python external transforms, though we do have plans to add support in the future. As @Flackermann mentioned, you can add the necessary credentials to a source (or optionally create/import two sources if a separate authentication server is needed) and import it into the code repository to manually perform the flow.

If you are writing a typescript function in code repositories and using webhooks, you can follow this guide to configure the grant for each webhook that needs authentication